All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Rob Clark <robdclark@gmail.com>
Cc: Vivek Gautam <vivek.gautam@codeaurora.org>,
	David Airlie <airlied@linux.ie>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Tomasz Figa <tfiga@chromium.org>,
	Sean Paul <seanpaul@chromium.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	freedreno <freedreno@lists.freedesktop.org>,
	hch@lst.de, Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH v3 1/1] drm: msm: Replace dma_map_sg with dma_sync_sg*
Date: Fri, 30 Nov 2018 10:40:02 +0100	[thread overview]
Message-ID: <20181130094002.GS21184@phenom.ffwll.local> (raw)
In-Reply-To: <CAF6AEGsT9RO2RmgBTa0HQRjRUiRKy9N3vQxvD7RVWp4HpnWn+w@mail.gmail.com>

On Thu, Nov 29, 2018 at 01:57:38PM -0500, Rob Clark wrote:
> On Thu, Nov 29, 2018 at 12:24 PM Tomasz Figa <tfiga@chromium.org> wrote:
> >
> > [CC Marek]
> >
> > On Thu, Nov 29, 2018 at 9:09 AM Daniel Vetter <daniel@ffwll.ch> wrote:
> > >
> > > On Thu, Nov 29, 2018 at 5:57 PM Christoph Hellwig <hch@lst.de> wrote:
> > > >
> > > > Note that one thing I'd like to avoid is exposing these funtions directly
> > > > to drivers, as that will get us into all kinds of abuses.
> > >
> > > 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.
> >
> > i915 is a very specific case of a fully contained,
> > architecture-specific hardware subsystem, where you can just hardcode
> > all integration details inside the driver, because nobody else would
> > care.
> >
> > In ARM world, you can have the same IP blocks licensed by multiple SoC
> > vendors with different integration details and that often includes the
> > option of coherency.
> 
> fwiw, I believe all the GPU IP blocks that are used across multiple
> SoCs have their own GPU MMU (potentially in addition to an iommu?).
> So the dma-api is a much better fit for them..  drm/msm is a lot
> closer to drm/i915 scenario, so I don't so much care if the solution
> to our unique problem isn't something that would work for other
> drivers ;-)

Right now maybe, but I fully except the entire coherent vs. non-coherent
transactions hilarity that we have on the bigger intel socs since a few
years already to trickle down into smaller (arm based socs) eventually. I
think Apple is already there since a few generations.

So maybe we won't have to fight the iommu side of the dma-api anymore
on these, but we'll still have to fight the cache maintenance side of
dma-api. You can tell the dma-api to not flush, but then you don't have
any other way to actually flush that's acceptable for arch/arm (on x86 we
just run clflush in userspace and call it a day).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-11-30  9:40 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 [this message]
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
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=20181130094002.GS21184@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=hch@lst.de \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=robdclark@gmail.com \
    --cc=robin.murphy@arm.com \
    --cc=seanpaul@chromium.org \
    --cc=tfiga@chromium.org \
    --cc=vivek.gautam@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.