Re: [Freedreno] [PATCH] drm/msm: Check for the GPU IOMMU during bind

2023-07-07 Thread Jordan Crouse
On Thu, Jul 06, 2023 at 09:55:13PM +0300, Dmitry Baryshkov wrote: > > On 10/03/2023 00:20, Jordan Crouse wrote: > > While booting with amd,imageon on a headless target the GPU probe was > > failing with -ENOSPC in get_pages() from msm_gem.c. > > > > Investigation sh

Re: [PATCH] drm/msm: Check for the GPU IOMMU during bind

2023-04-05 Thread Jordan Crouse
On Fri, Mar 10, 2023 at 01:05:36AM +0200, Dmitry Baryshkov wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > On 10/03/2023 00:20

[PATCH] drm/msm: Check for the GPU IOMMU during bind

2023-03-10 Thread Jordan Crouse
state in adreno_bind. There are a number of possible options to resolve this but none of them are very clean. The easiest way is to likely specify vram=0 as module parameter on headless devices so that the memory doesn't get wasted. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno

Re: [Freedreno] [PATCH 09/14] drm/msm/a6xx: Fix some A619 tunables

2023-02-09 Thread Jordan Crouse
On Thu, Jan 26, 2023 at 04:16:13PM +0100, Konrad Dybcio wrote: > Adreno 619 expects some tunables to be set differently. Make up for it. > > Fixes: b7616b5c69e6 ("drm/msm/adreno: Add A619 support") > Signed-off-by: Konrad Dybcio > --- > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +- > 1 file

Re: [PATCH v5 5/5] drm/msm: devcoredump iommu fault support

2021-06-11 Thread Jordan Crouse
e > only one using adreno-smmu-priv. Acked-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 19 +++- > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 38 +++- > drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 42 +

Re: [PATCH v5 4/5] iommu/arm-smmu-qcom: Add stall support

2021-06-11 Thread Jordan Crouse
ent translation. > > This will be used on the GPU side to "freeze" the GPU while we snapshot > useful state for devcoredump. > Acked-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 33 ++ >

Re: [PATCH v4 6/6] drm/msm: devcoredump iommu fault support

2021-06-08 Thread Jordan Crouse
On Tue, Jun 01, 2021 at 03:47:25PM -0700, Rob Clark wrote: > From: Rob Clark > > Wire up support to stall the SMMU on iova fault, and collect a devcore- > dump snapshot for easier debugging of faults. > > Currently this is a6xx-only, but mostly only because so far it is the > only one using

Re: [PATCH v4 5/6] drm/msm: Add crashdump support for stalled SMMU

2021-06-08 Thread Jordan Crouse
On Tue, Jun 01, 2021 at 03:47:24PM -0700, Rob Clark wrote: > From: Rob Clark > > For collecting devcoredumps with the SMMU stalled after an iova fault, > we need to skip the parts of the GPU state which are normally collected > with the hw crashdumper, since with the SMMU stalled the hw would be

Re: [Freedreno] [PATCH 5/5] drm/msm: deprecate MSM_BO_UNCACHED (map as writecombine instead)

2021-05-02 Thread Jordan Crouse
On Fri, Apr 23, 2021 at 03:08:21PM -0400, Jonathan Marek wrote: > There shouldn't be any reason to ever use uncached over writecombine, > so just use writecombine for MSM_BO_UNCACHED. Extremely correct. > > Note: userspace never used MSM_BO_UNCACHED anyway > Acked-by: Jordan Cr

Re: [PATCH 3/5] drm/msm: use the right pgprot when mapping BOs in the kernel

2021-05-02 Thread Jordan Crouse
On Fri, Apr 23, 2021 at 03:08:19PM -0400, Jonathan Marek wrote: > Use the same logic as the userspace mapping. > > This fixes msm_rd with cached BOs. > Acked-by: Jordan Crouse > Signed-off-by: Jonathan Marek > --- > drivers/gpu/drm/msm/msm_gem.c | 19 +++-

Re: [PATCH 2/5] drm/msm: replace MSM_BO_UNCACHED with MSM_BO_WC for internal objects

2021-05-02 Thread Jordan Crouse
was stil in there. Acked-by: Jordan Crouse > Signed-off-by: Jonathan Marek > --- > drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 4 ++-- > drivers/gpu/drm/msm/adreno/a5xx_power.c | 2 +- > drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 4 ++-- > drivers/gpu/drm/msm/adreno/a6xx_gpu.c

Re: [PATCH 1/5] drm/msm: remove unnecessary mmap logic for cached BOs

