[PATCH v17 07/20] drm/msm: Set the global virtual address range from the IOMMU domain

2020-09-05 Thread Rob Clark
From: Jordan Crouse Use the aperture settings from the IOMMU domain to set up the virtual address range for the GPU. This allows us to transparently deal with IOMMU side features (like split pagetables). Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson

[PATCH v17 12/20] iommu/arm-smmu: Pass io-pgtable config to implementation specific function

2020-09-05 Thread Rob Clark
From: Jordan Crouse Construct the io-pgtable config before calling the implementation specific init_context function and pass it so the implementation specific function can get a chance to change it before the io-pgtable is created. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark

[PATCH v17 06/20] drm/msm: Drop context arg to gpu->submit()

2020-09-05 Thread Rob Clark
From: Jordan Crouse Now that we can get the ctx from the submitqueue, the extra arg is redundant. Signed-off-by: Jordan Crouse [split out of previous patch to reduce churny noise] Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 12

[PATCH v17 14/20] iommu/arm-smmu: Prepare for the adreno-smmu implementation

2020-09-05 Thread Rob Clark
of the existing hooks to pass more information that the implementation will need. These modifications will be used by the upcoming Adreno SMMU implementation to identify the GPU device and properly configure it for pagetable switching. Co-developed-by: Rob Clark Signed-off-by: Jordan Crouse

[PATCH v17 02/20] drm/msm: Add private interface for adreno-smmu

2020-09-05 Thread Rob Clark
From: Rob Clark This interface will be used for drm/msm to coordinate with the qcom_adreno_smmu_impl to enable/disable TTBR0 translation. Once TTBR0 translation is enabled, the GPU's CP (Command Processor) will directly switch TTBR0 pgtables (and do the necessary TLB inv) synchronized

[PATCH v17 00/20] iommu/arm-smmu + drm/msm: per-process GPU pgtables

2020-09-05 Thread Rob Clark
From: Rob Clark NOTE: I have re-ordered the series, and propose that we could merge this series in the following order: 1) 01-11 - merge via drm / msm-next 2) 12-15 - merge via iommu, no dependency on msm-next pull req 3) 16-18 - patch 16 has a dependency on 02 and 04

[PATCH v17 01/20] drm/msm: Remove dangling submitqueue references

2020-09-05 Thread Rob Clark
From: Rob Clark Currently it doesn't matter, since we free the ctx immediately. But when we start refcnt'ing the ctx, we don't want old dangling list entries to hang around. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm

[PATCH v17 03/20] drm/msm/gpu: Add dev_to_gpu() helper

2020-09-05 Thread Rob Clark
From: Rob Clark In a later patch, the drvdata will not directly be 'struct msm_gpu *', so add a helper to reduce the churn. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm/adreno/adreno_device.c | 10 -- drivers/gpu/drm/msm

Re: [PATCH v16 14/20] iommu/arm-smmu: Prepare for the adreno-smmu implementation

2020-09-05 Thread Rob Clark
On Fri, Sep 4, 2020 at 9:00 AM Bjorn Andersson wrote: > > On Tue 01 Sep 11:46 CDT 2020, Rob Clark wrote: > > > From: Jordan Crouse > > > > Do a bit of prep work to add the upcoming adreno-smmu implementation. > > > > Add an hook to allow the imple

Re: [PATCH 00/20] iommu/arm-smmu + drm/msm: per-process GPU pgtables

2020-09-04 Thread Rob Clark
On Fri, Sep 4, 2020 at 2:11 AM Joerg Roedel wrote: > > On Mon, Aug 17, 2020 at 03:01:25PM -0700, Rob Clark wrote: > > Jordan Crouse (12): > > iommu/arm-smmu: Pass io-pgtable config to implementation specific > > function > > iommu/arm-smmu: Add support for sp

Re: [PATCH 0/3] drm/msm: More GPU tracepoints

2020-09-02 Thread Rob Clark
useful to > all drivers? > > Thanks, > > Tomeu > > On Tue, 1 Sep 2020 at 17:41, Rob Clark wrote: >> >> From: Rob Clark >> >> Various extra tracepoints that I've been collecting. >> >> Rob Clark (3): >> drm/msm/gpu: Add GPU freq_change

Re: [PATCH v9 12/32] drm: msm: fix common struct sg_table related issues

2020-09-01 Thread Rob Clark
apping wrappers operating > > directly on the struct sg_table objects and use scatterlist page > > iterators where possible. This, almost always, hides references to the > > nents and orig_nents entries, making the code robust, easier to follow > > and copy/paste safe. > &g

