Re: [Freedreno] [PATCH v2 6/6] drm/msm/a6xx: Add support for per-instance pagetables

2020-06-29 Thread Jordan Crouse
On Sat, Jun 27, 2020 at 01:11:14PM -0700, Rob Clark wrote: > On Sat, Jun 27, 2020 at 12:56 PM Rob Clark wrote: > > > > On Fri, Jun 26, 2020 at 1:04 PM Jordan Crouse > > wrote: > > > > > > Add support for using per-instance pagetables if a

Re: [Freedreno] [RFC PATCH] interconnect: qcom: add functions to query addr/cmds for a path

2020-07-01 Thread Jordan Crouse
On Wed, Jul 01, 2020 at 12:25:25AM -0400, Jonathan Marek wrote: > The a6xx GMU can vote for ddr and cnoc bandwidth, but it needs to be able > to query the interconnect driver for bcm addresses and commands. > > I'm not sure what is the best way to go about implementing this, this is > what I came

Re: [Freedreno] [PATCH v2 2/6] iommu/io-pgtable: Allow a pgtable implementation to skip TLB operations

2020-07-08 Thread Jordan Crouse
On Tue, Jul 07, 2020 at 07:58:18AM -0700, Rob Clark wrote: > On Tue, Jul 7, 2020 at 7:25 AM Rob Clark wrote: > > > > On Tue, Jul 7, 2020 at 4:34 AM Robin Murphy wrote: > > > > > > On 2020-06-26 21:04, Jordan Crouse wrote: > > > > Allow a io-pgt

Re: [Freedreno] [PATCH v2 4/6] drm/msm: Add support to create a local pagetable

2020-07-08 Thread Jordan Crouse
On Tue, Jul 07, 2020 at 12:36:42PM +0100, Robin Murphy wrote: > On 2020-06-26 21:04, Jordan Crouse wrote: > >Add support to create a io-pgtable for use by targets that support > >per-instance pagetables. In order to support per-instance pagetables the > >GPU SMMU device n

Re: [Freedreno] [PATCHv3 7/7] drm/msm/a6xx: Add support for using system cache(LLC)

2020-07-09 Thread Jordan Crouse
On Fri, Jul 03, 2020 at 09:04:49AM -0700, Rob Clark wrote: > On Fri, Jul 3, 2020 at 7:53 AM Sai Prakash Ranjan > wrote: > > > > Hi Will, > > > > On 2020-07-03 19:07, Will Deacon wrote: > > > On Mon, Jun 29, 2020 at 09:22:50PM +0530, Sai Prakash Ranjan wrote: > > >> diff --git a/drivers/gpu/drm/msm

Re: [Freedreno] [PATCH] drm/msm/a6xx: fix crashstate capture for A650

2020-07-10 Thread Jordan Crouse
On Mon, Jun 29, 2020 at 08:10:06PM -0400, Jonathan Marek wrote: > A650 has a separate RSCC region, so dump RSCC registers separately, reading > them from the RSCC base. Without this change a GPU hang will cause a system > reset if CONFIG_DEV_COREDUMP is enabled. Reviewed-by: Jord

Re: [Freedreno] [PATCH] drm/msm/a6xx: add build_bw_table for A640/A650

2020-07-10 Thread Jordan Crouse
ly the bw table should be filled by querying the interconnect > driver for each BW in the dts, but use these dummy tables for now. Reviewed-by: Jordan Crouse And yes, I agree that we need to move this into the generic API sooner rather than later, but this should be good enough to get a working

Re: [Freedreno] [PATCH 2/2] drm/msm/adreno: un-open-code some packets

2020-07-10 Thread Jordan Crouse
On Tue, Jul 07, 2020 at 01:35:00PM -0700, Rob Clark wrote: > From: Rob Clark Might need a commit log here, but otherwise makes sense. Reviewed-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 5 +++-- > drivers/gpu/drm/msm/adreno/

Re: [Freedreno] [PATCH] iommu/arm-smmu: Add a init_context_bank implementation hook

2020-07-13 Thread Jordan Crouse
On Mon, Jul 13, 2020 at 04:11:23PM +0100, Will Deacon wrote: > On Thu, Jun 11, 2020 at 04:36:56PM -0600, Jordan Crouse wrote: > > Add a new implementation hook to allow the implementation specific code > > to tweek the context bank configuration just before it gets written. > >

Re: [Freedreno] [PATCH v9 4/7] iommu/arm-smmu: Add a pointer to the attached device to smmu_domain

