<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On 4 Jul. 2017 11:23, "Michel Dänzer" <<a href="mailto:michel@daenzer.net">michel@daenzer.net</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Adding the dri-devel list, since this is a core DRM patch.<br>
<div class="elided-text"><br>
<br>
On 04/07/17 06:11 AM, Felix Kuehling wrote:<br>
> From: Christian König <<a href="mailto:christian.koenig@amd.com">christian.koenig@amd.com</a>><br>
><br>
> This allows drivers to check if a DMA-buf contains a GEM object or not.<br></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Please use an accessor function. I doubt it'll be a fast path.</div><div dir="auto"><br></div><div dir="auto">Dave.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="elided-text">
><br>
> Signed-off-by: Christian König <<a href="mailto:christian.koenig@amd.com">christian.koenig@amd.com</a>><br>
> Reviewed-by: Felix Kuehling <<a href="mailto:Felix.Kuehling@amd.com">Felix.Kuehling@amd.com</a>><br>
> ---<br>
> drivers/gpu/drm/drm_prime.c | 3 ++-<br>
> include/drm/drmP.h | 2 ++<br>
> 2 files changed, 4 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c<br>
> index 25aa455..5cb4fd9 100644<br>
> --- a/drivers/gpu/drm/drm_prime.c<br>
> +++ b/drivers/gpu/drm/drm_prime.c<br>
> @@ -396,7 +396,7 @@ static int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf,<br>
> return dev->driver->gem_prime_mmap(<wbr>obj, vma);<br>
> }<br>
><br>
> -static const struct dma_buf_ops drm_gem_prime_dmabuf_ops = {<br>
> +const struct dma_buf_ops drm_gem_prime_dmabuf_ops = {<br>
> .attach = drm_gem_map_attach,<br>
> .detach = drm_gem_map_detach,<br>
> .map_dma_buf = drm_gem_map_dma_buf,<br>
> @@ -410,6 +410,7 @@ static int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf,<br>
> .vmap = drm_gem_dmabuf_vmap,<br>
> .vunmap = drm_gem_dmabuf_vunmap,<br>
> };<br>
> +EXPORT_SYMBOL(drm_gem_prime_<wbr>dmabuf_ops);<br>
><br>
> /**<br>
> * DOC: PRIME Helpers<br>
> diff --git a/include/drm/drmP.h b/include/drm/drmP.h<br>
> index 6105c05..e0ea8f8 100644<br>
> --- a/include/drm/drmP.h<br>
> +++ b/include/drm/drmP.h<br>
> @@ -761,6 +761,8 @@ static inline int drm_debugfs_remove_files(const struct drm_info_list *files,<br>
><br>
> struct dma_buf_export_info;<br>
><br>
> +extern const struct dma_buf_ops drm_gem_prime_dmabuf_ops;<br>
> +<br>
> extern struct dma_buf *drm_gem_prime_export(struct drm_device *dev,<br>
> struct drm_gem_object *obj,<br>
> int flags);<br>
><br>
<br>
<br>
--<br>
</div>Earthling Michel Dänzer | <a href="http://www.amd.com" rel="noreferrer" target="_blank">http://www.amd.com</a><br>
Libre software enthusiast | Mesa and X developer<br>
______________________________<wbr>_________________<br>
dri-devel mailing list<br>
<a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.<wbr>org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/dri-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/dri-devel</a><br>
</blockquote></div><br></div></div></div>