[PATCH v16 16/20] iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU

2020-09-01 Thread Rob Clark
it context bank 0 so the GPU hardware can implement per-instance pagetables. Co-developed-by: Rob Clark Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 + drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 149

[PATCH v16 14/20] iommu/arm-smmu: Prepare for the adreno-smmu implementation

2020-09-01 Thread Rob Clark
of the existing hooks to pass more information that the implementation will need. These modifications will be used by the upcoming Adreno SMMU implementation to identify the GPU device and properly configure it for pagetable switching. Co-developed-by: Rob Clark Signed-off-by: Jordan Crouse

[PATCH v16 06/20] drm/msm: Drop context arg to gpu->submit()

2020-09-01 Thread Rob Clark
From: Jordan Crouse Now that we can get the ctx from the submitqueue, the extra arg is redundant. Signed-off-by: Jordan Crouse [split out of previous patch to reduce churny noise] Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 12

[PATCH v16 20/20] arm: dts: qcom: sc7180: Set the compatible string for the GPU SMMU

2020-09-01 Thread Rob Clark
From: Rob Clark Set the qcom,adreno-smmu compatible string for the GPU SMMU to enable split pagetables and per-instance pagetables for drm/msm. Signed-off-by: Rob Clark --- arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot

[PATCH v16 19/20] arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU

2020-09-01 Thread Rob Clark
From: Jordan Crouse Set the qcom,adreno-smmu compatible string for the GPU SMMU to enable split pagetables and per-instance pagetables for drm/msm. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark --- arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 9 + arch/arm64/boot/dts/qcom

[PATCH v16 18/20] dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU

2020-09-01 Thread Rob Clark
implementation specific code. Signed-off-by: Jordan Crouse Reviewed-by: Rob Herring Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree

[PATCH v16 12/20] iommu/arm-smmu: Pass io-pgtable config to implementation specific function

2020-09-01 Thread Rob Clark
From: Jordan Crouse Construct the io-pgtable config before calling the implementation specific init_context function and pass it so the implementation specific function can get a chance to change it before the io-pgtable is created. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark

[PATCH v16 10/20] drm/msm/a6xx: Add support for per-instance pagetables

2020-09-01 Thread Rob Clark
From: Jordan Crouse Add support for using per-instance pagetables if all the dependencies are available. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Akhil P Oommen --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 63 +++ drivers/gpu/drm/msm/adreno

[PATCH v16 07/20] drm/msm: Set the global virtual address range from the IOMMU domain

2020-09-01 Thread Rob Clark
From: Jordan Crouse Use the aperture settings from the IOMMU domain to set up the virtual address range for the GPU. This allows us to transparently deal with IOMMU side features (like split pagetables). Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson

[PATCH v16 15/20] iommu/arm-smmu: Constify some helpers

2020-09-01 Thread Rob Clark
From: Rob Clark Sprinkle a few `const`s where helpers don't need write access. Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- drivers/iommu/arm/arm-smmu/arm-smmu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.h b

[PATCH v16 11/20] drm/msm: Show process names in gem_describe

2020-09-01 Thread Rob Clark
From: Rob Clark In $debugfs/gem we already show any vma(s) associated with an object. Also show process names if the vma's address space is a per-process address space. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm/msm_drv.c

[PATCH v16 08/20] drm/msm: Add support to create a local pagetable

2020-09-01 Thread Rob Clark
-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/msm/msm_gpummu.c | 2 +- drivers/gpu/drm/msm/msm_iommu.c | 199 ++- drivers/gpu/drm/msm/msm_mmu.h| 16 ++- 4 files changed, 215 insertions(+), 3

[PATCH v16 02/20] drm/msm: Add private interface for adreno-smmu

2020-09-01 Thread Rob Clark
From: Rob Clark This interface will be used for drm/msm to coordinate with the qcom_adreno_smmu_impl to enable/disable TTBR0 translation. Once TTBR0 translation is enabled, the GPU's CP (Command Processor) will directly switch TTBR0 pgtables (and do the necessary TLB inv) synchronized

[PATCH v16 17/20] iommu/arm-smmu: Add a way for implementations to influence SCTLR

2020-09-01 Thread Rob Clark
From: Rob Clark For the Adreno GPU's SMMU, we want SCTLR.HUPCF set to ensure that pending translations are not terminated on iova fault. Otherwise a terminated CP read could hang the GPU by returning invalid command-stream data. Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson

[PATCH v16 13/20] iommu/arm-smmu: Add support for split pagetables

