Hi Rob,<div><br></div><div>I got the same problem today with sti drm/kms driver and dumb Bo.</div><div>The issue comes become hwcomposer because is the master and authenticated on /dev/dri/cardX<br>Dumb allocation is done by gralloc which does a new open (so it is not authenticated) on drm node the consequence is that we can't use prime functions...</div><div>If you use render node you won't be able to call dumb functions.</div><div><br></div><div>To get out of this I think I will implement additional helpers in gem_cma to have ioctl like DRM_GEM_CMA_CREATE and DRM_GEM_CMA_MMAP</div><div>and call them instead of dumb so be able to use render node.</div><div>Of course it is only for drivers which already use gem_cma helpers (like sti)</div><div><br></div><div>Benjamin</div><div><br></div><div><br>Le vendredi 4 décembre 2015, Martin Peres <<a href="mailto:martin.peres@linux.intel.com">martin.peres@linux.intel.com</a>> a écrit :<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 04/12/15 19:49, Rob Herring wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm working on getting Android working with DRM drivers. ATM, I'm<br>
using virtio-gpu as the driver and trying to get just KMS side working<br>
without rendering. I have it working with stock AOSP and the emulated<br>
fb with a few additions to the virtio-gpu driver[1]. Now I'm trying to<br>
get things working with native KMS using drm_gralloc and<br>
drm_hwcomposer (now in AOSP). I've hit one problem though which I'm<br>
not sure how to solve without hacking around it.<br>
<br>
Is prime allowed on dumb BOs? AIUI, dumb buffer allocation is not<br>
allowed on render nodes and drmPrimeHandleToFD is not allowed on<br>
card0, so I'm stuck. I could open both nodes, but then I want the case<br>
of no render node to work. After some searching, I thought it was a<br>
matter of needing to do drmAuthMagic, but then found that is<br>
considered obsolete[2].<br>
</blockquote>
<br>
Obsolete when using render nodes, but still necessary on usual nodes (/dev/dri/cardX) as far as I remember. The usual nodes can do everything the render nodes can do.<br>
<br>
Authentication should help! Please make sure you are master or authenticated before doing anything on the usual nodes.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Rob<br>
<br>
[1] git://<a href="http://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git" target="_blank">git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git</a> android-4.4<br>
[2] <a href="http://www.x.org/wiki/Events/XDC2013/XDC2013DavidHerrmannDRMSecurity/slides.pdf" target="_blank">http://www.x.org/wiki/Events/XDC2013/XDC2013DavidHerrmannDRMSecurity/slides.pdf</a><br>
_______________________________________________<br>
dri-devel mailing list<br>
<a>dri-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
<br>
</blockquote>
</blockquote></div><br><br>-- <br><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">Benjamin Gaignard </p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">Graphic Working Group</p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span lang="EN-US" style="font-size:10pt;color:rgb(0,176,80)"><span style="color:rgb(0,68,252)"><a href="http://www.linaro.org/" style="color:rgb(0,0,204)" target="_blank">Linaro.org</a></span><b> </b></span><b><span lang="EN-US" style="font-size:10pt">│ </span></b><span lang="EN-US" style="font-size:10pt">Open source software for ARM SoCs</span></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><u></u></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span lang="EN-US" style="font-size:10pt">Follow <b>Linaro: </b></span><span style="font-size:10pt;color:rgb(0,68,252)"><a href="http://www.facebook.com/pages/Linaro" style="color:rgb(0,0,204)" target="_blank"><span style="color:blue">Facebook</span></a></span><span style="font-size:10pt"> | <span style="color:rgb(0,68,252)"><a href="http://twitter.com/#!/linaroorg" style="color:rgb(0,0,204)" target="_blank"><span style="color:blue">Twitter</span></a></span> | <span style="color:rgb(0,68,252)"><a href="http://www.linaro.org/linaro-blog/" style="color:rgb(0,0,204)" target="_blank"><span style="color:blue">Blog</span></a></span></span></p></span><br>