[PATCH v3 11/13] drm/msm: Drop struct_mutex in submit path

2021-07-27 Thread Rob Clark
From: Rob Clark It is sufficient to serialize on the submit queue now. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/msm_gem_submit.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers

[PATCH v3 10/13] drm/msm: Drop submit bo_list

2021-07-27 Thread Rob Clark
From: Rob Clark This was only used to detect userspace including the same bo multiple times in a submit. But ww_mutex can already tell us this. When we drop struct_mutex around the submit ioctl, we'd otherwise need to lock the bo before adding it to the bo_list. But since ww_mutex can already

[PATCH v3 08/13] drm/msm: Return ERR_PTR() from submit_create()

2021-07-27 Thread Rob Clark
From: Rob Clark In the next patch, we start having more than a single potential failure reason. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/msm_gem_submit.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/gpu

[PATCH v3 07/13] drm/msm: Track "seqno" fences by idr

2021-07-27 Thread Rob Clark
From: Rob Clark Previously the (non-fd) fence returned from submit ioctl was a raw seqno, which is scoped to the ring. But from UABI standpoint, the ioctls related to seqno fences all specify a submitqueue. We can take advantage of that to replace the seqno fences with a cyclic idr handle

[PATCH v3 06/13] drm/msm: Consolidate submit bo state

2021-07-27 Thread Rob Clark
From: Rob Clark Move all the locked/active/pinned state handling to msm_gem_submit.c. In particular, for drm/scheduler, we'll need to do all this before pushing the submit job to the scheduler. But while we're at it we can get rid of the dupicate pin and refcnt. Signed-off-by: Rob Clark Acked

[PATCH v3 04/13] drm: Drop drm_gem_object_put_locked()

2021-07-27 Thread Rob Clark
From: Rob Clark Now that no one is using it, remove it. Signed-off-by: Rob Clark Acked-by: Christian König Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_gem.c | 22 -- include/drm/drm_gem.h | 2 -- 2 files changed, 24 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v3 05/13] drm/msm/submit: Simplify out-fence-fd handling

2021-07-27 Thread Rob Clark
From: Rob Clark No need for this to be split in two parts. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/msm_gem_submit.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm

[PATCH v3 03/13] drm/msm: drop drm_gem_object_put_locked()

2021-07-27 Thread Rob Clark
From: Rob Clark No idea why we were still using this. It certainly hasn't been needed for some time. So drop the pointless twin codepaths. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 4 +- drivers/gpu/drm/msm/adreno/a5xx_gpu.c

[PATCH v3 02/13] drm/msm: Small submitqueue creation cleanup

2021-07-27 Thread Rob Clark
From: Rob Clark If we don't have a gpu, there is no need to create a submitqueue, which lets us simplify the error handling and submitqueue creation. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/msm_submitqueue.c | 22 +++--- 1 file changed, 11

[PATCH v3 01/13] drm/msm: Docs and misc cleanup

2021-07-27 Thread Rob Clark
From: Rob Clark Fix a couple incorrect or misspelt comments, and add submitqueue doc comment. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/msm_gem.h | 3 +-- drivers/gpu/drm/msm/msm_gem_submit.c | 1 + drivers/gpu/drm/msm/msm_gpu.h | 15

[PATCH v3 00/13] drm/msm: drm scheduler conversion and cleanups

2021-07-27 Thread Rob Clark
From: Rob Clark Conversion to gpu_scheduler, and bonus removal of drm_gem_object_put_locked() v2: Fix priority mixup (msm UAPI has lower numeric priority value as higher priority, inverse of drm/scheduler) and add some comments in the UAPI header to clarify. Now that we move active

[pull] drm/msm: drm-msm-fixes-2021-07-27 for v5.14-rc4

2021-07-27 Thread Rob Clark
io plugged change at dp_pm_resume Rob Clark (1): drm/msm: Fix display fault handling Robert Foss (1): drm/msm/dpu: Fix sm8250_mdp register length Sean Paul (1): drm/msm/dp: Initialize dp->aux->drm_dev before registration drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 2

Re: [RFC 0/4] dma-fence: Deadline awareness

2021-07-27 Thread Rob Clark
On Tue, Jul 27, 2021 at 8:19 AM Michel Dänzer wrote: > > On 2021-07-27 5:12 p.m., Rob Clark wrote: > > On Tue, Jul 27, 2021 at 7:50 AM Michel Dänzer wrote: > >> > >> On 2021-07-27 1:38 a.m., Rob Clark wrote: > >>> From: Rob Clark > >>> >

