<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Jared,<br>
<br>
<blockquote type="cite">I met a problem that the kmssink will have
permission issue when running with x11 and wayland.</blockquote>
This is intentional, at least with the current DRM KMS API design
only one application is allowed to control a DRM device.<br>
<br>
<blockquote type="cite">So I’m change the code to use control node
“controlD64” for display and file node card0 for memory
management. It work really well.</blockquote>
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>
What hardware are trying this on?<br>
<br>
Regards,<br>
Christian.<br>
<br>
Am 10.08.2017 um 10:27 schrieb Jared Hu:<br>
</div>
<blockquote type="cite"
cite="mid:HE1PR04MB32892834CA24ABE6859F78AD98880@HE1PR04MB3289.eurprd04.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle21
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi All,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m a gstreamer developer and is trying to
implement a video display plugin based on DRM/KMS which is
named “kmssink”.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>commit
8a357d10043c75e980e7fcdb60d2b913491564af <o:p></o:p></b></p>
<p class="MsoNormal"><b>Author: Daniel Vetter <<a
href="mailto:daniel.vetter@ffwll.ch"
moz-do-not-send="true"><span style="font-weight:normal">daniel.vetter@ffwll.ch</span></a>><o:p></o:p></b></p>
<p class="MsoNormal"><b>Date: Fri Oct 28 10:10:50 2016 +0200 <o:p></o:p></b></p>
<p class="MsoNormal"><b><o:p> </o:p></b></p>
<p class="MsoNormal"><b> drm: Nerf DRM_CONTROL nodes <o:p></o:p></b></p>
<p class="MsoNormal"><b> <o:p></o:p></b></p>
<p class="MsoNormal"><b> Looking at the ioctl permission
checks I noticed that it's impossible
<o:p></o:p></b></p>
<p class="MsoNormal"><b> to import gem buffers into a control
nodes, and fd2handle/handle2fd
<o:p></o:p></b></p>
<p class="MsoNormal"><b> also don't work, so no joy with
dma-bufs. <o:p></o:p></b></p>
<p class="MsoNormal"><b> <o:p></o:p></b></p>
<p class="MsoNormal"><b> The only way to do anything with a
control node is by drawing stuff
<o:p></o:p></b></p>
<p class="MsoNormal"><b> into a dumb buffer and displaying
that. I suspect control nodes are an
<o:p></o:p></b></p>
<p class="MsoNormal"><b> entirely unused thing, and a cursory
check shows that there does not
<o:p></o:p></b></p>
<p class="MsoNormal"><b> seem to be any callers of
drmOpenControl nor of the other drmOpen
<o:p></o:p></b></p>
<p class="MsoNormal"><b> functions using DRM_MODE_CONTROL. <o:p></o:p></b></p>
<p class="MsoNormal"><b> <o:p></o:p></b></p>
<p class="MsoNormal"><b> Since I don't like dead uabi, let's
remove it. But since this would be
<o:p></o:p></b></p>
<p class="MsoNormal"><b> a really big change I think it's
better to start out small by simply
<o:p></o:p></b></p>
<p class="MsoNormal"><b> not registering anything. We can
garbage-collect the dead code later
<o:p></o:p></b></p>
<p class="MsoNormal"><b> on, once we're sure it's really not
used anywhere. <o:p>
</o:p></b></p>
<p class="MsoNormal"><b> <o:p></o:p></b></p>
<p class="MsoNormal"><b> Acked-by: Dave Airlie <<a
href="mailto:airlied@gmail.com" moz-do-not-send="true"><span
style="font-weight:normal">airlied@gmail.com</span></a>><o:p></o:p></b></p>
<p class="MsoNormal"><b> Signed-off-by: Daniel Vetter <<a
href="mailto:daniel.vetter@intel.com"
moz-do-not-send="true"><span style="font-weight:normal">daniel.vetter@intel.com</span></a>><o:p></o:p></b></p>
<p class="MsoNormal"><b> Link: <a
href="http://patchwork.freedesktop.org/patch/msgid/20161028081050.1042-1-daniel.vetter@ffwll.ch"
moz-do-not-send="true">
<span style="font-weight:normal">http://patchwork.freedesktop.org/patch/msgid/20161028081050.1042-1-daniel.vetter@ffwll.ch</span></a><o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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"
moz-do-not-send="true">
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><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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>?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best wishes<o:p></o:p></p>
<p class="MsoNormal" style="line-height:150%"><span
style="font-size:12.0pt;line-height:150%;color:#1F497D"><img
style="width:3.0in;height:.0208in" id="Picture_x0020_3"
src="cid:part6.D9562BEC.F272218A@amd.com"
alt="cid:image002.png@01D13808.32F8E040" class=""
border="0" width="288" height="2"></span><b><u><span
style="font-size:12.0pt;line-height:150%;color:#1F497D"><o:p></o:p></span></u></b></p>
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D">Haihua
Hu<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D">MPU
Mulitmedia Software</span></b><b><u><span
style="font-size:10.0pt;color:#1F497D"><o:p></o:p></span></u></b></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D">NXP
Semiconductors
<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D">No.288
ZhuYuan Road<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D">Suzhou
New District 215011, P.R.C<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D">Phone:
+86-512-680566738<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D"><a class="moz-txt-link-abbreviated" href="mailto:jared.hu@nxp.com">jared.hu@nxp.com</a><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:12.0pt;color:#1F497D"><img
style="width:3.0in;height:.5104in" id="Picture_x0020_9"
src="cid:part7.C52F6211.B26B99F0@amd.com"
alt="cid:image003.png@01D13808.32F8E040" class=""
border="0" width="288" height="49"></span><span
style="font-size:12.0pt;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
dri-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/dri-devel">https://lists.freedesktop.org/mailman/listinfo/dri-devel</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>