<font face="courier new,monospace">Hi Dave, Daniel, Rob,</font><div><font face="courier new,monospace"><br></font></div><div><div class="gmail_quote">On Sun, Nov 27, 2011 at 12:29 PM, Rob Clark <span dir="ltr">&lt;<a href="mailto:robdclark@gmail.com">robdclark@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Sat, Nov 26, 2011 at 8:00 AM, Daniel Vetter &lt;<a href="mailto:daniel@ffwll.ch">daniel@ffwll.ch</a>&gt; wrote:<br>


&gt; On Fri, Nov 25, 2011 at 17:28, Dave Airlie &lt;<a href="mailto:airlied@gmail.com">airlied@gmail.com</a>&gt; wrote:<br>
&gt;&gt; I&#39;ve rebuilt my PRIME interface on top of dmabuf to see how it would work,<br>
&gt;&gt;<br>
&gt;&gt; I&#39;ve got primed gears running again on top, but I expect all my object<br>
&gt;&gt; lifetime and memory ownership rules need fixing up (i.e. leaks like a<br>
&gt;&gt; sieve).<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://cgit.freedesktop.org/~airlied/linux/log/?h=drm-prime-dmabuf" target="_blank">http://cgit.freedesktop.org/~airlied/linux/log/?h=drm-prime-dmabuf</a><br>
&gt;&gt;<br>
&gt;&gt; has the i915/nouveau patches for the kernel to produce the prime interface.<br>
&gt;<br>
&gt; I&#39;ve noticed that your implementations for get_scatterlist (at least<br>
&gt; for the i915 driver) doesn&#39;t return the sg table mapped into the<br>
&gt; device address space. I&#39;ve checked and the documentation makes it<br>
&gt; clear that this should be the case (and we really need this to support<br>
&gt; certain insane hw), but the get/put_scatterlist names are a bit<br>
&gt; misleading. Proposal:<br>
&gt;<br>
&gt; - use struct sg_table instead of scatterlist like you&#39;ve already done<br>
&gt; in you branch. Simply more consistent with the dma api.<br>
<br>
</div>yup<br>
<div class="im"><br>
&gt; - rename get/put_scatterlist into map/unmap for consistency with all<br>
&gt; the map/unmap dma api functions. The attachement would then serve as<br>
&gt; the abstract cookie to the backing storage, similar to how struct page<br>
&gt; * works as an abstract cookie for dma_map/unmap_page. The only special<br>
&gt; thing is that struct device * parameter because that&#39;s already part of<br>
&gt; the attachment.<br>
<br>
</div>yup<br>
<div class="im"><br>
&gt; - add new wrapper functions dma_buf_map_attachment and<br>
&gt; dma_buf_unmap_attachement to hide all the pointer/vtable-chasing that<br>
&gt; we currently expose to users of this interface.<br>
<br>
</div>I thought that was one of the earlier comments on the initial dmabuf<br>
patch, but either way: yup<br></blockquote><div>Thanks for your comments; I will incorporate all of these in the next version I&#39;ll send out. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


<br>
BR,<br>
-R<br></blockquote><div>BR,</div><div>Sumit. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im HOEnZb"><br>
&gt; Comments?<br>
&gt;<br>
&gt; Cheers, Daniel<br>
&gt; --<br>
&gt; Daniel Vetter<br>
&gt; <a href="mailto:daniel.vetter@ffwll.ch">daniel.vetter@ffwll.ch</a> - +41 (0) 79 364 57 48 - <a href="http://blog.ffwll.ch" target="_blank">http://blog.ffwll.ch</a><br>
</div><div class="HOEnZb"><div class="h5">&gt; --<br>
&gt; To unsubscribe from this list: send the line &quot;unsubscribe linux-media&quot; in<br>
&gt; the body of a message to <a href="mailto:majordomo@vger.kernel.org">majordomo@vger.kernel.org</a><br>
&gt; More majordomo info at  <a href="http://vger.kernel.org/majordomo-info.html" target="_blank">http://vger.kernel.org/majordomo-info.html</a><br>
&gt;<br>
</div></div></blockquote></div><br></div>