Re: [RFC 0/4] dma-fence: Deadline awareness

2021-07-27 Thread Rob Clark
On Tue, Jul 27, 2021 at 7:50 AM Michel Dänzer wrote: > > On 2021-07-27 1:38 a.m., Rob Clark wrote: > > From: Rob Clark > > > > Based on discussion from a previous series[1] to add a "boost" mechanism > > when, for example, vblank deadlines are

Re: [RFC 3/4] drm/atomic-helper: Set fence deadline for vblank

2021-07-27 Thread Rob Clark
On Tue, Jul 27, 2021 at 3:44 AM Michel Dänzer wrote: > > On 2021-07-27 1:38 a.m., Rob Clark wrote: > > From: Rob Clark > > > > For an atomic commit updating a single CRTC (ie. a pageflip) calculate > > the next vblank time, and inform the fence(s) of that deadli

Re: [RFC 1/4] dma-fence: Add deadline awareness

2021-07-27 Thread Rob Clark
On Tue, Jul 27, 2021 at 12:11 AM Christian König wrote: > > Am 27.07.21 um 01:38 schrieb Rob Clark: > > From: Rob Clark > > > > Add a way to hint to the fence signaler of an upcoming deadline, such as > > vblank, which the fence waiter would prefer not to miss.

Re: [RFC 0/4] dma-fence: Deadline awareness

2021-07-26 Thread Rob Clark
On Mon, Jul 26, 2021 at 4:34 PM Rob Clark wrote: > > From: Rob Clark > > Based on discussion from a previous series[1] to add a "boost" mechanism > when, for example, vblank deadlines are missed. Instead of a boost > callback, this approach adds a way to set a deadl

[RFC 4/4] drm/scheduler: Add fence deadline support

2021-07-26 Thread Rob Clark
From: Rob Clark As the finished fence is the one that is exposed to userspace, and therefore the one that other operations, like atomic update, would block on, we need to propagate the deadline from from the finished fence to the actual hw fence. Signed-off-by: Rob Clark --- drivers/gpu/drm

[RFC 3/4] drm/atomic-helper: Set fence deadline for vblank

2021-07-26 Thread Rob Clark
From: Rob Clark For an atomic commit updating a single CRTC (ie. a pageflip) calculate the next vblank time, and inform the fence(s) of that deadline. Signed-off-by: Rob Clark --- drivers/gpu/drm/drm_atomic_helper.c | 36 + 1 file changed, 36 insertions(+) diff

[RFC 2/4] drm/vblank: Add helper to get next vblank time

2021-07-26 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/drm_vblank.c | 31 +++ include/drm/drm_vblank.h | 1 + 2 files changed, 32 insertions(+) diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c index 3417e1ac7918..88c824c294dc

[RFC 1/4] dma-fence: Add deadline awareness

2021-07-26 Thread Rob Clark
From: Rob Clark Add a way to hint to the fence signaler of an upcoming deadline, such as vblank, which the fence waiter would prefer not to miss. This is to aid the fence signaler in making power management decisions, like boosting frequency as the deadline approaches and awareness of missing

[RFC 0/4] dma-fence: Deadline awareness

2021-07-26 Thread Rob Clark
From: Rob Clark Based on discussion from a previous series[1] to add a "boost" mechanism when, for example, vblank deadlines are missed. Instead of a boost callback, this approach adds a way to set a deadline on the fence, by which the waiter would like to see the fence signalled. I'

[PATCH v2 12/12] drm/msm/gem: Mark active before pinning

2021-07-26 Thread Rob Clark
From: Rob Clark Mark all the bos in the submit as active, before pinning, to prevent evicting a buffer in the same submit to make room for a buffer earlier in the table. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c| 2 -- drivers/gpu/drm/msm/msm_gem_submit.c | 28

[PATCH v2 11/12] drm/msm: Utilize gpu scheduler priorities

2021-07-26 Thread Rob Clark
From: Rob Clark The drm/scheduler provides additional prioritization on top of that provided by however many number of ringbuffers (each with their own priority level) is supported on a given generation. Expose the additional levels of priority to userspace and map the userspace priority back

[PATCH v2 07/12] drm/msm: Track "seqno" fences by idr

2021-07-26 Thread Rob Clark
From: Rob Clark Previously the (non-fd) fence returned from submit ioctl was a raw seqno, which is scoped to the ring. But from UABI standpoint, the ioctls related to seqno fences all specify a submitqueue. We can take advantage of that to replace the seqno fences with a cyclic idr handle