2020-09-01 Thread Rob Clark
From: Jordan Crouse Enable TTBR1 for a context bank if IO_PGTABLE_QUIRK_ARM_TTBR1 is selected by the io-pgtable configuration. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 19 +++ drivers/iommu

[PATCH v16 09/20] drm/msm: Add support for private address space instances

2020-09-01 Thread Rob Clark
Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm/msm_drv.c | 13 +++-- drivers/gpu/drm/msm/msm_drv.h | 5 + drivers/gpu/drm/msm/msm_gem_vma.c | 9 + drivers/gpu/drm/msm/msm_gpu.c | 22 ++ drivers/gpu/drm/msm/msm_gpu.h

[PATCH v16 04/20] drm/msm: Set adreno_smmu as gpu's drvdata

2020-09-01 Thread Rob Clark
From: Rob Clark This will be populated by adreno-smmu, to provide a way for coordinating enabling/disabling TTBR0 translation. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm/adreno/adreno_device.c | 2 -- drivers/gpu/drm/msm

[PATCH v16 05/20] drm/msm: Add a context pointer to the submitqueue

2020-09-01 Thread Rob Clark
From: Jordan Crouse Each submitqueue is attached to a context. Add a pointer to the context to the submitqueue at create time and refcount it so that it stays around through the life of the queue. Co-developed-by: Rob Clark Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed

[PATCH v16 00/20] iommu/arm-smmu + drm/msm: per-process GPU pgtables

2020-09-01 Thread Rob Clark
From: Rob Clark NOTE: I have re-ordered the series, and propose that we could merge this series in the following order: 1) 01-11 - merge via drm / msm-next 2) 12-15 - merge via iommu, no dependency on msm-next pull req 3) 16-18 - patch 16 has a dependency on 02 and 04

[PATCH v16 03/20] drm/msm/gpu: Add dev_to_gpu() helper

2020-09-01 Thread Rob Clark
From: Rob Clark In a later patch, the drvdata will not directly be 'struct msm_gpu *', so add a helper to reduce the churn. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm/adreno/adreno_device.c | 10 -- drivers/gpu/drm/msm

[PATCH v16 01/20] drm/msm: Remove dangling submitqueue references

2020-09-01 Thread Rob Clark
From: Rob Clark Currently it doesn't matter, since we free the ctx immediately. But when we start refcnt'ing the ctx, we don't want old dangling list entries to hang around. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm

[PATCH 0/3] drm/msm: More GPU tracepoints

2020-09-01 Thread Rob Clark
From: Rob Clark Various extra tracepoints that I've been collecting. Rob Clark (3): drm/msm/gpu: Add GPU freq_change traces drm/msm: Convert shrinker msgs to tracepoints drm/msm/gpu: Add suspend/resume tracepoints drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 3 + drivers/gpu/drm/msm/adreno

[PATCH 2/3] drm/msm: Convert shrinker msgs to tracepoints

2020-09-01 Thread Rob Clark
From: Rob Clark This reduces the spam in dmesg when we start hitting the shrinker, and replaces it with something we can put on a timeline while profiling or debugging system issues. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_shrinker.c | 5 +++-- drivers/gpu/drm/msm

[PATCH 1/3] drm/msm/gpu: Add GPU freq_change traces

2020-09-01 Thread Rob Clark
From: Rob Clark Technically the GMU specific one is a bit redundant, but it was useful to track down a bug. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 3 +++ drivers/gpu/drm/msm/msm_gpu.c | 2 ++ drivers/gpu/drm/msm/msm_gpu_trace.h | 31

[PATCH 3/3] drm/msm/gpu: Add suspend/resume tracepoints

2020-09-01 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- I'm not sure if there is a better way to do no-arg tracepoints? The trace framework seems to go out of it's way to make this difficult. Or maybe there is a more obvious thing that I'm not seeing. drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 4

Re: [PATCH 06/19] drm/msm/gpu: add dev_to_gpu() helper

2020-09-01 Thread Rob Clark
On Mon, Aug 31, 2020 at 9:32 PM Bjorn Andersson wrote: > > On Thu 13 Aug 21:41 CDT 2020, Rob Clark wrote: > > > From: Rob Clark > > > > In a later patch, the drvdata will not directly be 'struct msm_gpu *', > > so add a helper to reduce the churn.

Re: [PATCH 01/19] drm/msm: remove dangling submitqueue references

