<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
Hi Christian,<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
i'm working on nxp i.mx8 platform, as far as i know, kmssink cannot run with window system based on drm, i think kmssink is a good plugin for video playback because of flex display configure and multi screen support. We need this feature to support it.<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
best regards,<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
Jared<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
获取 <a href="https://aka.ms/ghei36">Outlook for Android</a></div>
<br>
<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
发件人: Christian König<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
发送时间: 8月13日星期日 21:27<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
主题: Re: Require for drm control-node<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
收件人: Jared Hu, dri-devel@lists.freedesktop.org<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
抄送: daniel.vetter@ffwll.ch<br>
<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
Hi Jared,<br>
<br>
</div>
<blockquote type="cite">
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
I met a problem that the kmssink will have permission issue when running with x11 and wayland.<br>
</div>
</blockquote>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
This is intentional, at least with the current DRM KMS API design only one application is allowed to control a DRM device.<br>
<br>
</div>
<blockquote type="cite">
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
So I’m change the code to use control node “controlD64” for display and file node card0 for memory management. It work really well.<br>
</div>
</blockquote>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
That sounds like a rather big bug to me, as far as I know control nodes are completely deprecated and should never be used concurrently with the DRM master on the primary node.<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
What hardware are trying this on?<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
Regards,<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
Christian.<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
Am 10.08.2017 um 10:27 schrieb Jared Hu:<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
Hi All,<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
 <br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
I’m a gstreamer developer and is trying to implement a video display plugin based on DRM/KMS which is named “kmssink”.<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
 <br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
I met a problem that the kmssink will have permission issue when running with x11 and wayland. Because these two window system will hold DRM-Master in their life time. So I’m change the code to use control node “controlD64” for display and file node card0 for
 memory management. It work really well. Video can show on multi display with wayland and x11. But I notice that in the Linux kernel mainline, below commit remove the control node:<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
 <br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>commit 8a357d10043c75e980e7fcdb60d2b913491564af </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>Author: Daniel Vetter <</b><b><a href="mailto:daniel.vetter@ffwll.ch">daniel.vetter@ffwll.ch</a></b><b>></b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>Date:   Fri Oct 28 10:10:50 2016 +0200 </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b> </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    drm: Nerf DRM_CONTROL nodes </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    Looking at the ioctl permission checks I noticed that it's impossible </b>
<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    to import gem buffers into a control nodes, and fd2handle/handle2fd </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    also don't work, so no joy with dma-bufs. </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    The only way to do anything with a control node is by drawing stuff </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    into a dumb buffer and displaying that. I suspect control nodes are an </b>
<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    entirely unused thing, and a cursory check shows that there does not </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    seem to be any callers of drmOpenControl nor of the other drmOpen </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    functions using DRM_MODE_CONTROL. </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    Since I don't like dead uabi, let's remove it. But since this would be </b>
<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    a really big change I think it's better to start out small by simply </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    not registering anything. We can garbage-collect the dead code later </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    on, once we're sure it's really not used anywhere. </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    </b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    Acked-by: Dave Airlie <</b><b><a href="mailto:airlied@gmail.com">airlied@gmail.com</a></b><b>></b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    Signed-off-by: Daniel Vetter <</b><b><a href="mailto:daniel.vetter@intel.com">daniel.vetter@intel.com</a></b><b>></b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>    Link: </b><a href="http://patchwork.freedesktop.org/patch/msgid/20161028081050.1042-1-daniel.vetter@ffwll.ch"><b>http://patchwork.freedesktop.org/patch/msgid/20161028081050.1042-1-daniel.vetter@ffwll.ch</b></a><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
 <br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
This will have big impace on my case, and I cannot figure out how to fix this issue. I think control node is useful, actually many users are using this node for application development including rockchip and amlogic. details please refer to:
<a href="http://gstreamer-devel.966125.n4.nabble.com/Can-kmssink-run-with-x11-or-wayland-which-is-based-on-drm-kms-also-td4683783.html#a4683819">
http://gstreamer-devel.966125.n4.nabble.com/Can-kmssink-run-with-x11-or-wayland-which-is-based-on-drm-kms-also-td4683783.html#a4683819</a><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
 <br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
I‘m sending this mail for <b>require restoring control node in file system, or is there any other way to fix my permission issue</b>?<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
 <br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<img src="cid:part6.D9562BEC.F272218A@amd.com" alt="cid:image002.png@01D13808.32F8E040"><br>
<br>
<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
Thanks.<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
 <br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
Best wishes<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>Haihua Hu</b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<b>MPU Mulitmedia Software</b><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
NXP Semiconductors <br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
No.288 ZhuYuan Road<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
Suzhou New District 215011, P.R.C<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
Phone: +86-512-68<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<img src="cid:part7.C52F6211.B26B99F0@amd.com" alt="cid:image003.png@01D13808.32F8E040"><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
0566738<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
<a href="mailto:jared.hu@nxp.com">jared.hu@nxp.com</a><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
 <br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
 <br>
<br>
<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; background-color: white;">
_______________________________________________ dri-devel mailing list <a href="mailto:dri-devel@lists.freedesktop.org">
dri-devel@lists.freedesktop.org</a> <a href="https://lists.freedesktop.org/mailman/listinfo/dri-devel">
https://lists.freedesktop.org/mailman/listinfo/dri-devel</a> <br>
<br>
<br>
<br>
<br>
</div>
</body>
</html>