[PATCH v2 10/12] drm/msm: Drop struct_mutex in submit path

2021-07-26 Thread Rob Clark
From: Rob Clark It is sufficient to serialize on the submit queue now. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/msm_gem_submit.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers

[PATCH v2 09/12] drm/msm: Conversion to drm scheduler

2021-07-26 Thread Rob Clark
From: Rob Clark For existing adrenos, there is one or more ringbuffer, depending on whether preemption is supported. When preemption is supported, each ringbuffer has it's own priority. A submitqueue (which maps to a gl context or vk queue in userspace) is mapped to a specific ring- buffer

[PATCH v2 05/12] drm/msm/submit: Simplify out-fence-fd handling

2021-07-26 Thread Rob Clark
From: Rob Clark No need for this to be split in two parts. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/msm_gem_submit.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm

[PATCH v2 08/12] drm/msm: Return ERR_PTR() from submit_create()

2021-07-26 Thread Rob Clark
From: Rob Clark In the next patch, we start having more than a single potential failure reason. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/msm_gem_submit.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/gpu

[PATCH v2 06/12] drm/msm: Consolidate submit bo state

2021-07-26 Thread Rob Clark
From: Rob Clark Move all the locked/active/pinned state handling to msm_gem_submit.c. In particular, for drm/scheduler, we'll need to do all this before pushing the submit job to the scheduler. But while we're at it we can get rid of the dupicate pin and refcnt. Signed-off-by: Rob Clark Acked

[PATCH v2 04/12] drm: Drop drm_gem_object_put_locked()

2021-07-26 Thread Rob Clark
From: Rob Clark Now that no one is using it, remove it. Signed-off-by: Rob Clark Acked-by: Christian König Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_gem.c | 22 -- include/drm/drm_gem.h | 2 -- 2 files changed, 24 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v2 03/12] drm/msm: drop drm_gem_object_put_locked()

2021-07-26 Thread Rob Clark
From: Rob Clark No idea why we were still using this. It certainly hasn't been needed for some time. So drop the pointless twin codepaths. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 4 +- drivers/gpu/drm/msm/adreno/a5xx_gpu.c

[PATCH v2 02/12] drm/msm: Small submitqueue creation cleanup

2021-07-26 Thread Rob Clark
From: Rob Clark If we don't have a gpu, there is no need to create a submitqueue, which lets us simplify the error handling and submitqueue creation. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/msm_submitqueue.c | 22 +++--- 1 file changed, 11

[PATCH v2 01/12] drm/msm: Docs and misc cleanup

2021-07-26 Thread Rob Clark
From: Rob Clark Fix a couple incorrect or misspelt comments, and add submitqueue doc comment. Signed-off-by: Rob Clark Acked-by: Christian König --- drivers/gpu/drm/msm/msm_gem.h | 3 +-- drivers/gpu/drm/msm/msm_gem_submit.c | 1 + drivers/gpu/drm/msm/msm_gpu.h | 15

[PATCH v2 00/12] drm/msm: drm scheduler conversion and cleanups

2021-07-26 Thread Rob Clark
From: Rob Clark Conversion to gpu_scheduler, and bonus removal of drm_gem_object_put_locked() v2: Fix priority mixup (msm UAPI has lower numeric priority value as higher priority, inverse of drm/scheduler) and add some comments in the UAPI header to clarify. Now that we move active

[PATCH v2 3/3] drm/msm: Devfreq tuning

2021-07-26 Thread Rob Clark
From: Rob Clark This adds a few things to try and make frequency scaling better match the workload: 1) Longer polling interval to avoid whip-lashing between too-high and too-low frequencies in certain workloads, like mobile games which throttle themselves to 30fps. Previously our

[PATCH v2 2/3] drm/msm: Split out get_freq() helper

2021-07-26 Thread Rob Clark
From: Rob Clark In the next patch, it grows a bit more, so lets not duplicate the logic in multiple places. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gpu_devfreq.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/msm

[PATCH v2 1/3] drm/msm: Split out devfreq handling

2021-07-26 Thread Rob Clark
From: Rob Clark Before we start adding more cleverness, split it into it's own file. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/Makefile | 1 + drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 4 +- drivers/gpu/drm/msm/msm_gpu.c | 116 +- drivers/gpu/drm

[PATCH v2 0/3] drm/msm: Improved devfreq tuning

2021-07-26 Thread Rob Clark
From: Rob Clark This is the outcome of trying to fix some bad gpu freq behavior seen in some use-cases, in particular mobile games that throttle themselves to 30fps. With the existing tuning, we'd end up spending most of the time that we should be running fast at a low freq, and most