2020-08-31 Thread Rob Clark
On Mon, Aug 31, 2020 at 7:35 PM Bjorn Andersson wrote: > > On Fri 14 Aug 02:40 UTC 2020, Rob Clark wrote: > > > From: Rob Clark > > > > Currently it doesn't matter, since we free the ctx immediately. But > > when we start refcnt'ing the ctx, we don't want old

[PATCH v3] arm64: dts: qcom: sc7180-trogdor: add initial trogdor and lazor dt

2020-08-28 Thread Rob Clark
From: Rob Clark This is essentialy a squash of a bunch of history of trogdor and lazor dt updates from the chromium kernel tree. I don't claim any credit other than wanting to more easily boot upstream kernel on these devices. I've tried to add cc tags for all the original authors. Cc

Re: [PATCH] iommu: Add support to filter non-strict/lazy mode based on device names

2020-08-25 Thread Rob Clark
On Tue, Aug 25, 2020 at 5:24 PM Doug Anderson wrote: > > Hi, > > On Tue, Aug 25, 2020 at 3:54 PM Rob Clark wrote: > > > > On Tue, Aug 25, 2020 at 3:23 PM Doug Anderson wrote: > > > > > > Hi, > > > > > > On Tue, Aug 25, 2020 at

Re: [PATCH] iommu: Add support to filter non-strict/lazy mode based on device names

2020-08-25 Thread Rob Clark
On Tue, Aug 25, 2020 at 3:23 PM Doug Anderson wrote: > > Hi, > > On Tue, Aug 25, 2020 at 12:01 PM Sai Prakash Ranjan > wrote: > > > > Hi, > > > > On 2020-08-25 21:40, Doug Anderson wrote: > > > Hi, > > > > > > On Tue, Aug 25, 2020 at 8:43 AM Sai Prakash Ranjan > > > wrote: > > >> > > >>

[PATCH v2] arm64: dts: qcom: sc7180-trogdor: add initial trogdor and lazor dt

2020-08-25 Thread Rob Clark
From: Rob Clark This is essentialy a squash of a bunch of history of trogdor and lazor dt updates from the chromium kernel tree. I don't claim any credit other than wanting to more easily boot upstream kernel on these devices. I've tried to add cc tags for all the original authors. Cc

Re: [PATCH] arm64: dts: qcom: sc7180-trogdor: add initial trogdor and lazor dt

2020-08-25 Thread Rob Clark
On Tue, Aug 25, 2020 at 2:21 AM Stephen Boyd wrote: > > Quoting Rob Clark (2020-08-24 17:33:39) > > diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi > > b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi > > new file mode 100644 > > index ..

Re: [PATCH] drm/msm: drop cache sync hack

2020-08-25 Thread Rob Clark
On Mon, Aug 24, 2020 at 11:52 PM Christoph Hellwig wrote: > > On Sat, Aug 22, 2020 at 10:52:54AM -0700, Rob Clark wrote: > > From: Rob Clark > > > > Now that it isn't causing problems to use dma_map/unmap, we can drop the > > hack of using dma_sync in certain case

[PATCH] arm64: dts: qcom: sc7180-trogdor: add initial trogdor and lazor dt

2020-08-24 Thread Rob Clark
From: Rob Clark This is essentialy a squash of a bunch of history of trogdor and lazor dt updates from the chromium kernel tree. I don't claim any credit other than wanting to more easily boot upstream kernel on these devices. I've tried to add cc tags for all the original authors. Cc

[PATCH 14/20] drm/msm: Add support to create a local pagetable

2020-08-24 Thread Rob Clark
-off-by: Rob Clark --- drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/msm/msm_gpummu.c | 2 +- drivers/gpu/drm/msm/msm_iommu.c | 199 ++- drivers/gpu/drm/msm/msm_mmu.h| 16 ++- 4 files changed, 215 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH 15/20] drm/msm: Add support for private address space instances

2020-08-24 Thread Rob Clark
Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c | 13 +++-- drivers/gpu/drm/msm/msm_drv.h | 5 + drivers/gpu/drm/msm/msm_gem_vma.c | 9 + drivers/gpu/drm/msm/msm_gpu.c | 22 ++ drivers/gpu/drm/msm/msm_gpu.h | 5 + 5 files changed

[PATCH 16/20] drm/msm/a6xx: Add support for per-instance pagetables

2020-08-24 Thread Rob Clark
From: Jordan Crouse Add support for using per-instance pagetables if all the dependencies are available. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Akhil P Oommen Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 63

[PATCH 20/20] drm/msm: show process names in gem_describe