2020-07-13 Thread Jordan Crouse
On Mon, Jul 13, 2020 at 04:09:02PM +0100, Will Deacon wrote: > On Fri, Jun 26, 2020 at 02:00:38PM -0600, Jordan Crouse wrote: > > Add a link to the pointer to the struct device that is attached to a > > domain. This makes it easy to get the pointer if it is needed in the >

Re: [Freedreno] [RFC PATCH] interconnect: qcom: add functions to query addr/cmds for a path

2020-07-13 Thread Jordan Crouse
On Mon, Jul 13, 2020 at 06:24:26PM +0300, Georgi Djakov wrote: > On 7/1/20 07:25, Jonathan Marek wrote: > > The a6xx GMU can vote for ddr and cnoc bandwidth, but it needs to be able > > to query the interconnect driver for bcm addresses and commands. > > It's not very clear to me how the GMU firmw

Re: [Freedreno] [PATCH v2 1/6] iommu/arm-smmu: Add auxiliary domain support for arm-smmuv2

2020-07-13 Thread Jordan Crouse
On Tue, Jul 07, 2020 at 08:09:41AM -0700, Rob Clark wrote: > On Tue, Jul 7, 2020 at 5:34 AM Robin Murphy wrote: > > > > On 2020-06-26 21:04, Jordan Crouse wrote: > > > Support auxiliary domains for arm-smmu-v2 to initialize and support > > > multiple pagetabl

Re: [Freedreno] [PATCH] iommu/arm-smmu: Add a init_context_bank implementation hook

2020-07-13 Thread Jordan Crouse
On Mon, Jul 13, 2020 at 08:03:32PM +0100, Will Deacon wrote: > On Mon, Jul 13, 2020 at 11:00:32AM -0600, Jordan Crouse wrote: > > On Mon, Jul 13, 2020 at 04:11:23PM +0100, Will Deacon wrote: > > > On Thu, Jun 11, 2020 at 04:36:56PM -0600, Jordan Crouse wrote: > > > >

Re: [Freedreno] [PATCH v4 1/3] drm/msm: fix unbalanced pm_runtime_enable in adreno_gpu_{init, cleanup}

2020-07-13 Thread Jordan Crouse
On Mon, Jul 13, 2020 at 06:53:40PM -0400, Jonathan Marek wrote: > adreno_gpu_init calls pm_runtime_enable, so adreno_gpu_cleanup needs to > call pm_runtime_disable. Reviewed-by: Jordan Crouse > Signed-off-by: Jonathan Marek > --- > drivers/gpu/drm/msm/adreno/adreno_gpu.c |

Re: [Freedreno] [PATCH v4 2/3] drm/msm: reset devfreq freq_table/max_state before devfreq_add_device

2020-07-13 Thread Jordan Crouse
On Mon, Jul 13, 2020 at 06:53:41PM -0400, Jonathan Marek wrote: > These never get set back to 0 when probing fails, so an attempt to probe > again results in broken behavior. Fix the problem by setting thse to zero > before they are used. Reviewed-by: Jordan Crouse > Signed-off-

Re: [Freedreno] [PATCH v4 3/3] drm/msm: handle for EPROBE_DEFER for of_icc_get

2020-07-13 Thread Jordan Crouse
or 3xx and 4xx where you could be a bit more demanding that the ocmem path actually exist. Reviewed-by: Jordan Crouse > Signed-off-by: Jonathan Marek > --- > drivers/gpu/drm/msm/adreno/adreno_gpu.c | 65 +++-- > 1 file changed, 38 insertions(+), 27 deletions(-) >

Re: [Freedreno] [PATCH] drm: msm: a6xx: fix gpu failure after system resume

2020-07-14 Thread Jordan Crouse
On Tue, Jul 14, 2020 at 06:55:30PM +0530, Akhil P Oommen wrote: > On targets where GMU is available, GMU takes over the ownership of GX GDSC > during its initialization. So, take a refcount on the GX PD on behalf of > GMU before we initialize it. This makes sure that nobody can collapse the > GX GD

Re: [Freedreno] [PATCH] drm/msm/adreno: fix gpu probe if no interconnect-names