[PATCH 2/2] drm/msm: Signal fences sooner

2021-07-26 Thread Rob Clark
From: Rob Clark Nothing we do to in update_fences() can't be done in an atomic context, so move this into the GPU's irq context to reduce latency (and call dma_fence_signal() so we aren't relying on dma_fence_is_signaled() which would defeat the purpose). Signed-off-by: Rob Clark --- drivers

[PATCH 1/2] drm/msm: Let fences read directly from memptrs

2021-07-26 Thread Rob Clark
From: Rob Clark Let dma_fence::signaled, etc, read directly from the address that the hw is writing with updated completed fence seqno, so we can potentially notice that the fence is signaled sooner. Plus add some docs. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_fence.c | 11

[PATCH 0/2] drm/msm: Reduce fence signal latency

2021-07-26 Thread Rob Clark
From: Rob Clark A couple tweaks to reduce fence signal latency. Rob Clark (2): drm/msm: Let fences read directly from memptrs drm/msm: Signal fences sooner drivers/gpu/drm/msm/msm_fence.c | 11 +-- drivers/gpu/drm/msm/msm_fence.h | 41 +++--- drivers/gpu

Re: [Freedreno] [PATCH 2/2] drm/msm/a6xx: Add support for Adreno 7c Gen 3 gpu

2021-07-24 Thread Rob Clark
() On Fri, Jul 23, 2021 at 3:38 AM Akhil P Oommen wrote: > > This patch adds support for the gpu found in the Snapdragon 7c Gen 3 > compute platform. This gpu is similar to the exisiting a660 gpu with > minor delta in the programing sequence. As the Adreno GPUs are moving > away from a numeric

[PATCH 3/3] drm/msm: Devfreq tuning

2021-07-22 Thread Rob Clark
From: Rob Clark This adds a few things to try and make frequency scaling better match the workload: 1) Longer polling interval to avoid whip-lashing between too-high and too-low frequencies in certain workloads, like mobile games which throttle themselves to 30fps. Previously our

[PATCH 2/3] drm/msm: Split out get_freq() helper

2021-07-22 Thread Rob Clark
From: Rob Clark In the next patch, it grows a bit more, so lets not duplicate the logic in multiple places. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gpu_devfreq.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/msm

[PATCH 1/3] drm/msm: Split out devfreq handling

2021-07-22 Thread Rob Clark
From: Rob Clark Before we start adding more cleverness, split it into it's own file. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/Makefile | 1 + drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 4 +- drivers/gpu/drm/msm/msm_gpu.c | 116 +- drivers/gpu/drm

[PATCH 0/3] drm/msm: Improved devfreq tuning

2021-07-22 Thread Rob Clark
From: Rob Clark This is the outcome of trying to fix some bad gpu freq behavior seen in some use-cases, in particular mobile games that throttle themselves to 30fps. With the existing tuning, we'd end up spending most of the time that we should be running fast at a low freq, and most

Re: [Linaro-mm-sig] [PATCH] drm/msm: Add fence->wait() op

2021-07-22 Thread Rob Clark
On Thu, Jul 22, 2021 at 2:28 AM Christian König wrote: > > Am 22.07.21 um 11:08 schrieb Daniel Vetter: > > [SNIP] > >> As far as I know wake_up_state() tries to run the thread on the CPU it was > >> scheduled last, while wait_event_* makes the thread run on the CPU who > >> issues the wake by

Re: [Linaro-mm-sig] [PATCH] drm/msm: Add fence->wait() op

2021-07-22 Thread Rob Clark
On Thu, Jul 22, 2021 at 1:42 AM Christian König wrote: > > Am 21.07.21 um 21:03 schrieb Daniel Vetter: > > On Wed, Jul 21, 2021 at 09:34:43AM -0700, Rob Clark wrote: > >> On Wed, Jul 21, 2021 at 12:59 AM Daniel Vetter wrote: > >>> On Wed, Jul 21, 2021 at 12:32 A

Re: [Linaro-mm-sig] [PATCH] drm/msm: Add fence->wait() op

2021-07-21 Thread Rob Clark
On Wed, Jul 21, 2021 at 12:59 AM Daniel Vetter wrote: > > On Wed, Jul 21, 2021 at 12:32 AM Rob Clark wrote: > > > > On Tue, Jul 20, 2021 at 1:55 PM Daniel Vetter wrote: > > > > > > On Tue, Jul 20, 2021 at 8:26 PM Rob Clark wrote: > > > > > >