2020-08-24 Thread Rob Clark
From: Rob Clark In $debugfs/gem we already show any vma(s) associated with an object. Also show process names if the vma's address space is a per-process address space. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.c | 2 +- drivers/gpu/drm/msm

[PATCH 17/20] arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU

2020-08-24 Thread Rob Clark
From: Jordan Crouse Set the qcom,adreno-smmu compatible string for the GPU SMMU to enable split pagetables and per-instance pagetables for drm/msm. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark --- arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 9 + arch/arm64/boot/dts/qcom

[PATCH 19/20] iommu/arm-smmu: add a way for implementations to influence SCTLR

2020-08-24 Thread Rob Clark
From: Rob Clark For the Adreno GPU's SMMU, we want SCTLR.HUPCF set to ensure that pending translations are not terminated on iova fault. Otherwise a terminated CP read could hang the GPU by returning invalid command-stream data. Signed-off-by: Rob Clark --- drivers/iommu/arm/arm-smmu/arm

[PATCH 12/20] drm/msm: Drop context arg to gpu->submit()

2020-08-24 Thread Rob Clark
From: Jordan Crouse Now that we can get the ctx from the submitqueue, the extra arg is redundant. Signed-off-by: Jordan Crouse [split out of previous patch to reduce churny noise] Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 12 +--- drivers/gpu/drm/msm

[PATCH 13/20] drm/msm: Set the global virtual address range from the IOMMU domain

2020-08-24 Thread Rob Clark
From: Jordan Crouse Use the aperture settings from the IOMMU domain to set up the virtual address range for the GPU. This allows us to transparently deal with IOMMU side features (like split pagetables). Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno

[PATCH 10/20] dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU

2020-08-24 Thread Rob Clark
implementation specific code. Signed-off-by: Jordan Crouse Reviewed-by: Rob Herring Signed-off-by: Rob Clark --- Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b

[PATCH 18/20] arm: dts: qcom: sc7180: Set the compatible string for the GPU SMMU

2020-08-24 Thread Rob Clark
From: Rob Clark Set the qcom,adreno-smmu compatible string for the GPU SMMU to enable split pagetables and per-instance pagetables for drm/msm. Signed-off-by: Rob Clark --- arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot

[PATCH 01/20] drm/msm: remove dangling submitqueue references

2020-08-24 Thread Rob Clark
From: Rob Clark Currently it doesn't matter, since we free the ctx immediately. But when we start refcnt'ing the ctx, we don't want old dangling list entries to hang around. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_submitqueue.c | 4 +++- 1 file

[PATCH 04/20] iommu/arm-smmu: Prepare for the adreno-smmu implementation

2020-08-24 Thread Rob Clark
of the existing hooks to pass more information that the implementation will need. These modifications will be used by the upcoming Adreno SMMU implementation to identify the GPU device and properly configure it for pagetable switching. Co-developed-by: Rob Clark Signed-off-by: Jordan Crouse

[PATCH 11/20] drm/msm: Add a context pointer to the submitqueue

2020-08-24 Thread Rob Clark
From: Jordan Crouse Each submitqueue is attached to a context. Add a pointer to the context to the submitqueue at create time and refcount it so that it stays around through the life of the queue. Co-developed-by: Rob Clark Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark --- drivers

[PATCH 09/20] iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU

2020-08-24 Thread Rob Clark
it context bank 0 so the GPU hardware can implement per-instance pagetables. Co-developed-by: Rob Clark Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 + drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 149 - drivers/iommu

[PATCH 00/20] iommu/arm-smmu + drm/msm: per-process GPU pgtables

2020-08-24 Thread Rob Clark
From: Rob Clark This series adds an Adreno SMMU implementation to arm-smmu to allow GPU hardware pagetable switching. The Adreno GPU has built in capabilities to switch the TTBR0 pagetable during runtime to allow each individual instance or application to have its own pagetable. In order

[PATCH 08/20] iommu/arm-smmu: constify some helpers

2020-08-24 Thread Rob Clark
From: Rob Clark Sprinkle a few `const`s where helpers don't need write access. Signed-off-by: Rob Clark --- drivers/iommu/arm/arm-smmu/arm-smmu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.h b/drivers/iommu/arm/arm-smmu/arm

[PATCH 02/20] iommu/arm-smmu: Pass io-pgtable config to implementation specific function

2020-08-24 Thread Rob Clark
From: Jordan Crouse Construct the io-pgtable config before calling the implementation specific init_context function and pass it so the implementation specific function can get a chance to change it before the io-pgtable is created. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark

[PATCH 05/20] iommu: add private interface for adreno-smmu

2020-08-24 Thread Rob Clark
From: Rob Clark This interface will be used for drm/msm to coordinate with the qcom_adreno_smmu_impl to enable/disable TTBR0 translation. Once TTBR0 translation is enabled, the GPU's CP (Command Processor) will directly switch TTBR0 pgtables (and do the necessary TLB inv) synchronized

[PATCH 06/20] drm/msm/gpu: add dev_to_gpu() helper

2020-08-24 Thread Rob Clark
From: Rob Clark In a later patch, the drvdata will not directly be 'struct msm_gpu *', so add a helper to reduce the churn. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/adreno_device.c | 10 -- drivers/gpu/drm/msm/msm_gpu.c | 6

[PATCH 07/20] drm/msm: set adreno_smmu as gpu's drvdata

2020-08-24 Thread Rob Clark
From: Rob Clark This will be populated by adreno-smmu, to provide a way for coordinating enabling/disabling TTBR0 translation. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/adreno_device.c | 2 -- drivers/gpu/drm/msm/msm_gpu.c | 2 +- drivers

[PATCH 03/20] iommu/arm-smmu: Add support for split pagetables

2020-08-24 Thread Rob Clark
From: Jordan Crouse Enable TTBR1 for a context bank if IO_PGTABLE_QUIRK_ARM_TTBR1 is selected by the io-pgtable configuration. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 21 - drivers/iommu/arm/arm-smmu/arm-smmu.h

[PATCH] drm/msm: drop cache sync hack

2020-08-22 Thread Rob Clark
From: Rob Clark Now that it isn't causing problems to use dma_map/unmap, we can drop the hack of using dma_sync in certain cases. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm

Re: [PATCH 10/18] iommu/msm: Add IOMMU_DOMAIN_DMA support

2020-08-20 Thread Rob Clark
On Thu, Aug 20, 2020 at 9:58 AM Robin Murphy wrote: > > On 2020-08-20 16:55, Rob Clark wrote: > > Side note, I suspect we'll end up needing something like > > 0e764a01015dfebff8a8ffd297d74663772e248a .. if someone can dig a 32b > > device out of the closet and dust it off

Re: [PATCH 10/18] iommu/msm: Add IOMMU_DOMAIN_DMA support

2020-08-20 Thread Rob Clark
Side note, I suspect we'll end up needing something like 0e764a01015dfebff8a8ffd297d74663772e248a .. if someone can dig a 32b device out of the closet and dust it off, the fix is easy enough. Just wanted to mention that here so anyone with a 32b device could find what is needed. BR, -R On Thu,

Re: [PATCH 10/20] dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU

2020-08-19 Thread Rob Clark
On Wed, Aug 19, 2020 at 10:03 AM Doug Anderson wrote: > > Hi, > > On Mon, Aug 17, 2020 at 3:03 PM Rob Clark wrote: > > > > From: Jordan Crouse > > > > Every Qcom Adreno GPU has an embedded SMMU for its own use. These > > devices depend on unique featur

[PATCH] drm/msm: enable vblank during atomic commits

2020-08-18 Thread Rob Clark
From: Rob Clark This has roughly the same effect as drm_atomic_helper_wait_for_vblanks(), basically just ensuring that vblank accounting is enabled so that we get valid timestamp/seqn on pageflip events. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_atomic.c | 36

Re: [v2] drm/msm: add shutdown support for display platform_driver

2020-08-18 Thread Rob Clark
On Tue, Aug 18, 2020 at 3:03 AM Sai Prakash Ranjan wrote: > > Hi, > > On 2020-06-01 16:33, Krishna Manikandan wrote: > > Define shutdown callback for display drm driver, > > so as to disable all the CRTCS when shutdown > > notification is received by the driver. > > > > This change will turn off

[PATCH 13/20] drm/msm: Set the global virtual address range from the IOMMU domain

2020-08-17 Thread Rob Clark
From: Jordan Crouse Use the aperture settings from the IOMMU domain to set up the virtual address range for the GPU. This allows us to transparently deal with IOMMU side features (like split pagetables). Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno

[PATCH 15/20] drm/msm: Add support for private address space instances

2020-08-17 Thread Rob Clark
Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c | 13 +++-- drivers/gpu/drm/msm/msm_drv.h | 5 + drivers/gpu/drm/msm/msm_gem_vma.c | 9 + drivers/gpu/drm/msm/msm_gpu.c | 22 ++ drivers/gpu/drm/msm/msm_gpu.h | 5 + 5 files changed

