[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAF6AEGut7Ly3SNNHez9JTC31ORDKVS57054FshpXFM-bMygFtg@mail.gmail.com>
Date: Fri, 7 Dec 2018 09:29:42 -0500
From: Rob Clark <robdclark@...il.com>
To: hch@....de
Cc: David Airlie <airlied@...ux.ie>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Tomasz Figa <tfiga@...omium.org>,
Sean Paul <seanpaul@...omium.org>,
Vivek Gautam <vivek.gautam@...eaurora.org>,
freedreno <freedreno@...ts.freedesktop.org>,
Robin Murphy <robin.murphy@....com>
Subject: Re: [PATCH v3 1/1] drm: msm: Replace dma_map_sg with dma_sync_sg*
On Thu, Dec 6, 2018 at 8:38 PM Christoph Hellwig <hch@....de> wrote:
>
> On Fri, Nov 30, 2018 at 10:46:04AM +0100, Daniel Vetter wrote:
> > > Being able to dip into CMA and maybe iommu coalescing if we want to
> > > get fancy is indeed the only reason for this API. If we just wanted
> > > to map pages we could already do that now with just a little bit
> > > of boilerplate code (and quite a few drivers do - just adding this
> > > new API will remove tons of code).
> >
> > Sounds like the future is very bright indeed \o/
>
> So, I spent some time with this and instead of a new API I think
> it makes sure we have DMA_ATTR_NON_CONSISTENT consistently available
> and with well defined semantics, that is virt_to_page on the return
> value works, it is contiguos and we can use dma_sync_single_for_cpu
> and dma_sync_single_for_device for ownership tranfers.
>
> Can you graphics folks check if this:
>
> http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dma-noncoherent-allocator
>
> is something to work with? Especially to get rid of the horrible
> dma_get_sgtable hacks?
I'm not sure I really have strong opinion about this. For some of the
display-only SoC drm drivers which use the CMA helpers, it might be
useful.
For the drm drivers for real GPUs, we aren't really using the dma api
to allocate in the first place. (And the direction is towards more
support for userptr allocations)
BR,
-R
Powered by blists - more mailing lists