Re: [Linaro-mm-sig] [PATCH] drm/msm: Add fence->wait() op

2021-07-20 Thread Rob Clark
On Tue, Jul 20, 2021 at 1:55 PM Daniel Vetter wrote: > > On Tue, Jul 20, 2021 at 8:26 PM Rob Clark wrote: > > > > On Tue, Jul 20, 2021 at 11:03 AM Christian König > > wrote: > > > > > > Hi Rob, > > > > > > Am 20.07.21 um 17:07 schrieb

Re: [Linaro-mm-sig] [PATCH] drm/msm: Add fence->wait() op

2021-07-20 Thread Rob Clark
On Tue, Jul 20, 2021 at 11:03 AM Christian König wrote: > > Hi Rob, > > Am 20.07.21 um 17:07 schrieb Rob Clark: > > From: Rob Clark > > > > Somehow we had neither ->wait() nor dma_fence_signal() calls, and no > > one noticed. Oops. > > > I'm no

[PATCH] drm/msm: Add fence->wait() op

2021-07-20 Thread Rob Clark
From: Rob Clark Somehow we had neither ->wait() nor dma_fence_signal() calls, and no one noticed. Oops. Note that this removes the !timeout case, which has not been used in a long time. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_fence.c | 59 +++--

Re: [Linaro-mm-sig] [PATCH 00/11] drm/msm: drm scheduler conversion and cleanups

2021-07-19 Thread Rob Clark
On Mon, Jul 19, 2021 at 1:40 AM Christian König wrote: > > Am 17.07.21 um 22:29 schrieb Rob Clark: > > From: Rob Clark > > > > Conversion to gpu_scheduler, and bonus removal of > > drm_gem_object_put_locked() > > Oh yes please! > > If I'm not complete

[PATCH 11/11] drm/msm: Utilize gpu scheduler priorities

2021-07-17 Thread Rob Clark
From: Rob Clark The drm/scheduler provides additional prioritization on top of that provided by however many number of ringbuffers (each with their own priority level) is supported on a given generation. Expose the additional levels of priority to userspace and map the userspace priority back

[PATCH 10/11] drm/msm: Drop struct_mutex in submit path

2021-07-17 Thread Rob Clark
From: Rob Clark It is sufficient to serialize on the submit queue now. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_submit.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm

[PATCH 08/11] drm/msm: Return ERR_PTR() from submit_create()

2021-07-17 Thread Rob Clark
From: Rob Clark In the next patch, we start having more than a single potential failure reason. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_submit.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b

[PATCH 09/11] drm/msm: Conversion to drm scheduler

2021-07-17 Thread Rob Clark
From: Rob Clark Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/4 Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/msm/msm_gem.c | 35 -- drivers/gpu/drm/msm/msm_gem.h | 24 - drivers/gpu/drm/msm/msm_gem_submit.c

[PATCH 07/11] drm/msm: Track "seqno" fences by idr

2021-07-17 Thread Rob Clark
From: Rob Clark Previously the (non-fd) fence returned from submit ioctl was a raw seqno, which is scoped to the ring. But from UABI standpoint, the ioctls related to seqno fences all specify a submitqueue. We can take advantage of that to replace the seqno fences with a cyclic idr handle

[PATCH 06/11] drm/msm: Consolidate submit bo state

2021-07-17 Thread Rob Clark
From: Rob Clark Move all the locked/active/pinned state handling to msm_gem_submit.c. In particular, for drm/scheduler, we'll need to do all this before pushing the submit job to the scheduler. But while we're at it we can get rid of the dupicate pin and refcnt. Signed-off-by: Rob Clark

[PATCH 05/11] drm/msm/submit: Simplify out-fence-fd handling

2021-07-17 Thread Rob Clark
From: Rob Clark No need for this to be split in two parts. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_submit.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index

[PATCH 04/11] drm: Drop drm_gem_object_put_locked()

2021-07-17 Thread Rob Clark
From: Rob Clark Now that no one is using it, remove it. Signed-off-by: Rob Clark --- drivers/gpu/drm/drm_gem.c | 22 -- include/drm/drm_gem.h | 2 -- 2 files changed, 24 deletions(-) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index

[PATCH 03/11] drm/msm: drop drm_gem_object_put_locked()

2021-07-17 Thread Rob Clark
From: Rob Clark No idea why we were still using this. It certainly hasn't been needed for some time. So drop the pointless twin codepaths. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 4 +- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 6 +-- drivers/gpu/drm

[PATCH 02/11] drm/msm: Small submitqueue creation cleanup

