linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2] drm/exynos: use prime helpers
       [not found]   ` <CAAQKjZOomB2TkKtgZpS0DHM=vOzozWM-6AaztuWPMnxDXZx6Rg@mail.gmail.com>
@ 2012-12-07  8:11     ` Daniel Vetter
  2012-12-07 17:48     ` Aaron Plattner
  1 sibling, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2012-12-07  8:11 UTC (permalink / raw)
  To: Inki Dae
  Cc: Aaron Plattner, Tomasz Stanislawski, Seung-Woo Kim, dri-devel,
	Kyungmin Park, Laurent Pinchart, linux-media

On Fri, Dec 7, 2012 at 7:36 AM, Inki Dae <inki.dae@samsung.com> wrote:
> Thus, I'm not sure that your common set could cover all the cases including
> other frameworks. Please give me any opinions.

I don't think that's required - as long as it is fairly useable by
many drivers a helper library is good enough. And since it's no
midlayer there's no requirement to use it, you're always free to do
your own special sauce in your driver. But I think the current rfc
could be made a bit more flexible so that more drivers could use at
least parts of it, see my other mail.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] drm/exynos: use prime helpers
       [not found]   ` <CAAQKjZOomB2TkKtgZpS0DHM=vOzozWM-6AaztuWPMnxDXZx6Rg@mail.gmail.com>
  2012-12-07  8:11     ` [PATCH v2] drm/exynos: use prime helpers Daniel Vetter
@ 2012-12-07 17:48     ` Aaron Plattner
  1 sibling, 0 replies; 2+ messages in thread
From: Aaron Plattner @ 2012-12-07 17:48 UTC (permalink / raw)
  To: Inki Dae
  Cc: dri-devel@lists.freedesktop.org, Jerome Glisse, David Airlie,
	Joonyoung Shim, Seung-Woo Kim, Kyungmin Park, Laurent Pinchart,
	Tomasz Stanislawski, linux-media@vger.kernel.org

On 12/06/2012 10:36 PM, Inki Dae wrote:
>
> Hi,
>
> CCing media guys.
>
> I agree with you but we should consider one issue released to v4l2.
>
> As you may know, V4L2-based driver uses vb2 as buffer manager and the
> vb2 includes dmabuf feature>(import and export) And v4l2 uses streaming
> concept>(qbuf and dqbuf)
> With dmabuf and iommu, generally qbuf imports a fd into its own buffer
> and maps it with its own iommu table calling dma_buf_map_attachment().
> And dqbuf calls dma_buf_unmap_attachment() to unmap that buffer from its
> own iommu table.
> But now vb2's unmap_dma_buf callback is nothing to do. I think that the
> reason is the below issue,
>
> If qbuf maps buffer with iomm table and dqbuf unmaps it from iommu table
> then it has performance deterioration because qbuf and dqbuf are called
> repeatedly.
> And this means map/unmap are repeated also. So I think media guys moved
> dma_unmap_sg call from its own unmap_dma_buf callback to detach callback
> instead.
> For this, you can refer to vb2_dc_dmabuf_ops_unmap and
> vb2_dc_dmabuf_ops_detach function.
>
> So I added the below patch to avoid that performance deterioration and
> am testing it now.(this patch is derived from videobuf2-dma-contig.c)
> http://git.kernel.org/?p=linux/kernel/git/daeinki/drm-exynos.git;a=commit;h=576b1c3de8b90cf1570b8418b60afd1edaae4e30
>
> Thus, I'm not sure that your common set could cover all the cases
> including other frameworks. Please give me any opinions.

It seems like this adjustment would make perfect sense to add to the 
helper layer I suggested.  E.g., instead of having an exynos_attach 
structure that caches the sgt, there'd be a struct drm_gem_prime_attach 
that would do the same thing, and save the sgt it gets from 
driver->gem_prime_get_sg.  Then it would benefit nouveau and radeon, too.

Alternatively, patch #4 could be dropped and Exynos can continue to 
reimplement all of this core functionality, since the helpers are 
optional, but I don't see anything about this change that should make it 
Exynos-specific, unless I'm missing something.

--
Aaron

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-07 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1354817271-5121-5-git-send-email-aplattner@nvidia.com>
     [not found] ` <1354819712-7019-1-git-send-email-aplattner@nvidia.com>
     [not found]   ` <CAAQKjZOomB2TkKtgZpS0DHM=vOzozWM-6AaztuWPMnxDXZx6Rg@mail.gmail.com>
2012-12-07  8:11     ` [PATCH v2] drm/exynos: use prime helpers Daniel Vetter
2012-12-07 17:48     ` Aaron Plattner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).