linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jordan Crouse <jcrouse@codeaurora.org>
To: Rob Clark <robdclark@gmail.com>
Cc: hch@lst.de, Vivek Gautam <vivek.gautam@codeaurora.org>,
	David Airlie <airlied@linux.ie>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	freedreno <freedreno@lists.freedesktop.org>,
	Tomasz Figa <tfiga@chromium.org>,
	Archit Taneja <architt@codeaurora.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Sean Paul <seanpaul@chromium.org>
Subject: Re: [PATCH v3 1/1] drm: msm: Replace dma_map_sg with dma_sync_sg*
Date: Thu, 29 Nov 2018 12:40:29 -0700	[thread overview]
Message-ID: <20181129194029.GE17663@jcrouse-lnx.qualcomm.com> (raw)
In-Reply-To: <CAF6AEGufdp5jRtUZ_+VRQg3ZXH36hNHvbWZQeJDArp8N5SZ3Lg@mail.gmail.com>

On Thu, Nov 29, 2018 at 01:48:15PM -0500, Rob Clark wrote:
> On Thu, Nov 29, 2018 at 10:54 AM Christoph Hellwig <hch@lst.de> wrote:
> >
> > On Thu, Nov 29, 2018 at 09:42:50AM -0500, Rob Clark wrote:
> > > Maybe the thing we need to do is just implement a blacklist of
> > > compatible strings for devices which should skip the automatic
> > > iommu/dma hookup.  Maybe a bit ugly, but it would also solve a problem
> > > preventing us from enabling per-process pagetables for a5xx (where we
> > > need to control the domain/context-bank that is allocated by the dma
> > > api).
> >
> > You can detach from the dma map attachment using arm_iommu_detach_device,
> > which a few drm drivers do, but I don't think this is the problem.
> 
> I think even with detach, we wouldn't end up with the context-bank
> that the gpu firmware was hard-coded to expect, and so it would
> overwrite the incorrect page table address register.  (I could be
> mis-remembering that, Jordan spent more time looking at that.  But it
> was something along those lines.)

Right - basically the DMA domain steals context bank 0 and the GPU is hard coded
to use that context bank for pagetable switching.

I believe the Tegra guys also had a similar problem with a hard coded context
bank.

This is a discussion we do need to have but not at the risk of derailing the
caching discussion which is arguably more important and has much wider ranging
implications for multimedia and Ion and such.

Jordan

-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2018-11-29 19: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
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 [this message]
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
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=20181129194029.GE17663@jcrouse-lnx.qualcomm.com \
    --to=jcrouse@codeaurora.org \
    --cc=airlied@linux.ie \
    --cc=architt@codeaurora.org \
    --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=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 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).