Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>
To: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
Cc: vivek.gautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	Dave Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
	linux-arm-msm
	<linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Linux Kernel Mailing List
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	dri-devel
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	Tomasz Figa <tfiga-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	"Clark, Rob" <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>,
	freedreno
	<freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
Subject: Re: [PATCH v3 1/1] drm: msm: Replace dma_map_sg with dma_sync_sg*
Date: Fri, 30 Nov 2018 10:46:04 +0100	[thread overview]
Message-ID: <20181130094604.GV21184@phenom.ffwll.local> (raw)
In-Reply-To: <20181129183334.GB30281-jcswGhMUV9g@public.gmane.org>

On Thu, Nov 29, 2018 at 07:33:34PM +0100, Christoph Hellwig wrote:
> On Thu, Nov 29, 2018 at 06:09:05PM +0100, Daniel Vetter wrote:
> > What kind of abuse do you expect? It could very well be that gpu folks
> > call that "standard use case" ... At least on x86 with the i915 driver
> > we pretty much rely on architectural guarantees for how cache flushes
> > work very much. Down to userspace doing the cache flushing for
> > mappings the kernel has set up.
> 
> Mostly the usual bypasses of the DMA API because people know better
> (and with that I don't mean low-level IOMMU API users, but "creative"
> direct mappings).

Ah yes. I think that even gpu folks get behind :-) Best if someone
bothered to explicitly cast to dma_addr_t to shut up the tools, but not
fix the bug ...

> > > As for the buffer sharing: at least for the DMA API side I want to
> > > move the current buffer sharing users away from dma_alloc_coherent
> > > (and coherent dma_alloc_attrs users) and the remapping done in there
> > > required for non-coherent architectures.  Instead I'd like to allocate
> > > plain old pages, and then just dma map them for each device separately,
> > > with DMA_ATTR_SKIP_CPU_SYNC passed for all but the first user to map
> > > or last user to unmap.  On the iommu side it could probably work
> > > similar.
> > 
> > I think this is what's often done. Except then there's also the issue
> > of how to get at the cma allocator if your device needs something
> > contiguous. There's a lot of that still going on in graphics/media.
> 
> Being able to dip into CMA and mayb 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/
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

  parent reply	other threads:[~2018-11-30  9:46 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29 14:03 [PATCH v3 1/1] drm: msm: Replace dma_map_sg with dma_sync_sg* Vivek Gautam
2018-11-29 14:14 ` Christoph Hellwig
2018-11-29 14:25   ` Rob Clark
     [not found]     ` <CAF6AEGvsFbXGkC+=4oq1xXnoC2EVX2J0k-GqShefcek1=uw4Lw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-11-29 14:42       ` Rob Clark
2018-11-29 15:54         ` Christoph Hellwig
     [not found]           ` <20181129155418.GB26537-jcswGhMUV9g@public.gmane.org>
2018-11-29 18:48             ` Rob Clark
     [not found]               ` <CAF6AEGufdp5jRtUZ_+VRQg3ZXH36hNHvbWZQeJDArp8N5SZ3Lg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-11-29 19:40                 ` Jordan Crouse
2018-11-29 19:57                   ` Tomasz Figa
     [not found]                     ` <CAAFQd5D139pNx9aEpO8745R4kfVYCBDyqyJNR_HDDXvKt7NZjw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-11-29 20:03                       ` Robin Murphy
2018-11-30  0:23                         ` Tomasz Figa
2018-12-01  2:05                           ` Tomasz Figa
     [not found]                             ` <CAAFQd5DMgGDPcK=4DktfC7T9O0MrU1VBqJqR+6VYpOh_DdEXUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-12-01 11:46                               ` Rob Clark
     [not found]                                 ` <CAF6AEGujyP78PjOMwTmdHcJKpsrgmRGage=pFniad98peMBrDw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-12-03  0:12                                   ` Tomasz Figa
2018-11-29 14:43       ` Daniel Vetter
2018-11-29 15:57         ` Christoph Hellwig
     [not found]           ` <20181129155758.GC26537-jcswGhMUV9g@public.gmane.org>
2018-11-29 16:28             ` Daniel Vetter
     [not found]               ` <20181129162807.GL21184-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-11-29 16:57                 ` Christoph Hellwig
2018-11-29 17:09                   ` Daniel Vetter
2018-11-29 17:24                     ` Tomasz Figa
2018-11-29 18:35                       ` Christoph Hellwig
     [not found]                       ` <CAAFQd5A-Bh711VaNWhRJqcrofkBVCMFcNgqfztoyWJcUdhSu0Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-11-29 18:57                         ` Rob Clark
2018-11-30  9:40                           ` Daniel Vetter
2018-11-30  9:35                       ` Daniel Vetter
2018-11-30  9:44                         ` Christoph Hellwig
2018-11-29 18:33                     ` Christoph Hellwig
     [not found]                       ` <20181129183334.GB30281-jcswGhMUV9g@public.gmane.org>
2018-11-30  9:46                         ` Daniel Vetter [this message]
2018-12-07  1:38                           ` Christoph Hellwig
     [not found]                             ` <20181207013841.GA4530-jcswGhMUV9g@public.gmane.org>
2018-12-07 14:29                               ` Rob Clark
2018-11-29 17:33                   ` Brian Starkey
     [not found]                     ` <20181129173301.rye77slpy27regi5-cyTpl0DnfLAx1Goa8x4jbQH0AcctZ4a01BehtkLrGTY@public.gmane.org>
2018-11-29 18:35                       ` Christoph Hellwig
2018-11-30  1:15             ` Rob Clark
2018-11-30  9:35               ` Christoph Hellwig
2018-11-29 15:53     ` Christoph Hellwig
     [not found]       ` <20181129155310.GA26537-jcswGhMUV9g@public.gmane.org>
2018-11-29 18:44         ` Rob Clark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181130094604.GV21184@phenom.ffwll.local \
    --to=daniel-/w4ywyx8dfk@public.gmane.org \
    --cc=airlied-cv59FeDIM0c@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=hch-jcswGhMUV9g@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=robin.murphy-5wv7dgnIgG8@public.gmane.org \
    --cc=seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=tfiga-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=vivek.gautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox