[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

[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

[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

[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

Re: [PATCH 4/9] drm/msm/a6xx: HFI v2 for A640 and A650

2020-04-21 Thread Jordan Crouse
On Mon, Apr 20, 2020 at 10:03:08AM -0400, Jonathan Marek wrote: > Signed-off-by: Jonathan Marek > --- > drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 68 --- > drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 7 ++ > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +- > drivers/gpu/drm/msm/adreno/a6x

Re: [PATCH 7/9] drm/msm/a6xx: gmu_pdc register values for A640 and A650

2020-04-21 Thread Jordan Crouse
On Mon, Apr 20, 2020 at 10:03:11AM -0400, Jonathan Marek wrote: > Signed-off-by: Jonathan Marek I was wondering where this was. I don't think there is any reason to not squash this into the previous patch since the GMU won't be operational without it. > --- > drivers/gpu/drm/msm/adreno/a6xx_gm

Re: [Freedreno] [PATCH 8/9] drm/msm/a6xx: enable GMU log

2020-04-21 Thread Jordan Crouse
On Mon, Apr 20, 2020 at 10:03:12AM -0400, Jonathan Marek wrote: > This is required for a650 to work. > > Signed-off-by: Jonathan Marek > --- > drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 16 > drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 1 + > drivers/gpu/drm/msm/adreno/a6xx_gm

Re: [PATCH 9/9] drm/msm/a6xx: update a6xx_hw_init for A640 and A650

2020-04-21 Thread Jordan Crouse
On Mon, Apr 20, 2020 at 10:03:13AM -0400, Jonathan Marek wrote: > Adreno 640 and 650 GPUs need some registers set differently. > Signed-off-by: Jonathan Marek > --- > drivers/gpu/drm/msm/adreno/a6xx.xml.h | 14 +++ > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 56 ++- > 2

Re: [Freedreno] [PATCH v2 2/9] drm/msm: add internal MSM_BO_MAP_PRIV flag

2020-04-23 Thread Jordan Crouse
e global buffers as privileged so people can't go out and overwrite the memstore any more. Reviewed-by: Jordan Crouse > Signed-off-by: Jonathan Marek > --- > drivers/gpu/drm/msm/msm_gem.c | 3 +++ > drivers/gpu/drm/msm/msm_gem.h | 1 + > 2 files changed, 4 insertions(+) > >

Re: [PATCH v2 3/9] drm/msm/a6xx: use msm_gem for GMU memory objects

2020-04-23 Thread Jordan Crouse
On Tue, Apr 21, 2020 at 07:41:21PM -0400, Jonathan Marek wrote: > This gives more fine-grained control over how memory is allocated over the > DMA api. In particular, it allows using an address range or pinning to > a fixed address. Reviewed-by: Jordan Crouse > Signed-off-by: Jo

Re: [PATCH v2 4/9] drm/msm/a6xx: add A640/A650 to gpulist

2020-04-23 Thread Jordan Crouse
On Tue, Apr 21, 2020 at 07:41:22PM -0400, Jonathan Marek wrote: > Add Adreno 640 and 650 GPU info to the gpulist. > Reviewed-by: Jordan Crouse > Signed-off-by: Jonathan Marek > --- > drivers/gpu/drm/msm/adreno/adreno_device.c | 24 ++ > drivers/

Re: [PATCH v2 7/9] drm/msm/a6xx: update pdc/rscc GMU registers for A640/A650

2020-04-23 Thread Jordan Crouse
On Tue, Apr 21, 2020 at 07:41:25PM -0400, Jonathan Marek wrote: > Update the gmu_pdc registers for A640 and A650. > > Some of the RSCC registers on A650 are in a separate region. > > Note this also changes the address of these registers: > > RSCC_TCS1_DRV0_STATUS > RSCC_TCS2_DRV0_STATUS > RSCC_T

Re: [PATCH v2 6/9] drm/msm/a6xx: A640/A650 GMU firmware path

2020-04-23 Thread Jordan Crouse
On Tue, Apr 21, 2020 at 07:41:24PM -0400, Jonathan Marek wrote: > Newer GPUs have different GMU firmware path. > > Signed-off-by: Jonathan Marek > --- > drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 135 +++--- > drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 11 ++ > drivers/gpu/drm

Re: [PATCH v2 8/9] drm/msm/a6xx: enable GMU log

2020-04-23 Thread Jordan Crouse
On Tue, Apr 21, 2020 at 07:41:26PM -0400, Jonathan Marek wrote: > This is required for a650 to work. Reviewed-by: Jordan Crouse > Signed-off-by: Jonathan Marek > --- > drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 15 +++ > drivers/gpu/drm/msm/adreno/a6xx_gmu.h |

Re: [PATCH v2 5/9] drm/msm/a6xx: HFI v2 for A640 and A650

2020-04-23 Thread Jordan Crouse
On Tue, Apr 21, 2020 at 07:41:23PM -0400, Jonathan Marek wrote: > Add HFI v2 code paths required by Adreno 640 and 650 GPUs. I still feel like there is a chance for optimization here but the perfect is the enemy of the good and that would be a good follow on for the future. Reviewed-by: Jor

Re: [PATCH v2] dt-bindings: arm-smmu: Add sc7180 compatible string and mem_iface clock

2020-04-30 Thread Jordan Crouse
On Thu, Apr 30, 2020 at 09:29:47AM +0530, Sharat Masetty wrote: > This patch adds a new compatible string for sc7180 and also an > additional clock listing needed to power the TBUs and the TCU. > > Signed-off-by: Sharat Masetty > --- > v2: Addressed review comments from Doug > > Documentation/d

[PATCH] drm/msm: Check for powered down HW in the devfreq callbacks

2020-05-01 Thread Jordan Crouse
the GPU driver. Check the power state in the gpu_busy() and gpu_set_freq() callbacks for a5xx and a6xx to make sure that the hardware is active before trying to access it. Cc: sta...@vger.kernel.org Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 4 drivers/gpu

[PATCH v2] drm/msm: Check for powered down HW in the devfreq callbacks

2020-05-01 Thread Jordan Crouse
the GPU driver. Call pm_runtime_get_if_in_use() in the gpu_busy() and gpu_set_freq() callbacks to skip the hardware access if it isn't active. v2: Use pm_runtime_get_if_in_use() per Eric Anholt Cc: sta...@vger.kernel.org Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a

[PATCH v3] drm/msm: Check for powered down HW in the devfreq callbacks

2020-05-01 Thread Jordan Crouse
g Reviewed-by: Eric Anholt Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 6 ++ drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 8 drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 7 +++ 3 files changed, 21 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c

Re: [Freedreno] [PATCH] drm/msm: Remove redundant null check

2020-10-19 Thread Jordan Crouse
On Mon, Oct 19, 2020 at 02:04:22PM +0800, Tian Tao wrote: > clk_prepare_enable() and clk_disable_unprepare() will check > NULL clock parameter, so It is not necessary to add additional checks. Reviewed-by: Jordan Crouse > Signed-off-by: Tian Tao > --- > drivers/gpu/drm/ms

Re: [PATCH 2/2] drm/msm: Fix duplicate gpu node in icc summary

2020-10-19 Thread Jordan Crouse
On Mon, Oct 19, 2020 at 06:49:18PM +0530, Akhil P Oommen wrote: > On targets with a6xx gpu, there is a duplicate gpu icc node listed in > the interconnect summary. On these targets, calling This first sentence is confusing to me. I think the following few sentences do a better job of explaining wh

Re: [PATCHv6 3/6] drm/msm: rearrange the gpu_rmw() function

2020-10-26 Thread Jordan Crouse
this new function. > > Signed-off-by: Sharat Masetty > Reviewed-by: Jordan Crouse > Signed-off-by: Sai Prakash Ranjan Rob - this should be safe to pull with msm-next regardless of the merge status of the iommu side of things. Hopefully everything will be pulled for 5.11 but if it isn&

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

2020-10-26 Thread Jordan Crouse
On Mon, Oct 26, 2020 at 05:24:03PM +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

[PATCH] drm/msm/a6xx: Add support for using system cache on MMU500 based targets

2020-10-26 Thread Jordan Crouse
programming sequence accordingly. [1] https://patchwork.freedesktop.org/series/83037/ Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 46 +-- drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 1 + 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a

Re: [PATCH] drm/msm/a6xx: Add support for using system cache on MMU500 based targets

2020-10-27 Thread Jordan Crouse
On Tue, Oct 27, 2020 at 12:38:02PM +0530, Sai Prakash Ranjan wrote: > On 2020-10-27 00:24, Jordan Crouse wrote: > >This is an extension to the series [1] to enable the System Cache (LLC) > >for > >Adreno a6xx targets. > > > >GPU targets with an MMU-500 attached

[PATCH v8 6/7] drm/msm: Set the global virtual address range from the IOMMU domain

2020-06-11 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

[PATCH v8 0/7] iommu/arm-smmu: Enable split pagetable support

2020-06-11 Thread Jordan Crouse
g the hardware would be less confusing when debugging a hang. v8: Pass the attached device in the smmu_domain to the implementation specific functions [1] https://lists.linuxfoundation.org/pipermail/iommu/2020-May/044537.html [2] https://patchwork.kernel.org/patch/11482591/ Jordan Crouse (7): iomm

[PATCH 5/6] drm/msm: Add support for address space instances

2020-06-11 Thread Jordan Crouse
Add support for allocating an address space instance. Targets that support per-instance pagetables should implement their own function to allocate a new instance. The default will return the existing generic address space. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.c | 15

[PATCH 0/6] iommu-arm-smmu: Add auxiliary domains and per-instance pagetables

2020-06-11 Thread Jordan Crouse
://patchwork.kernel.org/patch/11600949/ Jordan Crouse (6): iommu/arm-smmu: Add auxiliary domain support for arm-smmuv2 iommu/io-pgtable: Allow a pgtable implementation to skip TLB operations iommu/arm-smmu: Add a domain attribute to pass the pagetable config drm/msm: Add support to create a local

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

2020-06-11 Thread Jordan Crouse
-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_gpummu.c | 2 +- drivers/gpu/drm/msm/msm_iommu.c | 180 ++- drivers/gpu/drm/msm/msm_mmu.h| 16 ++- 3 files changed, 195 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gpummu.c b/drivers/gpu/drm

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

2020-06-11 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 | 69 ++- drivers/gpu/drm/msm/msm_ringbuffer.h | 1 + 2 files changed, 69 insertions(+), 1 deletion(-) diff

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

2020-06-12 Thread Jordan Crouse
On Thu, Jun 11, 2020 at 08:22:29PM -0700, Rob Clark wrote: > On Thu, Jun 11, 2020 at 3:29 PM Jordan Crouse wrote: > > > > Add support for using per-instance pagetables if all the dependencies are > > available. > > > > Signed-off-by: Jordan Crouse > >

Re: [PATCH 1/2] drm/msm: Fix address space size after refactor.

2020-06-22 Thread Jordan Crouse
On Wed, Jun 17, 2020 at 07:39:08PM -0700, Rob Clark wrote: > On Wed, Jun 17, 2020 at 1:53 PM Eric Anholt wrote: > > > > Previously the address space went from 16M to ~0u, but with the > > refactor one of the 'f's was dropped, limiting us to 256MB. > > Additionally, the new interface takes a start

[PATCH] drm/msm: Fix up the rest of the messed up address sizes

2020-06-22 Thread Jordan Crouse
space initialization") Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a2xx_gpu.c| 2 +- drivers/gpu/drm/msm/adreno/a6xx_gmu.c| 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +- drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 2 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c

[PATCH v9 6/7] drm/msm: Set the global virtual address range from the IOMMU domain

2020-06-26 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

[PATCH v9 0/7] iommu/arm-smmu: Enable split pagetable support

2020-06-26 Thread Jordan Crouse
82591/ Jordan Crouse (7): iommu/arm-smmu: Pass io-pgtable config to implementation specific function iommu/arm-smmu: Add support for split pagetables dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU iommu/arm-smmu: Add a pointer to the attached device to smmu_domain iommu/arm

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

2020-06-26 Thread Jordan Crouse
-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_gpummu.c | 2 +- drivers/gpu/drm/msm/msm_iommu.c | 180 ++- drivers/gpu/drm/msm/msm_mmu.h| 16 ++- 3 files changed, 195 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gpummu.c b/drivers/gpu/drm

[PATCH v2 5/6] drm/msm: Add support for address space instances

2020-06-26 Thread Jordan Crouse
Add support for allocating an address space instance. Targets that support per-instance pagetables should implement their own function to allocate a new instance. The default will return the existing generic address space. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.c | 15

[PATCH v2 0/6] iommu-arm-smmu: Add auxiliary domains and per-instance pagetables

2020-06-26 Thread Jordan Crouse
://patchwork.kernel.org/patch/11628543/ v2: Remove unneeded cruft in the a6xx page switch sequence Jordan Crouse (6): iommu/arm-smmu: Add auxiliary domain support for arm-smmuv2 iommu/io-pgtable: Allow a pgtable implementation to skip TLB operations iommu/arm-smmu: Add a domain attribute to pass the

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

2020-06-26 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 | 43 +++ drivers/gpu/drm/msm/msm_ringbuffer.h | 1 + 2 files changed, 44 insertions(+) diff --git a/drivers

Re: [Freedreno] [PATCH v9 6/7] drm/msm: Set the global virtual address range from the IOMMU domain

2020-06-29 Thread Jordan Crouse
On Sat, Jun 27, 2020 at 10:10:14AM -0700, Rob Clark wrote: > On Fri, Jun 26, 2020 at 1:01 PM Jordan Crouse wrote: > > > > 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 > >

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: [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: [PATCH 4/5] drm: msm: a6xx: Fix off by one error when setting GPU freq

2020-03-31 Thread Jordan Crouse
stack and CC stable? Reviewed-by: Jordan Crouse > --- > drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c > b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c > index 489d9b6..81b8559 1

Re: [PATCH 3/5] drm: msm: scale DDR BW along with GPU frequency

2020-03-31 Thread Jordan Crouse
On Tue, Mar 31, 2020 at 01:25:51PM +0530, Sharat Masetty wrote: > This patch adds support to parse the OPP tables attached the GPU device, > the main opp table and the DDR bandwidth opp table. Additionally, vote > for the GPU->DDR bandwidth when setting the GPU frequency by querying > the linked DD

[PATCH v6 0/5] iommu/arm-smmu: Split pagetable support for arm-smmu-v2

2020-04-09 Thread Jordan Crouse
will be enabled later when an auxiliary domain is attached v3: Remove the implementation specific and make split pagetable support part of the generic configuration [1] https://lists.linuxfoundation.org/pipermail/iommu/2020-January/041373.html Jordan Crouse (5): iommu: Add

[PATCH v6 5/5] drm/msm/a6xx: Support split pagetables

2020-04-09 Thread Jordan Crouse
start swapping TTBR0 for context-specific pagetables. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 52 ++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno

[PATCH v6 3/5] drm/msm: Attach the IOMMU device during initialization

2020-04-09 Thread Jordan Crouse
aggressive cleanups that follow. Reviewed-by: Rob Clark Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 8 drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 4 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 7 --- drivers/gpu/drm/msm/msm_gem_vma.c

[PATCH v6 4/5] drm/msm: Refactor address space initialization

2020-04-09 Thread Jordan Crouse
functions to create the address space so a2xx can do its own thing in its own space. For all the other targets use a generic helper to initialize IOMMU but leave the door open for newer targets to use customization if they need it. Reviewed-by: Rob Clark Signed-off-by: Jordan Crouse --- drivers/gpu

Re: [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/

[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

[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

[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

[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

[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

[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: [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: [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: [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: [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: [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

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

2020-09-28 Thread Jordan Crouse
On Mon, Sep 28, 2020 at 05:56:55PM +0530, Sai Prakash Ranjan wrote: > Hi Jordan, > > On 2020-09-23 20:33, Jordan Crouse wrote: > >On Tue, Sep 22, 2020 at 11:48:17AM +0530, Sai Prakash Ranjan wrote: > >>From: Sharat Masetty > >> > >>The last level syste

Re: [Freedreno] [PATCH 2/3] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-10-01 Thread Jordan Crouse
On Wed, Sep 30, 2020 at 08:27:05PM -0400, Jonathan Marek wrote: > This makes it possible to use the non-coherent cached MSM_BO_CACHED mode, > which otherwise doesn't provide any method for cleaning/invalidating the > cache to sync with the device. > > Signed-off-by: Jonathan Marek > --- > driver

Re: [PATCH 1/3] drm/msm: add MSM_BO_CACHED_COHERENT

2020-10-01 Thread Jordan Crouse
On Wed, Sep 30, 2020 at 08:27:04PM -0400, Jonathan Marek wrote: > Add a new cache mode for creating coherent host-cached BOs. Reviewed-by: Jordan Crouse > Signed-off-by: Jonathan Marek > --- > drivers/gpu/drm/msm/adreno/adreno_device.c | 1 + > drivers/gpu/drm/msm/msm_drv.h

Re: [Freedreno] [PATCH 02/14] drm/msm: Drop chatty trace

2020-10-05 Thread Jordan Crouse
On Sun, Oct 04, 2020 at 12:21:34PM -0700, Rob Clark wrote: > From: Rob Clark > > It is somewhat redundant with the gpu tracepoints, and anyways not too > useful to justify spamming the log when debug traces are enabled. Reviewed-by: Jordan Crouse > Signed-off-by: Rob Clark &

Re: [Freedreno] [PATCH 03/14] drm/msm: Move update_fences()

2020-10-05 Thread Jordan Crouse
On Sun, Oct 04, 2020 at 12:21:35PM -0700, Rob Clark wrote: > From: Rob Clark > > Small cleanup, update_fences() is used in the hangcheck path, but also > in the normal retire path. Reviewed-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > drivers/gpu/d

Re: [Freedreno] [PATCH 04/14] drm/msm: Add priv->mm_lock to protect active/inactive lists

2020-10-05 Thread Jordan Crouse
On Sun, Oct 04, 2020 at 12:21:36PM -0700, Rob Clark wrote: > From: Rob Clark > > Rather than relying on the big dev->struct_mutex hammer, introduce a > more specific lock for protecting the bo lists. Most excellent. Reviewed-by: Jordan Crouse > Signed-off-by: Rob Clark &g

Re: [PATCH 05/14] drm/msm: Document and rename preempt_lock

2020-10-05 Thread Jordan Crouse
On Sun, Oct 04, 2020 at 12:21:37PM -0700, Rob Clark wrote: > From: Rob Clark > > Before adding another lock, give ring->lock a more descriptive name. Reviewed-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 4 ++-- &

Re: [Freedreno] [PATCH 06/14] drm/msm: Protect ring->submits with it's own lock

2020-10-05 Thread Jordan Crouse
On Sun, Oct 04, 2020 at 12:21:38PM -0700, Rob Clark wrote: > From: Rob Clark > > One less place to rely on dev->struct_mutex. > Reviewed-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/msm_gem_submit.c | 2 ++ > drivers/gpu/dr

Re: [Freedreno] [PATCH 07/14] drm/msm: Refcount submits

2020-10-05 Thread Jordan Crouse
e completed fence is corrupted, and retire_worker mistakenly > believes the submit is done too early. Reviewed-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/msm_drv.h| 1 - > drivers/gpu/drm/msm/msm_gem.h| 13 + > drivers/gp

Re: [Freedreno] [PATCH 08/14] drm/msm: Remove obj->gpu

2020-10-05 Thread Jordan Crouse
coming submits via > struct_mutex) Somebody will prove me wrong but the longer we go without 2D the less likely it is that we'll ever see it. Reviewed-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/msm_gem.c | 2 -- > drivers/gpu/drm/msm/msm_gem.h | 1

Re: [Freedreno] [PATCH 09/14] drm/msm: Drop struct_mutex from the retire path

2020-10-05 Thread Jordan Crouse
On Sun, Oct 04, 2020 at 12:21:41PM -0700, Rob Clark wrote: > From: Rob Clark > > Now that we are not relying on dev->struct_mutex to protect the > ring->submits lists, drop the struct_mutex lock. Reviewed-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > dr

Re: [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

[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

[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

Re: [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

[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

[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

[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

[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

[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

Re: [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/

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

Re: [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: [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

[RFC PATCH v1] dma-fence-array: Deal with sub-fences that are signaled late

2020-08-12 Thread Jordan Crouse
uite sure the intent of clearing it only after getting to the irq worker. Signed-off-by: Jordan Crouse --- drivers/dma-buf/dma-fence-array.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/dma-buf/dma-fence-array.c b/drivers/dma-buf/dma-fence-array.c index d3f

Re: [RFC PATCH v1] dma-fence-array: Deal with sub-fences that are signaled late

2020-08-17 Thread Jordan Crouse
On Thu, Aug 13, 2020 at 07:49:24AM +0100, Chris Wilson wrote: > Quoting Jordan Crouse (2020-08-13 00:55:44) > > This is an RFC because I'm still trying to grok the correct behavior. > > > > Consider a dma_fence_array created two two fence and signal_on_any i

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