2021-05-02 Thread Jordan Crouse
On Fri, Apr 23, 2021 at 03:08:17PM -0400, Jonathan Marek wrote: > No one knows what this is for anymore, so just remove it. Acked-by: Jordan Crouse > Signed-off-by: Jonathan Marek > --- > drivers/gpu/drm/msm/msm_gem.c | 15 +++ > 1 file changed, 3 insertions(+

Re: [PATCH 2/2] drm/msm: Periodically update RPTR shadow

2021-05-02 Thread Jordan Crouse
gbuffer > space to become available sees partial progress, rather than not > seeing rptr advance at all until the GPU gets to the end of the > submit that it is currently chewing on. Acked-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > drivers/g

Re: [Freedreno] [PATCH 2/2] drm/msm: Add param for userspace to query suspend count

2021-04-02 Thread Jordan Crouse
eds to be aware of this. For > example, after a suspend userspace needs to recalibrate it's offset > between CPU and GPU time. > Acked-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 +++ > drivers/gpu/drm/msm/msm_drv.c | 1 + > driv

Re: [Freedreno] [PATCH 1/2] drm/msm: Fix a5xx/a6xx timestamps

2021-04-02 Thread Jordan Crouse
On Wed, Mar 24, 2021 at 06:23:52PM -0700, Rob Clark wrote: > From: Rob Clark > > They were reading a counter that was configured to ALWAYS_COUNT (ie. > cycles that the GPU is doing something) rather than ALWAYS_ON. This > isn't the thing that userspace is looking for. Acked-by

Re: [PATCH] drm/msm: a6xx: fix version check for the A650 SQE microcode

2021-04-01 Thread Jordan Crouse
on requirements to accept firmware 0.99. Ugh, my ugly. .95 is the actual version that fixed it but since .99 is what is going into the l-f repo it is fine to use that as a baseline. Acked-by: Jordan Crouse > Fixes: 8490f02a3ca4 ("drm/msm: a6xx: Make sure the SQE microcode is safe"

[PATCH v3 3/3] drm/msm: Improve the a6xx page fault handler

2021-02-25 Thread Jordan Crouse
Use the new adreno-smmu-priv fault info function to get more SMMU debug registers and print the current TTBR0 to debug per-instance pagetables and figure out which GPU block generated the request. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 4 +- drivers/gpu/drm

[PATCH v3 0/3] iommu/arm-smmu: adreno-smmu page fault handling

2021-02-25 Thread Jordan Crouse
a solid base that we can expand on later for even more extensive GPU side page fault debugging capabilities. v3: Always clear FSR even if the target driver is going to handle resume v2: Fix comment wording and function pointer check per Rob Clark Jordan Crouse (3): iommu/arm-smmu: Add support

Re: [PATCH] drm/msm/a6xx: fix for kernels without CONFIG_NVMEM

2021-02-17 Thread Jordan Crouse
On Wed, Feb 17, 2021 at 07:14:16PM +0530, Akhil P Oommen wrote: > On 2/17/2021 8:36 AM, Rob Clark wrote: > >On Tue, Feb 16, 2021 at 12:10 PM Jonathan Marek wrote: > >> > >>Ignore nvmem_cell_get() EOPNOTSUPP error in the same way as a ENOENT error, > >>to fix the case where the kernel was compiled

Re: [PATCH v2] drm/msm: a6xx: Make sure the SQE microcode is safe

2021-02-11 Thread Jordan Crouse
On Thu, Feb 11, 2021 at 06:50:28PM +0530, Akhil P Oommen wrote: > On 2/10/2021 6:22 AM, Jordan Crouse wrote: > >Most a6xx targets have security issues that were fixed with new versions > >of the microcode(s). Make sure that we are booting with a safe version of > >the mic

Re: [PATCH] drm/msm: fix a6xx_gmu_clear_oob

2021-02-09 Thread Jordan Crouse
nks. I feel silly that I missed that. 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.

[PATCH v2] drm/msm: a6xx: Make sure the SQE microcode is safe

2021-02-09 Thread Jordan Crouse
Most a6xx targets have security issues that were fixed with new versions of the microcode(s). Make sure that we are booting with a safe version of the microcode for the target and print a message and error if not. v2: Add more informative error messages and fix typos Signed-off-by: Jordan Crouse

[PATCH] drm/msm: a6xx: Make sure the SQE microcode is safe

2021-02-09 Thread Jordan Crouse
Most a6xx targets have security issues that were fixed with new versions of the microcode(s). Make sure that we are booting with a safe version of the microcode for the target and print a message and error if not. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 67

Re: [PATCH 2/3] iommu/io-pgtable-arm: Add IOMMU_LLC page protection flag

2021-02-01 Thread Jordan Crouse
On Mon, Feb 01, 2021 at 08:20:44AM -0800, Rob Clark wrote: > On Mon, Feb 1, 2021 at 3:16 AM Will Deacon wrote: > > > > On Fri, Jan 29, 2021 at 03:12:59PM +0530, Sai Prakash Ranjan wrote: > > > On 2021-01-29 14:35, Will Deacon wrote: > > > > On Mon, Jan 11, 2021 at 07:45:04PM +0530, Sai Prakash

Re: [PATCH 1/3] drm/msm: Fix race of GPU init vs timestamp power management.

2021-01-29 Thread Jordan Crouse
On Thu, Jan 28, 2021 at 11:17:16AM -0800, Eric Anholt wrote: > On Thu, Jan 28, 2021 at 10:52 AM Jordan Crouse wrote: > > > > On Wed, Jan 27, 2021 at 03:39:44PM -0800, Eric Anholt wrote: > > > We were using the same force-poweron bit in the two codepaths, so they >

Re: [PATCH 3/3] drm/msm: Clean up GMU OOB set/clear handling.

2021-01-28 Thread Jordan Crouse
On Wed, Jan 27, 2021 at 03:39:46PM -0800, Eric Anholt wrote: > Now that the bug is fixed in the minimal way for stable, go make the > code table-driven. > > Signed-off-by: Eric Anholt There shouldn't be too many more OOB bits, but this is a good cleanup regardless. Reviewed-by: J

Re: [PATCH 2/3] drm/msm: Fix races managing the OOB state for timestamp vs timestamps.

2021-01-28 Thread Jordan Crouse
sta...@vger.kernel.org # v5.9 The joys of not having a global mutex locking everything. Reviewed-by: Jordan Crouse > --- > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c > b/drivers/gp

Re: [PATCH 1/3] drm/msm: Fix race of GPU init vs timestamp power management.

2021-01-28 Thread Jordan Crouse
65ca5a2cb ("drm/msm: Add A6XX device support") Because that was my ugly. Reviewed-by: Jordan Crouse > --- > drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 25 ++--- > drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 8 > drivers/gpu/drm/msm/adreno/a6xx_g

Re: [PATCH v3 7/7] drm/msm/a5xx: Disable UCHE global filter

2021-01-14 Thread Jordan Crouse
On Wed, Jan 13, 2021 at 07:33:39PM +0100, AngeloGioacchino Del Regno wrote: > From: Konrad Dybcio > > Port over the command from downstream to prevent undefined > behaviour. Reviewed-by: Jordan Crouse > Signed-off-by: Konrad Dybcio > Signed-off-by: AngeloGi

Re: [PATCH v3 6/7] drm/msm/a5xx: Disable flat shading optimization

2021-01-14 Thread Jordan Crouse
On Wed, Jan 13, 2021 at 07:33:38PM +0100, AngeloGioacchino Del Regno wrote: > From: Konrad Dybcio > > Port over the command from downstream to prevent undefined > behaviour. Reviewed-by: Jordan Crouse > Signed-off-by: Konrad Dybcio > Signed-off-by: AngeloGi

Re: [PATCH v3 5/7] drm/msm/a5xx: Fix VPC protect value in gpu_write()

2021-01-14 Thread Jordan Crouse
een made when porting: > 4 is the value that's supposed to be passed, but > log2(4) = 2. Changing the value to 16 (= 2^4) fixes > the issue. I like keeping it in human readable values because its easier to visually identify how many registers are saved without doing math. Reviewed-by

Re: [PATCH v4 1/2] drm/msm: Add speed-bin support to a618 gpu

2021-01-11 Thread Jordan Crouse
y > along with the required fuse details for a618 gpu. Reviewed-by: Jordan Crouse > Signed-off-by: Akhil P Oommen > --- > Changes from v2: > 1. Made the changes a6xx specific to save space. > Changes from v1: > 1. Added the changes to support a618 sku to the series. >

Re: [Freedreno] [PATCH] drm/msm: Only enable A6xx LLCC code on A6xx

2021-01-11 Thread Jordan Crouse
On Mon, Jan 11, 2021 at 09:54:12AM +0530, Sai Prakash Ranjan wrote: > Hi Rob, > > On 2021-01-08 22:16, Rob Clark wrote: > >On Fri, Jan 8, 2021 at 6:05 AM Sai Prakash Ranjan > > wrote: > >> > >>On 2021-01-08 19:09, Konrad Dybcio wrote: > Konrad, can you please test this below change without

Re: [PATCH] drm/msm: Only enable A6xx LLCC code on A6xx

2021-01-04 Thread Jordan Crouse
ioacchino Del Regno > Yep, I can see how this would be not ideal. Reviewed-by: Jordan Crouse > --- > drivers/gpu/drm/msm/adreno/adreno_gpu.c | 21 - > drivers/gpu/drm/msm/adreno/adreno_gpu.h | 5 + > 2 files changed, 17 insertions(+), 9 deletions(-) &

Re: [PATCH v3 1/2] drm/msm: Add speed-bin support to a618 gpu

2021-01-04 Thread Jordan Crouse
On Mon, Dec 07, 2020 at 04:12:07PM +0530, Akhil P Oommen wrote: > Some GPUs support different max frequencies depending on the platform. > To identify the correct variant, we should check the gpu speedbin > fuse value. Add support for this speedbin detection to a6xx family > along with the

Re: [PATCH v2 1/3] drm/msm: adreno: Make speed-bin support generic

2020-12-02 Thread Jordan Crouse
On Wed, Dec 02, 2020 at 08:53:51PM +0530, Akhil P Oommen wrote: > On 11/30/2020 10:32 PM, Jordan Crouse wrote: > >On Fri, Nov 27, 2020 at 06:19:44PM +0530, Akhil P Oommen wrote: > >>So far a530v2 gpu has support for detecting its supported opps > >>based on a

Re: [PATCH v2 1/3] drm/msm: adreno: Make speed-bin support generic

2020-11-30 Thread Jordan Crouse
On Fri, Nov 27, 2020 at 06:19:44PM +0530, Akhil P Oommen wrote: > So far a530v2 gpu has support for detecting its supported opps > based on a fuse value called speed-bin. This patch makes this > support generic across gpu families. This is in preparation to > extend speed-bin support to a6x

Re: [PATCH] iommu/io-pgtable: Remove tlb_flush_leaf

2020-11-25 Thread Jordan Crouse
On Wed, Nov 25, 2020 at 06:24:13PM +, Robin Murphy wrote: > On 2020-11-25 17:29, Robin Murphy wrote: > >The only user of tlb_flush_leaf is a particularly hairy corner of the > >Arm short-descriptor code, which wants a synchronous invalidation to > >minimise the races inherent in trying to

[PATCH v2 3/3] drm/msm: Improve the a6xx page fault handler

2020-11-24 Thread Jordan Crouse
Use the new adreno-smmu-priv fault info function to get more SMMU debug registers and print the current TTBR0 to debug per-instance pagetables and figure out which GPU block generated the request. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 4 +- drivers/gpu/drm

[PATCH v2 0/3] iommu/arm-smmu: adreno-smmu page fault handling

2020-11-24 Thread Jordan Crouse
on later for even more extensive GPU side page fault debugging capabilities. v2: Fix comment wording and function pointer check per Rob Clark Jordan Crouse (3): iommu/arm-smmu: Add support for driver IOMMU fault handlers drm/msm: Add an adreno-smmu-priv callback to get pagefault info drm/msm

Re: [Freedreno] [RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-16 Thread Jordan Crouse
On Sat, Nov 14, 2020 at 11:39:45AM -0800, Rob Clark wrote: > On Sat, Nov 14, 2020 at 10:58 AM Jonathan Marek wrote: > > > > On 11/14/20 1:46 PM, Rob Clark wrote: > > > On Sat, Nov 14, 2020 at 8:24 AM Christoph Hellwig wrote: > > >> > > >> On Sat, Nov 14, 2020 at 10:17:12AM -0500, Jonathan Marek

Re: [Freedreno] [RESEND PATCH v2 4/5] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-11-16 Thread Jordan Crouse
On Sat, Nov 14, 2020 at 10:17:12AM -0500, 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 > --- >

Re: [PATCH 3/3] drm/msm/shrinker: Only iterate dontneed objs

2020-11-16 Thread Jordan Crouse
On Sat, Nov 14, 2020 at 11:30:10AM -0800, Rob Clark wrote: > From: Rob Clark > > In situations where the GPU is mostly idle, all or nearly all buffer > objects will be in the inactive list. But if the system is under memory > pressure (from something other than GPU), we could still get a lot of

Re: [Freedreno] [PATCH] drm/msm: adreno: Make speed-bin support generic

2020-11-16 Thread Jordan Crouse
On Mon, Nov 16, 2020 at 07:40:03PM +0530, Akhil P Oommen wrote: > On 11/12/2020 10:05 PM, Jordan Crouse wrote: > >On Thu, Nov 12, 2020 at 09:19:04PM +0530, Akhil P Oommen wrote: > >>So far a530v2 gpu has support for detecting its supported opps > >>based on a

Re: [Freedreno] [PATCH 06/40] drm/msm/adreno/a6xx_gpu: Staticise local function 'a6xx_idle'

2020-11-13 Thread Jordan Crouse
; Cc: David Airlie > Cc: Daniel Vetter > Cc: linux-arm-...@vger.kernel.org > Cc: dri-devel@lists.freedesktop.org > Cc: freedr...@lists.freedesktop.org > Signed-off-by: Lee Jones Reviewed-by: Jordan Crouse > --- > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +- > 1 file change

Re: [PATCH] drm/msm: adreno: Make speed-bin support generic

2020-11-12 Thread Jordan Crouse
On Thu, Nov 12, 2020 at 09:19:04PM +0530, Akhil P Oommen wrote: > So far a530v2 gpu has support for detecting its supported opps > based on a fuse value called speed-bin. This patch makes this > support generic across gpu families. This is in preparation to > extend speed-bin support to a6x

Re: [PATCH 1/2] drm/msm/a6xx: Clear shadow on suspend

2020-11-10 Thread Jordan Crouse
]] *ERROR* timeout waiting for space in > ringbuffer 0 > > in the resume path. > > Fixes: d3a569fccfa0 ("drm/msm: a6xx: Use WHERE_AM_I for eligible targets") > Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse > --- > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 11 ++

Re: [PATCH 2/2] drm/msm/a5xx: Clear shadow on suspend

2020-11-10 Thread Jordan Crouse
ged") > Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse > --- > drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 12 +++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c > b/drivers/gpu/drm/msm/adreno/

[RFC PATCH v1 0/3] iommu/arm-smmu: adreno-smmu page fault handling

2020-11-09 Thread Jordan Crouse
on later for even more extensive GPU side page fault debugging capabilities. Jordan Crouse (3): iommu/arm-smmu: Add support for driver IOMMU fault handlers drm/msm: Add an adreno-smmu-priv callback to get pagefault info drm/msm: Improve the a6xx page fault handler drivers/gpu/drm/msm/adreno

[RFC PATCH v1 3/3] drm/msm: Improve the a6xx page fault handler

2020-11-09 Thread Jordan Crouse
Use the new adreno-smmu-priv fault info function to get more SMMU debug registers and print the current TTBR0 to debug per-instance pagetables and figure out which GPU block generated the request. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 4 +- drivers/gpu/drm

Re: [PATCH] drm/msm: a5xx: Make preemption reset case reentrant

2020-11-03 Thread Jordan Crouse
; > Fixes: 8907afb476ac ("drm/msm: Allow a5xx to mark the RPTR shadow as > privileged") > Signed-off-by: Marijn Suijten > Tested-by: AngeloGioacchino Del Regno > Way better. Thanks for doing this. Reviewed-by: Jordan Crouse > --- > drivers/gpu/drm/msm/adreno

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] drm/msm/a6xx: Add support for using system cache on MMU500 based targets

2020-10-26 Thread Jordan Crouse
the 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

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

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

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

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: [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: [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 07/14] drm/msm: Refcount submits

2020-10-05 Thread Jordan Crouse
d 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/gpu/drm/msm/

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

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

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

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

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

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

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

2020-09-15 Thread Jordan Crouse
iv flag 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 ++-

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

2020-09-15 Thread Jordan Crouse
iv flag 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 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 0/3] drm/msm: Add support for the WHERE_AM_I opcode

2020-09-14 Thread Jordan Crouse
] 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_ADRENO

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

2020-09-14 Thread Jordan Crouse
2b4b2d01 ("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/drive

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

2020-09-11 Thread Jordan Crouse
7ce373c1 ("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/adren

[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

[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
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/msm: Split the a5xx

[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

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

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

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

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

2020-08-17 Thread Jordan Crouse
ore readable. 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/drm/

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 > Signed

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

2020-08-17 Thread Jordan Crouse
ast 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 inserti

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

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

2020-08-17 Thread Jordan Crouse
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 insertions(

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

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

  1   2   3   4   5   6   7   8   9   10   >