<br><br><div class="gmail_quote">On Tue, Dec 14, 2010 at 10:06 AM, Jerome Glisse <span dir="ltr">&lt;<a href="mailto:j.glisse@gmail.com">j.glisse@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On Mon, Dec 13, 2010 at 9:04 PM, Jammy Zhou &lt;<a href="mailto:jammy.zhou@linaro.org">jammy.zhou@linaro.org</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Dec 14, 2010 at 12:11 AM, Jerome Glisse &lt;<a href="mailto:j.glisse@gmail.com">j.glisse@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Dec 13, 2010 at 10:18 AM, Arnd Bergmann &lt;<a href="mailto:arnd@arndb.de">arnd@arndb.de</a>&gt; wrote:<br>
&gt;&gt; &gt; On Monday 13 December 2010, Jammy Zhou wrote:<br>
&gt;&gt; &gt;&gt; On Mon, Dec 13, 2010 at 4:45 AM, Linus Walleij<br>
&gt;&gt; &gt;&gt; &lt;<a href="mailto:linus.walleij@linaro.org">linus.walleij@linaro.org</a>&gt;wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt; On 11 December 2010 22:41, Arnd Bergmann &lt;<a href="mailto:arnd@arndb.de">arnd@arndb.de</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; * amd-gpu -- a single but huge driver for the GPU. As is normally the<br>
&gt;&gt; &gt;&gt; &gt;&gt;             case with GPU drivers, we can expect long discussions<br>
&gt;&gt; &gt;&gt; &gt;&gt;             before it will get considered for mainline<br>
&gt;&gt; &gt;&gt; &gt;&gt;  4 patches<br>
&gt;&gt; &gt;&gt; &gt;&gt;  98 files changed, 278321 insertions(+), 0 deletions(-)<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Just out of curiosity, following the discussion between Dave Airlie<br>
&gt;&gt; &gt;&gt; &gt; and Codeaurora this summer re GPU driver shims.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Is the AMD GPU exposing all functionality in its kernel driver or<br>
&gt;&gt; &gt;&gt; &gt; is there some userspace blob somewhere with lots of e.g. GL<br>
&gt;&gt; &gt;&gt; &gt; goodies?<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; All the functionality for the kernel driver of AMD GPU Z430/Z160 (now<br>
&gt;&gt; &gt;&gt; belongs to Qualcom) is exposed. But we need accompanied userspace<br>
&gt;&gt; &gt;&gt; library to<br>
&gt;&gt; &gt;&gt; call these functionality (buffer management, command submission, ...).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Who owns these components? If it&#39;s closed source, the only options we<br>
&gt;&gt; &gt; have are lobbying for complete release of the specs for a<br>
&gt;&gt; &gt; reimplementation<br>
&gt;&gt; &gt; or reverse-engineering the drivers, which may at least get easier with<br>
&gt;&gt; &gt; a user space driver than it would be with a kernel driver.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Until there is a solution with an open source user space part, I would<br>
&gt;&gt; &gt; suggest that the driver better be dropped from the Freescale BSP and<br>
&gt;&gt; &gt; we should at least not waste time reviewing it.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;        Arnd<br>
&gt;&gt;<br>
&gt;&gt; From a quick look it also seems that the API exposed to userspace<br>
&gt;&gt; would allow easy abuse of the GPU to access any system ram. There is a<br>
&gt;&gt; reason we do expensive command checking in the other amd gpu driver<br>
&gt;&gt; (drivers/gpu/drm/radeon/*cs.c files)<br>
&gt;<br>
&gt; No, the memory used by the GPU is reserved at boot time, so I think there is<br>
&gt; no such a problem.<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Cheers,<br>
&gt;&gt; Jerome<br>
&gt;<br>
&gt;<br>
<br>
</div></div>This isn&#39;t about what&#39;s reserved, this is about GPU capacity, if the<br>
GPU is isolated through an IOMMU and the GPU can&#39;t reprogram it then<br>
fine. But if not, then it&#39;s easy to abuse packet to reprogram the GPU<br>
GART (either by reprogramming GART register or by overwritting GART<br>
table) to point to any system ram.<br></blockquote><div><br>For non-PCI GPU in embedded world, there is no GART concept. Besides, the GPU MMU is disabled currently for some hardware problem. <br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
Cheers,<br>
<font color="#888888">Jerome<br>
</font></blockquote></div><br>