[PATCH 14/20] drm/msm: Add support to create a local pagetable

2020-08-17 Thread Rob Clark
-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gpummu.c | 2 +- drivers/gpu/drm/msm/msm_iommu.c | 199 ++- drivers/gpu/drm/msm/msm_mmu.h| 16 ++- 3 files changed, 214 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gpummu.c b/drivers/gpu/drm

[PATCH 05/20] iommu: add private interface for adreno-smmu

2020-08-17 Thread Rob Clark
From: Rob Clark This interface will be used for drm/msm to coordinate with the qcom_adreno_smmu_impl to enable/disable TTBR0 translation. Once TTBR0 translation is enabled, the GPU's CP (Command Processor) will directly switch TTBR0 pgtables (and do the necessary TLB inv) synchronized

[PATCH 18/20] arm: dts: qcom: sc7180: Set the compatible string for the GPU SMMU

2020-08-17 Thread Rob Clark
From: Rob Clark Set the qcom,adreno-smmu compatible string for the GPU SMMU to enable split pagetables and per-instance pagetables for drm/msm. Signed-off-by: Rob Clark --- arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot

[PATCH 17/20] arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU

2020-08-17 Thread Rob Clark
From: Jordan Crouse Set the qcom,adreno-smmu compatible string for the GPU SMMU to enable split pagetables and per-instance pagetables for drm/msm. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 12/20] drm/msm: Drop context arg to gpu->submit()

2020-08-17 Thread Rob Clark
From: Jordan Crouse Now that we can get the ctx from the submitqueue, the extra arg is redundant. Signed-off-by: Jordan Crouse [split out of previous patch to reduce churny noise] Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 12 +--- drivers/gpu/drm/msm

[PATCH 20/20] drm/msm: show process names in gem_describe

2020-08-17 Thread Rob Clark
From: Rob Clark In $debugfs/gem we already show any vma(s) associated with an object. Also show process names if the vma's address space is a per-process address space. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c | 2 +- drivers/gpu/drm/msm/msm_gem.c | 25

[PATCH 16/20] drm/msm/a6xx: Add support for per-instance pagetables

2020-08-17 Thread Rob Clark
From: Jordan Crouse Add support for using per-instance pagetables if all the dependencies are available. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 63 +++ drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 1 + drivers/gpu

[PATCH 19/20] iommu/arm-smmu: add a way for implementations to influence SCTLR

2020-08-17 Thread Rob Clark
From: Rob Clark For the Adreno GPU's SMMU, we want SCTLR.HUPCF set to ensure that pending translations are not terminated on iova fault. Otherwise a terminated CP read could hang the GPU by returning invalid command-stream data. Signed-off-by: Rob Clark --- drivers/iommu/arm/arm-smmu/arm

[PATCH 09/20] iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU

2020-08-17 Thread Rob Clark
it context bank 0 so the GPU hardware can implement per-instance pagetables. Co-developed-by: Rob Clark Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 + drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 149 - drivers/iommu

[PATCH 11/20] drm/msm: Add a context pointer to the submitqueue

2020-08-17 Thread Rob Clark
From: Jordan Crouse Each submitqueue is attached to a context. Add a pointer to the context to the submitqueue at create time and refcount it so that it stays around through the life of the queue. Co-developed-by: Rob Clark Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark --- drivers

[PATCH 07/20] drm/msm: set adreno_smmu as gpu's drvdata

2020-08-17 Thread Rob Clark
From: Rob Clark This will be populated by adreno-smmu, to provide a way for coordinating enabling/disabling TTBR0 translation. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/adreno_device.c | 2 -- drivers/gpu/drm/msm/msm_gpu.c | 2 +- drivers/gpu/drm/msm/msm_gpu.h

[PATCH 10/20] dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU

2020-08-17 Thread Rob Clark
implementation specific code. Signed-off-by: Jordan Crouse Reviewed-by: Rob Herring Signed-off-by: Rob Clark --- Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree

[PATCH 08/20] iommu/arm-smmu: constify some helpers

2020-08-17 Thread Rob Clark
From: Rob Clark Sprinkle a few `const`s where helpers don't need write access. Signed-off-by: Rob Clark --- drivers/iommu/arm/arm-smmu/arm-smmu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.h b/drivers/iommu/arm/arm-smmu/arm

[PATCH 06/20] drm/msm/gpu: add dev_to_gpu() helper

