From: Rob Clark <robdclark@gmail.com>
To: hch@lst.de
Cc: Daniel Vetter <daniel@ffwll.ch>, 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>,
Vivek Gautam <vivek.gautam@codeaurora.org>,
freedreno <freedreno@lists.freedesktop.org>,
Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH v3 1/1] drm: msm: Replace dma_map_sg with dma_sync_sg*
Date: Thu, 29 Nov 2018 20:15:23 -0500 [thread overview]
Message-ID: <CAF6AEGsS6LnuoL9+_LsKLOWxKF6P0nTrxs7b0j0Kqnqz6tmocw@mail.gmail.com> (raw)
In-Reply-To: <20181129155758.GC26537@lst.de>
On Thu, Nov 29, 2018 at 10:57 AM Christoph Hellwig <hch@lst.de> wrote:
>
> On Thu, Nov 29, 2018 at 03:43:50PM +0100, Daniel Vetter wrote:
> > Yeah we had patches to add manual cache management code to drm, so we
> > don't have to abuse the dma streaming api anymore. Got shouted down.
> > Abusing the dma streaming api also gets shouted down. It's a gpu, any
> > idea of these drivers actually being platform independent is out of
> > the window from the start anyway, so we're ok with tying this to
> > platforms.
>
> Manual or not the iommu API is missing APIs for cache management,
> which makes it kinda surprising it actually ever worked for non-coherent
> devices.
>
> And fortunately while some people spent the last year ot two bickering
> about the situation others actually did work, and we now have a
> generic arch_sync_dma_for_device/arch_sync_dma_for_cpu kernel-internal
> API. This is only used for DMA API internals so far, and explicitly
> not intended for direct driver use, but it would be perfect as the
> backend for iommu API cache maintainance functions. It exists on all
> but two architectures on mainline. Out of those powerpc is in the works,
> only arm32 will need some major help.
oh, hmm, I realized I'd been looking still at the armv7 dma-mapping, I
hadn't noticed arch_sync_* yet.. that does look like a step in the
right direction.
As far as hiding cache ops behind iommu layer, I guess I'd been
thinking more of just letting the drivers that want to bypass dma
layer take things into their own hands.. tbh I think/assume/hope
drm/msm is more the exception than the rule as far as needing to
bypass the dma layer. Or at least I guess the # of drivers having
problems w/ the dma layer is less than the # of iommu drivers.
(Not sure if that changes my thoughts on this patch, it isn't like
what this patch replaces isn't also a problematic hack around the
inability to bypass the dma layer. In the short term I just want
*something* that works, I'm totally happy to refactor later when there
are better options.)
BR,
-R
next prev parent reply other threads:[~2018-11-30 1:15 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
2018-11-29 14:42 ` Rob Clark
2018-11-29 15:54 ` Christoph Hellwig
2018-11-29 18:48 ` Rob Clark
2018-11-29 19:40 ` Jordan Crouse
2018-11-29 19:57 ` Tomasz Figa
2018-11-29 20:03 ` Robin Murphy
2018-11-30 0:23 ` Tomasz Figa
2018-12-01 2:05 ` Tomasz Figa
2018-12-01 11:46 ` Rob Clark
2018-12-03 0:12 ` Tomasz Figa
2018-11-29 14:43 ` Daniel Vetter
2018-11-29 15:57 ` Christoph Hellwig
2018-11-29 16:28 ` Daniel Vetter
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
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
2018-11-30 9:46 ` Daniel Vetter
2018-12-07 1:38 ` Christoph Hellwig
2018-12-07 14:29 ` Rob Clark
2018-11-29 17:33 ` Brian Starkey
2018-11-29 18:35 ` Christoph Hellwig
2018-11-30 1:15 ` Rob Clark [this message]
2018-11-30 9:35 ` Christoph Hellwig
2018-11-29 15:53 ` Christoph Hellwig
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=CAF6AEGsS6LnuoL9+_LsKLOWxKF6P0nTrxs7b0j0Kqnqz6tmocw@mail.gmail.com \
--to=robdclark@gmail.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--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=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 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).