linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: iommu@lists.linux-foundation.org, dri-devel@lists.freedesktop.org
Cc: aarch64-laptops@lists.linaro.org,
	Jordan Crouse <jcrouse@codeaurora.org>,
	Rob Clark <robdclark@chromium.org>,
	Abhinav Kumar <abhinavk@codeaurora.org>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Boris Brezillon <bbrezillon@kernel.org>,
	Bruce Wang <bzwang@chromium.org>, Daniel Mack <daniel@zonque.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	freedreno@lists.freedesktop.org (open list:DRM DRIVER FOR MSM
	ADRENO GPU), Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Jeykumar Sankaran <jsanka@codeaurora.org>,
	Joe Perches <joe@perches.com>, Joerg Roedel <jroedel@suse.de>,
	Jonathan Marek <jonathan@marek.ca>,
	linux-arm-msm@vger.kernel.org (open list:DRM DRIVER FOR MSM
	ADRENO GPU), linux-kernel@vger.kernel.org (open list),
	Mamta Shukla <mamtashukla555@gmail.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Sean Paul <seanpaul@chromium.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Vivek Gautam <vivek.gautam@codeaurora.org>
Subject: [PATCH 0/2] iommu: handle drivers that manage iommu directly
Date: Tue,  2 Jul 2019 13:26:17 -0700	[thread overview]
Message-ID: <20190702202631.32148-1-robdclark@gmail.com> (raw)

From: Rob Clark <robdclark@chromium.org>

One of the challenges we need to handle to enable the aarch64 laptops
upstream is dealing with the fact that the bootloader enables the
display and takes the corresponding SMMU context-bank out of BYPASS.
Unfortunately, currently, the IOMMU framework attaches a DMA (or
potentially an IDENTITY) domain before the driver is probed and has
a chance to intervene and shutdown[1] scanout.  Which makes things go
horribly wrong.

This also happens to solve a problem that is blocking us from supporting
per-context pagetables on the GPU, due to domain that is attached before
driver has a chance to attach it's own domain for the GPU.

But since the driver is managing it's own iommu domains directly, and
does not use dev->iommu_group->default_domain at all, the simple
solution to both problems is to just avoid attaching that domain in the
first place.

[1] Eventually we want to be able to do a seemless transition from
    efifb to drm/msm... but first step is to get the core (iommu,
    clk, genpd) pieces in place, so a first step of disabling the
    display before first modeset enables us to get all of the
    dependencies outside of drm/msm in place.  And this at least
    gets us parity with windows (which also appears to do a modeset
    between bootloader and HLSO).  After that there is a bunch of
    drm/msm work that is probably not interesting to folks outside
    of dri-devel.

Rob Clark (2):
  iommu: add support for drivers that manage iommu explicitly
  drm/msm: mark devices where iommu is managed by driver

 drivers/gpu/drm/msm/adreno/adreno_device.c |  1 +
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c    |  1 +
 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c   |  1 +
 drivers/gpu/drm/msm/msm_drv.c              |  1 +
 drivers/iommu/iommu.c                      | 11 +++++++++++
 include/linux/device.h                     |  3 ++-
 6 files changed, 17 insertions(+), 1 deletion(-)

-- 
2.20.1


             reply	other threads:[~2019-07-03  1:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-02 20:26 Rob Clark [this message]
2019-07-02 20:26 ` [PATCH 2/2] drm/msm: mark devices where iommu is managed by driver Rob Clark
     [not found] ` <20190702202631.32148-2-robdclark@gmail.com>
     [not found]   ` <2d612bbc-2d2d-f718-1499-79d5a55e0d00@arm.com>
2019-07-03 14:18     ` [PATCH 1/2] iommu: add support for drivers that manage iommu explicitly Rob Clark
     [not found]   ` <20190704082001.GD6546@8bytes.org>
2019-07-04 13:51     ` Rob Clark
2019-07-10 18:28   ` [PATCH v2] " Rob Clark
2019-07-22 14:28     ` Joerg Roedel
2019-07-22 15:41       ` Rob Clark
2019-07-22 15:48         ` Joerg Roedel
2019-07-22 16:23           ` Rob Clark
2019-07-23 15:38             ` Will Deacon
2019-07-23 17:40               ` Rob Clark
2019-07-24 10:51                 ` Will Deacon
2019-07-24 16:11                   ` 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=20190702202631.32148-1-robdclark@gmail.com \
    --to=robdclark@gmail.com \
    --cc=aarch64-laptops@lists.linaro.org \
    --cc=abhinavk@codeaurora.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=bbrezillon@kernel.org \
    --cc=brgl@bgdev.pl \
    --cc=bzwang@chromium.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@zonque.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jcrouse@codeaurora.org \
    --cc=joe@perches.com \
    --cc=jonathan@marek.ca \
    --cc=jroedel@suse.de \
    --cc=jsanka@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=mamtashukla555@gmail.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robdclark@chromium.org \
    --cc=seanpaul@chromium.org \
    --cc=sudeep.holla@arm.com \
    --cc=ulf.hansson@linaro.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).