linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] iommu: handle drivers that manage iommu directly
@ 2019-07-02 20:26 Rob Clark
  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>
  0 siblings, 2 replies; 13+ messages in thread
From: Rob Clark @ 2019-07-02 20:26 UTC (permalink / raw)
  To: iommu, dri-devel
  Cc: aarch64-laptops, Jordan Crouse, Rob Clark, Abhinav Kumar,
	Andy Shevchenko, Bartosz Golaszewski, Boris Brezillon,
	Bruce Wang, Daniel Mack, Daniel Vetter,
	open list:DRM DRIVER FOR MSM ADRENO GPU, Greg Kroah-Hartman,
	Heikki Krogerus, Jeykumar Sankaran, Joe Perches, Joerg Roedel,
	Jonathan Marek, open list:DRM DRIVER FOR MSM ADRENO GPU,
	open list, Mamta Shukla, Rafael J. Wysocki, Rasmus Villemoes,
	Sean Paul, Sudeep Holla, Ulf Hansson, Vivek Gautam

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-07-24 16:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 20:26 [PATCH 0/2] iommu: handle drivers that manage iommu directly Rob Clark
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

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).