2021-07-17 Thread Rob Clark
From: Rob Clark If we don't have a gpu, there is no need to create a submitqueue, which lets us simplify the error handling and submitqueue creation. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_submitqueue.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff

[PATCH 01/11] drm/msm: Docs and misc cleanup

2021-07-17 Thread Rob Clark
From: Rob Clark Fix a couple incorrect or misspelt comments, and add submitqueue doc comment. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.h | 3 +-- drivers/gpu/drm/msm/msm_gem_submit.c | 1 + drivers/gpu/drm/msm/msm_gpu.h | 15 +++ drivers/gpu/drm

[PATCH 00/11] drm/msm: drm scheduler conversion and cleanups

2021-07-17 Thread Rob Clark
From: Rob Clark Conversion to gpu_scheduler, and bonus removal of drm_gem_object_put_locked() Rob Clark (11): drm/msm: Docs and misc cleanup drm/msm: Small submitqueue creation cleanup drm/msm: drop drm_gem_object_put_locked() drm: Drop drm_gem_object_put_locked() drm/msm/submit

Re: [PATCH v4 14/18] drm/msm: Don't break exclusive fence ordering

2021-07-13 Thread Rob Clark
On Tue, Jul 13, 2021 at 9:58 AM Daniel Vetter wrote: > > On Tue, Jul 13, 2021 at 6:51 PM Rob Clark wrote: > > > > On Mon, Jul 12, 2021 at 1:02 PM Daniel Vetter > > wrote: > > > > > > There's only one exclusive slot, and we must not break the ordering

Re: [PATCH v4 14/18] drm/msm: Don't break exclusive fence ordering

2021-07-13 Thread Rob Clark
em to care much, > - and it probably makes sense to lift this into dma-resv.c code as a > proper concept, so that drivers don't have to hack up their own > solution each on their own. > > v2: Improve commit message per Lucas' suggestion. > > Cc: Lucas Stach > Signed-off-by:

Re: [Freedreno] [PATCH] drm/msm/dsi: add support for dsi test pattern generator

2021-07-13 Thread Rob Clark
On Tue, Jun 29, 2021 at 12:04 PM Abhinav Kumar wrote: > > During board bringups its useful to have a DSI test pattern > generator to isolate a DPU vs a DSI issue and focus on the relevant > hardware block. > > To facilitate this, add an API which triggers the DSI controller > test pattern. The

Re: [PATCH v5 0/5] iommu/arm-smmu: adreno-smmu page fault handling

2021-07-08 Thread Rob Clark
On Tue, Jul 6, 2021 at 10:12 PM John Stultz wrote: > > On Sun, Jul 4, 2021 at 11:16 AM Rob Clark wrote: > > > > I suspect you are getting a dpu fault, and need: > > > > https://lore.kernel.org/linux-arm-msm/CAF6AEGvTjTUQXqom-xhdh456tdLscbVFPQ+iud1H1gHc8A2=h...@mai

[PATCH] drm/msm: Fix display fault handling

2021-07-07 Thread Rob Clark
From: Rob Clark It turns out that when the display is enabled by the bootloader, we can get some transient iommu faults from the display. Which doesn't go over too well when we install a fault handler that is gpu specific. To avoid this, defer installing the fault handler until we get around

Re: [PATCH v5 0/5] iommu/arm-smmu: adreno-smmu page fault handling

2021-07-04 Thread Rob Clark
gt; I've had splash screen disabled on my RB3. However once I've enabled it, > I've got the attached crash during the boot on the msm/msm-next. It > looks like it is related to this particular set of changes. > > On 11/06/2021 00:44, Rob Clark wrote: > > From: Rob Clark > > &

Re: [RFC] Inline rotation support in dpu driver

2021-07-04 Thread Rob Clark
On Sun, Jul 4, 2021 at 1:25 AM Dmitry Baryshkov wrote: > > On 03/07/2021 14:32, Kalyan Thota wrote: > > This change adds support for inline rotation in the dpu driver. > > When inline rotation is enabled the VIG pipes will directly fetch the image > > from memory in a rotated fashion > > > >

Re: [RFC] Inline rotation support in dpu driver

2021-07-03 Thread Rob Clark
On Sat, Jul 3, 2021 at 4:32 AM Kalyan Thota wrote: > > This change adds support for inline rotation in the dpu driver. > When inline rotation is enabled the VIG pipes will directly fetch the image > from memory in a rotated fashion > > Inline rotation has following restrictions > 1) Supported