2020-07-15 Thread Jordan Crouse
> > - gpu->ocmem_icc_path = of_icc_get(dev, "ocmem"); > if (IS_ERR(gpu->ocmem_icc_path)) { > ret = PTR_ERR(gpu->ocmem_icc_path); > gpu->ocmem_icc_path = NULL; > @@ -1026,6 +1027,7 @@ int adreno_gpu_init(struct drm_device

Re: [Freedreno] [PATCH v9 4/7] iommu/arm-smmu: Add a pointer to the attached device to smmu_domain

2020-07-16 Thread Jordan Crouse
On Thu, Jul 16, 2020 at 09:50:53AM +0100, Will Deacon wrote: > On Mon, Jul 13, 2020 at 11:19:17AM -0600, Jordan Crouse wrote: > > On Mon, Jul 13, 2020 at 04:09:02PM +0100, Will Deacon wrote: > > > On Fri, Jun 26, 2020 at 02:00:38PM -0600, Jordan Crouse wrote: > > > >

Re: [Freedreno] [PATCH v2] drm: msm: a6xx: fix gpu failure after system resume

2020-07-17 Thread Jordan Crouse
at for you. Reviewed-by: Jordan Crouse > --- > Changes from v1: > - Reworded the commit text > - Added Reported-by & Tested-by tags > > drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 18 ++ > 1 file changed, 10 insertions(+), 8 deletions(-) > > diff --git a

[Freedreno] [PATCH v10 08/13] drm/msm: Add a context pointer to the submitqueue

2020-07-20 Thread Jordan Crouse
function to function. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 12 +--- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 5 ++--- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 5 ++--- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 3 +-- drivers/gpu/drm/msm/msm_drv.c

[Freedreno] [PATCH v10 02/13] iommu/arm-smmu: Add support for split pagetables

2020-07-20 Thread 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 --- drivers/iommu/arm-smmu.c | 21 - drivers/iommu/arm-smmu.h | 25 +++-- 2 files changed, 35 insertions(+), 11

[Freedreno] [PATCH v10 01/13] iommu/arm-smmu: Pass io-pgtable config to implementation specific function

2020-07-20 Thread 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 --- drivers/iommu/arm-smmu-impl.c | 3 ++- drivers

[Freedreno] [PATCH v10 12/13] drm/msm/a6xx: Add support for per-instance pagetables

2020-07-20 Thread Jordan Crouse
Add support for using per-instance pagetables if all the dependencies are available. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 53 +++ drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 1 + drivers/gpu/drm/msm/msm_ringbuffer.h | 1 + 3 files

[Freedreno] [PATCH v10 07/13] dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU

2020-07-20 Thread Jordan Crouse
. Signed-off-by: Jordan Crouse Reviewed-by: Rob Herring --- 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/bindings/iommu/arm,smmu.yaml index d7ceb4c34423

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

2020-07-20 Thread 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 --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 13 +++-- drivers/gpu/drm

[Freedreno] [PATCH v10 00/13] iommu/arm-smmu: Add Adreno SMMU specific implementation

2020-07-20 Thread Jordan Crouse
://lists.linuxfoundation.org/pipermail/iommu/2020-June/045659.html Jordan Crouse (13): iommu/arm-smmu: Pass io-pgtable config to implementation specific function iommu/arm-smmu: Add support for split pagetables iommu/arm-smmu: Add implementation hooks to configure contexts iommu/arm-smmu-qcom: Add

[Freedreno] [PATCH v10 10/13] drm/msm: Add support to create a local pagetable

2020-07-20 Thread Jordan Crouse
Add support to create a io-pgtable for use by targets that support per-instance pagetables. In order to support per-instance pagetables the GPU SMMU device needs to have the qcom,adreno-smmu compatible string and split pagetables enabled. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm

[Freedreno] [PATCH v10 03/13] iommu/arm-smmu: Add implementation hooks to configure contexts

2020-07-20 Thread Jordan Crouse
for pagetable switching. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-impl.c | 2 +- drivers/iommu/arm-smmu.c | 46 --- drivers/iommu/arm-smmu.h | 28 - 3 files changed, 44 insertions(+), 32 deletions(-) diff --git a

[Freedreno] [PATCH v10 06/13] iommu/arm-smmu-qcom: Get and set the pagetable config for split pagetables

2020-07-20 Thread Jordan Crouse
ck through DOMAIN_ATTR_PGTABLE_CFG as a trigger to enable translation on TTBR0. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-qcom.c | 47 +++ drivers/iommu/arm-smmu.c | 32 ++-- drivers/iommu/arm-smmu.h | 10 3 files c

[Freedreno] [PATCH v10 05/13] iommu: Add a domain attribute to get/set a pagetable configuration

2020-07-20 Thread Jordan Crouse
Add domain attribute DOMAIN_ATTR_PGTABLE_CFG. This will be used by arm-smmu to share the current pagetable configuration with the leaf driver and to allow the leaf driver to set up a new pagetable configuration under certain circumstances. Signed-off-by: Jordan Crouse --- include/linux/iommu.h

[Freedreno] [PATCH v10 04/13] iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU

2020-07-20 Thread Jordan Crouse
hardware can implement per-instance pagetables. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-impl.c | 3 ++ drivers/iommu/arm-smmu-qcom.c | 83 ++- drivers/iommu/arm-smmu.h | 1 + 3 files changed, 85 insertions(+), 2 deletions(-) diff --git a

[Freedreno] [PATCH v10 11/13] drm/msm: Add support for private address space instances

2020-07-20 Thread Jordan Crouse
Add support for allocating private address space instances. Targets that support per-context pagetables should implement their own function to allocate private address spaces. The default will return a pointer to the global address space. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm

[Freedreno] [PATCH v10 13/13] arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU

2020-07-20 Thread 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 --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom

Re: [Freedreno] [PATCH v10 04/13] iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU

2020-07-27 Thread Jordan Crouse
On Sun, Jul 26, 2020 at 11:27:03PM -0700, Bjorn Andersson wrote: > On Mon 20 Jul 08:40 PDT 2020, Jordan Crouse wrote: > > diff --git a/drivers/iommu/arm-smmu-qcom.c b/drivers/iommu/arm-smmu-qcom.c > [..] > > +static int qcom_adreno_smmu_alloc_context_bank(struct arm_smmu_domain

Re: [Freedreno] [PATCH v10 06/13] iommu/arm-smmu-qcom: Get and set the pagetable config for split pagetables

2020-07-27 Thread Jordan Crouse
On Sun, Jul 26, 2020 at 10:03:07AM -0700, Rob Clark wrote: > On Mon, Jul 20, 2020 at 8:41 AM Jordan Crouse wrote: > > > > The Adreno GPU has the capability to manage its own pagetables and switch > > them dynamically from the hardware. To do this the GPU uses TTBR1 for > &

[Freedreno] [PATCH v11 09/12] drm/msm: Add support to create a local pagetable

2020-08-03 Thread Jordan Crouse
Add support to create a io-pgtable for use by targets that support per-instance pagetables. In order to support per-instance pagetables the GPU SMMU device needs to have the qcom,adreno-smmu compatible string and split pagetables enabled. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm

[Freedreno] [PATCH v11 00/12] iommu/arm-smmu: Add Adreno SMMU specific implementation

2020-08-03 Thread Jordan Crouse
://lists.linuxfoundation.org/pipermail/iommu/2020-June/045653.html [2] https://lists.linuxfoundation.org/pipermail/iommu/2020-June/045659.html Jordan Crouse (12): iommu/arm-smmu: Pass io-pgtable config to implementation specific function iommu/arm-smmu: Add support for split pagetables iommu/arm-smmu

[Freedreno] [PATCH v11 06/12] dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU

2020-08-03 Thread Jordan Crouse
. Signed-off-by: Jordan Crouse Reviewed-by: Rob Herring --- 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/bindings/iommu/arm,smmu.yaml index 503160a7b9a0

[Freedreno] [PATCH v11 01/12] iommu/arm-smmu: Pass io-pgtable config to implementation specific function

2020-08-03 Thread 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 --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3

[Freedreno] [PATCH v11 05/12] iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU

2020-08-03 Thread Jordan Crouse
hardware can implement per-instance pagetables. Signed-off-by: Jordan Crouse --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 + drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 156 - 2 files changed, 157 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu

[Freedreno] [PATCH v11 08/12] drm/msm: Set the global virtual address range from the IOMMU domain

2020-08-03 Thread 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 --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 13 +++-- drivers/gpu/drm

[Freedreno] [PATCH v11 03/12] iommu/arm-smmu: Prepare for the adreno-smmu implementation

2020-08-03 Thread Jordan Crouse
pagetable switching. Signed-off-by: Jordan Crouse --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 2 +- drivers/iommu/arm/arm-smmu/arm-smmu.c | 83 -- drivers/iommu/arm/arm-smmu/arm-smmu.h | 56 ++- 3 files changed, 87 insertions(+), 54 deletions

[Freedreno] [PATCH v11 04/12] iommu: Add a domain attribute to get/set a pagetable configuration

2020-08-03 Thread Jordan Crouse
Add domain attribute DOMAIN_ATTR_PGTABLE_CFG. This will be used by arm-smmu to share the current pagetable configuration with the leaf driver and to allow the leaf driver to set up a new pagetable configuration under certain circumstances. Signed-off-by: Jordan Crouse --- include/linux/iommu.h

[Freedreno] [PATCH v11 12/12] arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU

2020-08-03 Thread 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 --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom

[Freedreno] [PATCH v11 07/12] drm/msm: Add a context pointer to the submitqueue

2020-08-03 Thread Jordan Crouse
function to function. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 12 +--- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 5 ++--- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 5 ++--- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 3 +-- drivers/gpu/drm/msm/msm_drv.c

[Freedreno] [PATCH v11 11/12] drm/msm/a6xx: Add support for per-instance pagetables

2020-08-03 Thread Jordan Crouse
Add support for using per-instance pagetables if all the dependencies are available. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 53 +++ drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 1 + drivers/gpu/drm/msm/msm_ringbuffer.h | 1 + 3 files

[Freedreno] [PATCH v11 02/12] iommu/arm-smmu: Add support for split pagetables

2020-08-03 Thread 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 --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 21 - drivers/iommu/arm/arm-smmu/arm-smmu.h | 25 +++-- 2 files changed

[Freedreno] [PATCH v11 10/12] drm/msm: Add support for private address space instances

2020-08-03 Thread Jordan Crouse
Add support for allocating private address space instances. Targets that support per-context pagetables should implement their own function to allocate private address spaces. The default will return a pointer to the global address space. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm

[Freedreno] [PATCH v12 07/13] drm/msm: Add a context pointer to the submitqueue

2020-08-10 Thread Jordan Crouse
function to function. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 12 +--- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 5 ++--- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 5 ++--- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 3 +-- drivers/gpu/drm/msm/msm_drv.c

[Freedreno] [PATCH v12 00/13] iommu/arm-smmu: Add Adreno SMMU specific implementation

2020-08-10 Thread Jordan Crouse
/pipermail/iommu/2020-June/045653.html [2] https://lists.linuxfoundation.org/pipermail/iommu/2020-June/045659.html Jordan Crouse (13): iommu/arm-smmu: Pass io-pgtable config to implementation specific function iommu/arm-smmu: Add support for split pagetables iommu/arm-smmu: Prepare for the

[Freedreno] [PATCH v12 04/13] iommu: Add a domain attribute to get/set a pagetable configuration

2020-08-10 Thread Jordan Crouse
Add domain attribute DOMAIN_ATTR_PGTABLE_CFG. This will be used by arm-smmu to share the current pagetable configuration with the leaf driver and to allow the leaf driver to set up a new pagetable configuration under certain circumstances. Signed-off-by: Jordan Crouse --- include/linux/iommu.h

[Freedreno] [PATCH v12 02/13] iommu/arm-smmu: Add support for split pagetables

2020-08-10 Thread 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 --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 21 - drivers/iommu/arm/arm-smmu/arm-smmu.h | 25 +++-- 2 files changed

[Freedreno] [RFC v12 13/13] iommu/arm-smmu: Add a init_context_bank implementation hook

2020-08-10 Thread Jordan Crouse
ng so could hang the GPU if one of the terminated transactions is a CP read. Signed-off-by: Jordan Crouse --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 16 drivers/iommu/arm/arm-smmu/arm-smmu.c | 21 + drivers/iommu/arm/arm-smmu/arm-smmu.h | 5 +++

[Freedreno] [PATCH v12 06/13] dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU

2020-08-10 Thread Jordan Crouse
. Signed-off-by: Jordan Crouse Reviewed-by: Rob Herring --- 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/bindings/iommu/arm,smmu.yaml index 503160a7b9a0

[Freedreno] [PATCH v12 12/13] arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU

2020-08-10 Thread 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 --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom

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

2020-08-10 Thread 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 --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 13 +++-- drivers/gpu/drm

[Freedreno] [PATCH v12 01/13] iommu/arm-smmu: Pass io-pgtable config to implementation specific function

2020-08-10 Thread 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 --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3

[Freedreno] [PATCH v12 05/13] iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU

2020-08-10 Thread Jordan Crouse
hardware can implement per-instance pagetables. Signed-off-by: Jordan Crouse --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 + drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 156 - 2 files changed, 157 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu

[Freedreno] [PATCH v12 09/13] drm/msm: Add support to create a local pagetable

2020-08-10 Thread Jordan Crouse
Add support to create a io-pgtable for use by targets that support per-instance pagetables. In order to support per-instance pagetables the GPU SMMU device needs to have the qcom,adreno-smmu compatible string and split pagetables enabled. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm

[Freedreno] [PATCH v12 03/13] iommu/arm-smmu: Prepare for the adreno-smmu implementation

2020-08-10 Thread Jordan Crouse
pagetable switching. Signed-off-by: Jordan Crouse --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 2 +- drivers/iommu/arm/arm-smmu/arm-smmu.c | 83 -- drivers/iommu/arm/arm-smmu/arm-smmu.h | 56 ++- 3 files changed, 87 insertions(+), 54 deletions

[Freedreno] [PATCH v12 11/13] drm/msm/a6xx: Add support for per-instance pagetables

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

[Freedreno] [PATCH v12 10/13] drm/msm: Add support for private address space instances

2020-08-10 Thread Jordan Crouse
Add support for allocating private address space instances. Targets that support per-context pagetables should implement their own function to allocate private address spaces. The default will return a pointer to the global address space. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm

Re: [Freedreno] [PATCH] drm/msm/a6xx: fix crashdec section name typo

2020-08-11 Thread Jordan Crouse
a/-/merge_requests/6242 Reviewed-by: Jordan Crouse > Fixes: 1707add81551 ("drm/msm/a6xx: Add a6xx gpu state") > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/adreno/a6xx_gpu_state.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/dr

Re: [Freedreno] [PATCH] drm/msm/a6xx: add module param to enable debugbus snapshot

2020-08-12 Thread Jordan Crouse
efault. Reviewed-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 3 ++- > drivers/gpu/drm/msm/adreno/adreno_device.c | 4 > drivers/gpu/drm/msm/adreno/adreno_gpu.h | 2 ++ > 3 files changed, 8 insertions(+), 1 deletio

Re: [Freedreno] [PATCH] drm/msm/adreno: fix updating ring fence

2020-08-17 Thread Jordan Crouse
esn't manage to > overwrite the seqno before we look at it. > > This can show up with hang recovery if one of the submits after the > crashing submit also hangs after it is replayed. Reviewed-by: Jordan Crouse > Fixes: f97decac5f4c ("drm/msm: Support multiple

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

2020-08-17 Thread Jordan Crouse
On Mon, Aug 17, 2020 at 09:10:46PM +0530, 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: Jor

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

2020-08-17 Thread Jordan Crouse
On Thu, Aug 13, 2020 at 07:40:55PM -0700, Rob Clark wrote: > From: Rob Clark > > NOTE: Since Jordan was out today, and I wanted to keep things moving on > this, I took the liberty of respinning his series (originally > titled "iommu/arm-smmu: Add Adreno SMMU specific implementation")

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

2020-08-17 Thread Jordan Crouse
On Thu, Aug 13, 2020 at 07:40:56PM -0700, 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 dangling list > entries to hang around. Reviewed-by: Jordan

Re: [Freedreno] [PATCH 05/19] iommu: add private interface for adreno-smmu

2020-08-17 Thread Jordan Crouse
a private interface is used to > avoid adding highly driver specific things to the public iommu > interface. > Reviewed-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > include/linux/adreno-smmu-priv.h | 36 > 1 file changed, 36 i

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

2020-08-17 Thread Jordan Crouse
On Thu, Aug 13, 2020 at 07:41:01PM -0700, 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. > Reviewed-by: Jordan Crouse > Signed-off-by: Rob Clark > --

Re: [Freedreno] [PATCH 07/19] drm/msm: set adreno_smmu as gpu's drvdata

2020-08-17 Thread Jordan Crouse
On Thu, Aug 13, 2020 at 07:41:02PM -0700, Rob Clark wrote: > From: Rob Clark > > This will be populated by adreno-smmu, to provide a way for coordinating > enabling/disabling TTBR0 translation. > Reviewed-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > dr

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

2020-08-17 Thread Jordan Crouse
the vast majority of targets out in this world this is a good and necessary fix. Reviewed-by: Jordan Crouse > 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 inse

Re: [Freedreno] [PATCH 19/19] drm/msm: show process names in gem_describe

2020-08-17 Thread Jordan Crouse
On Thu, Aug 13, 2020 at 07:41:14PM -0700, Rob Clark wrote: > 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. Reviewed-by: Jordan Crouse > S

Re: [Freedreno] [PATCH] drm/msm/adreno: remove return value of function XX_print

2020-08-17 Thread Jordan Crouse
le. This is reasonable. I'm always for negative lines. Reviewed-by: Jordan Crouse > Signed-off-by: Bernard Zhao > --- > drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 21 +++-- > 1 file changed, 7 insertions(+), 14 deletions(-) > > diff --git a/drivers/gpu

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

2020-08-21 Thread Jordan Crouse
On Wed, Aug 19, 2020 at 10:36:38AM -0700, Rob Clark wrote: > 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 > > > > > > Ev

[Freedreno] [PATCH 1/2] drm/msm: Split the a5xx preemption record

2020-08-21 Thread Jordan Crouse
The main a5xx preemption record can be marked as privileged to protect it from user access but the counters storage needs to be remain unprivileged. Split the buffers mark the critical memory privileged. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a5xx_gpu.h | 1 + drivers

[Freedreno] [PATCH 2/2] drm/msm: Enable expanded apriv support for a650

2020-08-21 Thread Jordan Crouse
a650 supports expanded apriv support that allows us to map critical buffers (ringbuffer and memstore) as as privileged to protect them from corruption. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +- drivers/gpu/drm/msm/msm_gpu.c | 2 +- drivers/gpu

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

2020-09-02 Thread Jordan Crouse
On Tue, Sep 01, 2020 at 08:41:54AM -0700, Rob Clark wrote: > From: Rob Clark > > Technically the GMU specific one is a bit redundant, but it was useful > to track down a bug. Reviewed-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/a

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

2020-09-02 Thread Jordan Crouse
On Tue, Sep 01, 2020 at 08:41:55AM -0700, Rob Clark wrote: > 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. Reviewed-by: Jordan Crouse

[Freedreno] [PATCH 0/4] drm/msm: Protect the RPTR shadow

2020-09-03 Thread Jordan Crouse
ll targets except for a5xx the RPTR shadow isn't needed so there isn't a loss of functionality. a5xx does need it for preemption so that has to be temporarily disabled. Later changes will re-enable the shadow for those targets that can safely mitigate the risks. Jordan Crouse (4): drm

[Freedreno] [PATCH 4/4] drm/msm: Disable the RPTR shadow

2020-09-03 Thread Jordan Crouse
Disable the RPTR shadow across all targets. It will be selectively re-enabled later for targets that need it. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 5 + drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 10 + drivers/gpu/drm/msm/adreno/a4xx_gpu.c

[Freedreno] [PATCH 2/4] drm/msm: Enable expanded apriv support for a650

2020-09-03 Thread Jordan Crouse
a650 supports expanded apriv support that allows us to map critical buffers (ringbuffer and memstore) as as privileged to protect them from corruption. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +- drivers/gpu/drm/msm/msm_gpu.c | 2 +- drivers/gpu

[Freedreno] [PATCH 3/4] drm/msm: Disable preemption on all 5xx targets

2020-09-03 Thread Jordan Crouse
Temporarily disable preemption on a5xx targets pending some improvements to protect the RPTR shadow from being corrupted. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno

[Freedreno] [PATCH 1/4] drm/msm: Split the a5xx preemption record

2020-09-03 Thread Jordan Crouse
The main a5xx preemption record can be marked as privileged to protect it from user access but the counters storage needs to be remain unprivileged. Split the buffers and mark the critical memory as privileged. Cc: sta...@vger.kernel.org Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm

[Freedreno] Adreno GPU microcode update

2020-09-08 Thread Jordan Crouse
f48fec44127f88ce83ea1bcaf5824de4146ca2f9: qcom: Add updated a5xx and a6xx microcode (2020-09-08 10:03:36 -0600) Jordan Crouse (1): qcom: Add updated a5xx and a6xx microcode qcom/a530_pfp.fw | Bin 15876 -> 16144 bytes qcom/a630_sqe

Re: [Freedreno] [PATCH] drm/msm/adreno: fix probe without iommu

2020-09-11 Thread Jordan Crouse
ccac7ce373c1 ("drm/msm: Refactor address space initialization") > Signed-off-by: Luca Weiss Reviewed-by: Jordan Crouse > --- > drivers/gpu/drm/msm/adreno/adreno_gpu.c | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/msm/

Re: [Freedreno] [PATCH] drm/msm/a6xx: fix a potential overflow issue

2020-09-14 Thread Jordan Crouse
d6852b4b2d01 ("drm/msm/a6xx: Track and manage a6xx state memory") Reviewed-by: Jordan Crouse > --- > drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c > b/

[Freedreno] [PATCH 2/3] drm/msm: a6xx: Use WHERE_AM_I for eligible targets

2020-09-14 Thread Jordan Crouse
in hardware support for to access privilged memory from the CP and can go back to using the hardware RPTR shadow feature. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 87 ++- drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 9 +++ 2 files changed, 93

[Freedreno] [PATCH 0/3] drm/msm: Add support for the WHERE_AM_I opcode

2020-09-14 Thread Jordan Crouse
n [1] https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=f48fec44127f88ce83ea1bcaf5824de4146ca2f9 Jordan Crouse (3): drm/msm: Allow a5xx to mark the RPTR shadow as privileged drm/msm: a6xx: Use WHERE_AM_I for eligible targets drm/msm: Get rid of the REG_A

[Freedreno] [PATCH 1/3] drm/msm: Allow a5xx to mark the RPTR shadow as privileged

2020-09-14 Thread Jordan Crouse
-enable preemption for those targets that support CP_WHERE_AM_I. Start out by preemptively assuming that we can enable preemption and disable it in a5xx_hw_init if the microcode version comes back as too old. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 96

[Freedreno] [PATCH 3/3] drm/msm: Get rid of the REG_ADRENO offsets

2020-09-14 Thread Jordan Crouse
of relying on the generic register. All of this gets rid of the last of the REG_ADRENO offsets so remove all all the register definitions and infrastructure. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 65 +++- drivers/gpu/drm/msm/adreno/a3xx_gp

[Freedreno] [PATCH] drm/msm: Fix the a650 hw_apriv check

2020-09-15 Thread Jordan Crouse
ag so that it can be used by msm_gpu to properly setup global buffers. Fixes: 604234f33658 ("drm/msm: Enable expanded apriv support for a650") Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff

[Freedreno] [PATCH v2] drm/msm: Fix the a650 hw_apriv check

2020-09-15 Thread Jordan Crouse
ag so that it can be used by msm_gpu to properly setup global buffers. Fixes: 604234f33658 ("drm/msm: Enable expanded apriv support for a650") Reported-by: Jonathan Marek Signed-off-by: Jordan Crouse Tested-by: Jonathan Marek --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 11 ++-

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

2020-09-21 Thread Jordan Crouse
On Mon, Sep 21, 2020 at 10:30:57PM +0100, Will Deacon wrote: > On Sat, Sep 05, 2020 at 01:04:06PM -0700, Rob Clark wrote: > > 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

Re: [Freedreno] [PATCH] drm/msm: Remove depends on interconnect

2020-09-23 Thread Jordan Crouse
On Wed, Sep 16, 2020 at 02:07:06PM +0300, Georgi Djakov wrote: > The dependency on interconnect in the Kconfig was introduced to avoid > the case of interconnect=m and driver=y, but the interconnect framework > has been converted from tristate to bool now. Remove the dependency as > the framework c

Re: [Freedreno] [PATCH v2 1/2] drm/msm: Fix premature purging of BO

2020-09-23 Thread Jordan Crouse
On Tue, Sep 22, 2020 at 08:25:26PM +0530, Akhil P Oommen wrote: > In the case where we have a back-to-back submission that shares the same > BO, this BO will be prematurely moved to inactive_list while retiring the > first submit. But it will be still part of the second submit which is > being proc

Re: [Freedreno] [PATCH v2 2/2] drm/msm: Leave inuse count intact on map failure

2020-09-23 Thread Jordan Crouse
On Tue, Sep 22, 2020 at 08:25:27PM +0530, Akhil P Oommen wrote: > Leave the inuse count intact on map failure to keep the accounting > accurate. > > Signed-off-by: Akhil P Oommen Reviewed-by: Jordan Crouse > --- > drivers/gpu/drm/msm/msm_gem_vma.c | 4 +++- > 1 file

Re: [Freedreno] [PATCHv5 4/6] drm/msm/a6xx: Add support for using system cache(LLC)

2020-09-23 Thread Jordan Crouse
On Tue, Sep 22, 2020 at 11:48:17AM +0530, Sai Prakash Ranjan wrote: > From: Sharat Masetty > > The last level system cache can be partitioned to 32 different > slices of which GPU has two slices preallocated. One slice is > used for caching GPU buffers and the other slice is used for > caching th

Re: [Freedreno] [PATCH v2] drm/msm/a6xx: Fix a size determination in a6xx_get_indexed_registers()

2020-09-23 Thread Jordan Crouse
On Mon, Sep 14, 2020 at 10:29:49AM +0800, Zhenzhong Duan wrote: > It's allocating an array of a6xx_gpu_state_obj structure rather than > its pointers. > > Fixes: d6852b4b2d01 ("drm/msm/a6xx: Track and manage a6xx state memory") > Signed-off-by: Zhenzhong Dua

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