2020-08-17 Thread Rob Clark
From: Rob Clark In a later patch, the drvdata will not directly be 'struct msm_gpu *', so add a helper to reduce the churn. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/adreno_device.c | 10 -- drivers/gpu/drm/msm/msm_gpu.c | 6 +++--- drivers/gpu/drm/msm

[PATCH 04/20] iommu/arm-smmu: Prepare for the adreno-smmu implementation

2020-08-17 Thread Rob Clark
of the existing hooks to pass more information that the implementation will need. These modifications will be used by the upcoming Adreno SMMU implementation to identify the GPU device and properly configure it for pagetable switching. Co-developed-by: Rob Clark Signed-off-by: Jordan Crouse

[PATCH 03/20] iommu/arm-smmu: Add support for split pagetables

2020-08-17 Thread Rob Clark
From: Jordan Crouse Enable TTBR1 for a context bank if IO_PGTABLE_QUIRK_ARM_TTBR1 is selected by the io-pgtable configuration. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 21 - drivers/iommu/arm/arm-smmu/arm-smmu.h

[PATCH 01/20] drm/msm: remove dangling submitqueue references

2020-08-17 Thread Rob Clark
From: Rob Clark Currently it doesn't matter, since we free the ctx immediately. But when we start refcnt'ing the ctx, we don't want old dangling list entries to hang around. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_submitqueue.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH 00/20] iommu/arm-smmu + drm/msm: per-process GPU pgtables

2020-08-17 Thread Rob Clark
From: Rob Clark This series adds an Adreno SMMU implementation to arm-smmu to allow GPU hardware pagetable switching. The Adreno GPU has built in capabilities to switch the TTBR0 pagetable during runtime to allow each individual instance or application to have its own pagetable. In order

[PATCH 02/20] iommu/arm-smmu: Pass io-pgtable config to implementation specific function

2020-08-17 Thread Rob Clark
From: Jordan Crouse Construct the io-pgtable config before calling the implementation specific init_context function and pass it so the implementation specific function can get a chance to change it before the io-pgtable is created. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark

Re: [Freedreno] [PATCH v10 3/5] drm/msm/dp: add support for DP PLL driver

2020-08-17 Thread Rob Clark
On Mon, Aug 17, 2020 at 1:32 PM Dmitry Baryshkov wrote: > > On 16/08/2020 01:45, Rob Clark wrote: > > On Sat, Aug 15, 2020 at 2:21 PM Jonathan Marek wrote: > >> > >> On 8/15/20 4:20 PM, Rob Clark wrote: > >>> On Fri, Aug 14, 2020

Re: [PATCH 16/19] drm/msm/a6xx: Add support for per-instance pagetables

2020-08-17 Thread Rob Clark
On Mon, Aug 17, 2020 at 8:41 AM Akhil P Oommen wrote: > > On 8/14/2020 8:11 AM, Rob Clark wrote: > > From: Jordan Crouse > > > > Add support for using per-instance pagetables if all the dependencies are > > available. > > > > Signed-off-by: J

[PATCH] drm/msm/gpu: make ringbuffer readonly

2020-08-17 Thread Rob Clark
From: Rob Clark The GPU has no business writing into the ringbuffer, let's make it readonly to the GPU. Fixes: 7198e6b03155 ("drm/msm: add a3xx gpu support") Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_ringbuffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [Freedreno] [PATCH v10 3/5] drm/msm/dp: add support for DP PLL driver

2020-08-15 Thread Rob Clark
On Sat, Aug 15, 2020 at 2:21 PM Jonathan Marek wrote: > > On 8/15/20 4:20 PM, Rob Clark wrote: > > On Fri, Aug 14, 2020 at 10:05 AM Dmitry Baryshkov > > wrote: > >> > >> > >> On 12/08/2020 07:42, Tanmay Shah wrote: > >> > From: Chandan U

Re: [PATCH v10 3/5] drm/msm/dp: add support for DP PLL driver

2020-08-15 Thread Rob Clark
On Fri, Aug 14, 2020 at 10:05 AM Dmitry Baryshkov wrote: > > > On 12/08/2020 07:42, Tanmay Shah wrote: > > From: Chandan Uddaraju > > > > Add the needed DP PLL specific files to support > > display port interface on msm targets. > > [skipped] > > > diff --git

[PATCH 16/19] drm/msm/a6xx: Add support for per-instance pagetables

2020-08-13 Thread Rob Clark
From: Jordan Crouse Add support for using per-instance pagetables if all the dependencies are available. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 70 +++ drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 1 + drivers/gpu

<    1   2   3   4   5   6   7   8   9   10   >