Re: [PATCH v5 3/5] drm/msm: Improve the a6xx page fault handler

2021-06-25 Thread Rob Clark
On Thu, Jun 24, 2021 at 8:39 PM Bjorn Andersson wrote: > > On Thu 10 Jun 16:44 CDT 2021, Rob Clark wrote: > [..] > > diff --git a/drivers/gpu/drm/msm/msm_iommu.c > > b/drivers/gpu/drm/msm/msm_iommu.c > > index 50d881794758..6975b95c3c29 100644 > > --- a/drivers/

[pull v3] drm/msm: drm-msm-next-2021-06-23b for v5.14

2021-06-23 Thread Rob Clark
drm/msm/dp/dp_link: Fix some potential doc-rot Rob Clark (6): Merge branch 'msm-fixes-v5.13-rc6' into msm-next-redo drm/msm: Generated register update iommu/arm-smmu-qcom: Add stall support drm/msm: devcoredump iommu fault support drm/msm: Add debugfs to tr

[pull v2] drm/msm: drm-msm-next-2021-06-23 for v5.14

2021-06-23 Thread Rob Clark
sues drm/msm/msm_gem: Demote kernel-doc abuses drm/msm/dp/dp_catalog: Correctly document param 'dp_catalog' drm/msm/dp/dp_link: Fix some potential doc-rot Rob Clark (5): Merge branch 'msm-fixes-v5.13-rc6' into msm-next-redo drm/msm: Generated register update iommu/arm-

[pull] drm/msm: drm-msm-next-2021-06-17 for v5.14

2021-06-17 Thread Rob Clark
m/dp/dp_display: Remove unused variable 'hpd' drm/msm/disp/dpu1/dpu_plane: Fix a couple of naming issues drm/msm/msm_gem: Demote kernel-doc abuses drm/msm/dp/dp_catalog: Correctly document param 'dp_catalog' drm/msm/dp/dp_link: Fix some potential doc-rot Rob Clark (5): Merge br

Re: [PATCH v4 1/3] dt-bindings: msm: dsi: add missing 7nm bindings

2021-06-17 Thread Rob Clark
On Thu, Jun 17, 2021 at 8:09 AM Jonathan Marek wrote: > > These got lost when going from .txt to .yaml bindings, add them back. > Fixes: 8fc939e72ff8 ("dt-bindings: msm: dsi: add yaml schemas for DSI PHY bindings") > Signed-off-by: Jonathan Marek > --- >

[PATCH] drm/msm: Add debugfs to trigger shrinker

2021-06-14 Thread Rob Clark
From: Rob Clark Just for the purposes of testing. Write to it the # of objects to scan, read back the # freed. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_debugfs.c | 28 ++ drivers/gpu/drm/msm/msm_drv.h | 4 drivers/gpu/drm/msm

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

2021-06-10 Thread Rob Clark
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 adreno-smmu-priv. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno

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

2021-06-10 Thread Rob Clark
From: Rob Clark Add, via the adreno-smmu-priv interface, a way for the GPU to request the SMMU to stall translation on faults, and then later resume the translation, either retrying or terminating the current translation. This will be used on the GPU side to "freeze" the GPU while w

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

2021-06-10 Thread Rob Clark
From: 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 Signed-off-by: Rob Clark --- drivers/gpu/drm

[PATCH v5 2/5] iommu/arm-smmu-qcom: Add an adreno-smmu-priv callback to get pagefault info

2021-06-10 Thread Rob Clark
From: Jordan Crouse Add a callback in adreno-smmu-priv to read interesting SMMU registers to provide an opportunity for a richer debug experience in the GPU driver. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 17 drivers

[PATCH v5 1/5] iommu/arm-smmu: Add support for driver IOMMU fault handlers

2021-06-10 Thread Rob Clark
From: Jordan Crouse Call report_iommu_fault() to allow upper-level drivers to register their own fault handlers. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Acked-by: Will Deacon --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions

[PATCH v5 0/5] iommu/arm-smmu: adreno-smmu page fault handling

2021-06-10 Thread Rob Clark
From: Rob Clark This picks up an earlier series[1] from Jordan, and adds additional support needed to generate GPU devcore dumps on iova faults. Original description: This is a stack to add an Adreno GPU specific handler for pagefaults. The first patch starts by wiring up report_iommu_fault

[pull] drm/msm: drm-msm-fixes-2021-06-10 for v5.13-rc6

