Can kmssink run with x11 or wayland which is based on drm/kms also?

Nicolas Dufresne nicolas at ndufresne.ca
Thu Jul 13 14:23:17 UTC 2017


Le jeudi 13 juillet 2017 à 14:48 +0800, Jacob Chen a écrit :
> Hi,
> 
> 
> 2017-07-13 9:23 GMT+08:00 Jacob Chen <jacob-chen at iotwrt.com>:
> > Hi,
> > 
> > 2017-07-13 1:34 GMT+08:00 Nicolas Dufresne <nicolas at ndufresne.ca>:
> > > Le mardi 11 juillet 2017 à 23:17 -0700, jared Hu a écrit :
> > > > Hi,
> > > > 
> > > > I met a problem, if I run kmssink on wayland or x11 backend. Kmssink will
> > > > report Permission denied. Because xserver and wayland will hold DRM-Master.
> > > > I wonder if there is a way to run kmssink with wayland and x11?
> > > 
> > > No, kmssink need to be DRM master.
> > 
> > kmssink can use normal plane, but it should change some codes.
> > 
> > "self->ctrl_fd = open ("/dev/dri/controlD64", O_RDWR); "
> > "
> > ret =
> > drmModeSetPlane (self->ctrl_fd, self->plane_id,
> > self->crtc_id, fb_id, 0, result.x, result.y, result.w, result.h,
> > /* source/cropping coordinates are given in Q16 */
> > src.x << 16, src.y << 16, src.w << 16, src.h << 16);
> > "
> > 
> > On rockchip platform, it works, thought it will have vsync problem
> > because of legacy drm api.
> > 
> 
> = = It seems it didn't work with the latest mainline kernel now.
> So the only way to run kmssink on wayland or x11 is kernel hack.
> 
> comment this funciton.
> http://elixir.free-electrons.com/linux/latest/source/drivers/gpu/drm/drm_ioctl.c#L497

Which I think make sense, DRM is not really designed for this. As
already mention, you can get a much better experience using waylandsink
instead. The compositor should be responsible for distributing the
rendering across the HW planes and optimizing this.

If you're goal was to use kmssink inside a compositor, that would be
different, but still, I'd be curious in which case an equivalent
application could not be made of waylandsink. So far, the only real use
case I've had for kmssink was for fullscreen playback (security
monitor) and for displaying backup camera while the car infotainment is
being booted.

regards,
Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170713/dc9310b4/attachment.sig>


More information about the gstreamer-devel mailing list