2021-06-10 Thread Rob Clark
Hi Dave & Daniel, A few late fixes for v5.13. This supersedes the previous fixes pull and adds a fix for a DSI issue which was preventing display from coming up on coachz. The following changes since commit f2f46b878777e0d3f885c7ddad48f477b4dea247: drm/msm/dp: initialize audio_comp when

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

2021-06-09 Thread Rob Clark
On Tue, Jun 8, 2021 at 8:20 AM Jordan Crouse wrote: > > 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.

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

2021-06-09 Thread Rob Clark
On Tue, Jun 8, 2021 at 8:12 AM Jordan Crouse wrote: > > 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 stat

[pull v2] drm/msm: msm-fixes-v5.13-rc6 for v5.13-rc6

2021-06-08 Thread Rob Clark
Hi Dave & Daniel, A few late fixes for v5.13 The following changes since commit f2f46b878777e0d3f885c7ddad48f477b4dea247: drm/msm/dp: initialize audio_comp when audio starts (2021-05-06 16:26:57 -0700) are available in the Git repository at: https://gitlab.freedesktop.org/drm/msm.git

Re: [pull] drm/msm: drm-msm-fixes-2021-06-08 for v5.13-rc6

2021-06-08 Thread Rob Clark
sorry, spotted a small typo, I'll resend this shortly On Tue, Jun 8, 2021 at 10:32 AM Rob Clark wrote: > > Hi Dave & Daniel, > > A few late fixes for v5.13 > > The following changes since commit f2f46b878777e0d3f885c7ddad48f477b4dea247: > > drm/msm/dp: initialize

[pull] drm/msm: drm-msm-fixes-2021-06-08 for v5.13-rc6

2021-06-08 Thread Rob Clark
Hi Dave & Daniel, A few late fixes for v5.13 The following changes since commit f2f46b878777e0d3f885c7ddad48f477b4dea247: drm/msm/dp: initialize audio_comp when audio starts (2021-05-06 16:26:57 -0700) are available in the Git repository at: https://gitlab.freedesktop.org/drm/msm.git

Re: [RFC 5/8] lib: add small API for handling register snapshots

2021-06-08 Thread Rob Clark
On Thu, Jun 3, 2021 at 9:33 AM Dmitry Baryshkov wrote: > > On Thu, 3 Jun 2021 at 17:41, Rob Clark wrote: > > > > On Fri, May 28, 2021 at 5:25 PM Dmitry Baryshkov > > wrote: > > > > > > Add small API covering lists of register dumps. Curren

Re: [Freedreno] [RFC PATCH 00/13] drm/msm: Add Display Stream Compression Support

2021-06-03 Thread Rob Clark
On Wed, Jun 2, 2021 at 4:01 AM Vinod Koul wrote: > > On 27-05-21, 16:30, Rob Clark wrote: > > On Wed, May 26, 2021 at 8:00 AM Jeffrey Hugo > > wrote: > > > On Tue, May 25, 2021 at 11:46 PM Vinod Koul wrote: > > > > Frankly, I don't like the MSM ACPI

Re: [RFC 5/8] lib: add small API for handling register snapshots

2021-06-03 Thread Rob Clark
On Fri, May 28, 2021 at 5:25 PM Dmitry Baryshkov wrote: > > Add small API covering lists of register dumps. Currently this is a part > of MSM DRM driver, but is extracted as it might be usefull to other > drivers too. > > Signed-off-by: Dmitry Baryshkov > --- > include/linux/dump_state.h | 78

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

2021-06-02 Thread Rob Clark
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 adreno-smmu-priv. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno

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

2021-06-02 Thread Rob Clark
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 unable to write out the requested state to memory. Signed-off

[RESEND PATCH v4 4/6] iommu/arm-smmu-qcom: Add stall support

2021-06-02 Thread Rob Clark
From: Rob Clark Add, via the adreno-smmu-priv interface, a way for the GPU to request the SMMU to stall translation on faults, and then later resume the translation, either retrying or terminating the current translation. This will be used on the GPU side to "freeze" the GPU while w

[RESEND PATCH v4 3/6] drm/msm: Improve the a6xx page fault handler

2021-06-02 Thread Rob Clark
From: 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 Signed-off-by: Rob Clark --- drivers/gpu/drm

[RESEND PATCH v4 2/6] iommu/arm-smmu-qcom: Add an adreno-smmu-priv callback to get pagefault info

2021-06-02 Thread Rob Clark
From: Jordan Crouse Add a callback in adreno-smmu-priv to read interesting SMMU registers to provide an opportunity for a richer debug experience in the GPU driver. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 17 drivers

<    11   12   13   14   15   16   17   18   19   20   >