[PATCH] drm/msm: Fix %d vs %u

2022-06-15 Thread Rob Clark
From: Rob Clark In debugging fence rollover, I noticed that GPU state capture and devcore dumps were showing me negative fence numbers. Let's fix that and some related signed vs unsigned confusion. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 10 +- 1 file

[PATCH] drm/msm: Fix fence rollover issue

2022-06-15 Thread Rob Clark
From: Rob Clark And while we are at it, let's start the fence counter close to the rollover point so that if issues slip in, they are more obvious. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_fence.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git

[PATCH 2/2] drm/msm: Don't overwrite hw fence in hw_init

2022-06-15 Thread Rob Clark
From: Rob Clark Prior to the last commit, this could result in setting the GPU written fence value back to an older value, if we had missed updating completed_fence prior to suspend. This was mostly harmless as the GPU would eventually overwrite it again with the correct value. But we should

[PATCH 1/2] drm/msm: Drop update_fences()

2022-06-15 Thread Rob Clark
From: Rob Clark I noticed while looking at some traces, that we could miss calls to msm_update_fence(), as the irq could have raced with retire_submits() which could have already popped the last submit on a ring out of the queue of in-flight submits. But walking the list of submits in the irq

Re: [PATCH] drm/msm/gem: Drop early returns in close/purge vma

2022-06-15 Thread Rob Clark
On Sat, Jun 11, 2022 at 11:16 AM Steev Klimaszewski wrote: > > Hi Rob, > > On 6/10/22 12:20 PM, Rob Clark wrote: > > From: Rob Clark > > > > Keep the warn, but drop the early return. If we do manage to hit this > > sort of issue, skipping the clean

[PATCH] drm/msm/gem: Drop obj lock in msm_gem_free_object()

2022-06-13 Thread Rob Clark
From: Rob Clark The only reason we grabbed the lock was to satisfy a bunch of places that WARN_ON() if called without the lock held. But this angers lockdep which doesn't realize no one else can be holding the lock by the time we end up destroying the object (and sees what would otherwise

[PATCH] drm/msm: Make msm_gem_free_object() static

2022-06-13 Thread Rob Clark
From: Rob Clark Misc small cleanup I noticed. Not called from another object file since 3c9edd9c85f5 ("drm/msm: Introduce GEM object funcs") Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 2 +- drivers/gpu/drm/msm/msm_gem.h | 1 - 2 files changed, 1 insertion(+), 2

[PATCH] drm/msm: Deprecate MSM_BO_UNCACHED harder

2022-06-13 Thread Rob Clark
From: Rob Clark Handle the demotion to MSM_BO_WC at the userspace ABI level, and fix the remaining internal MSM_BO_UNCACHED user. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c | 13 + drivers/gpu/drm/msm/msm_gem.c | 7 +++ drivers/gpu/drm/msm/msm_gpu.c | 2 +- 3

[PATCH] drm/msm/adreno: Defer enabling runpm until hw_init()

2022-06-13 Thread Rob Clark
From: Rob Clark To avoid preventing the display from coming up before the rootfs is mounted, without resorting to packing fw in the initrd, the GPU has this limbo state where the device is probed, but we aren't ready to start sending commands to it. This is particularly problematic for a6xx

[PATCH] drm/msm/gem: Drop early returns in close/purge vma

2022-06-10 Thread Rob Clark
From: Rob Clark Keep the warn, but drop the early return. If we do manage to hit this sort of issue, skipping the cleanup just makes things worse (dangling drm_mm_nodes when the msm_gem_vma is freed, etc). Whereas the worst that happens if we tear down a mapping the GPU is accessing is that we

Re: [PATCH v3] drm/msm: Avoid unclocked GMU register access in 6xx gpu_busy

2022-06-10 Thread Rob Clark
h b/drivers/gpu/drm/msm/msm_gpu.h > index 6def00883046..7ced1a30d4e8 100644 > --- a/drivers/gpu/drm/msm/msm_gpu.h > +++ b/drivers/gpu/drm/msm/msm_gpu.h > @@ -68,7 +68,8 @@ struct msm_gpu_funcs { > struct msm_gpu_state *(*gpu_state_get)(struct msm_gpu *gpu); >

Re: [PATCH v2] drm/msm: Grab the GPU runtime in a6xx routines, not the GMU one

2022-06-09 Thread Rob Clark
On Thu, Jun 9, 2022 at 11:04 AM Akhil P Oommen wrote: > > On 6/9/2022 10:17 PM, Douglas Anderson wrote: > > >From testing on sc7180-trogdor devices, reading the GMU registers > > needs the GMU clocks to be enabled. Those clocks get turned on in > > a6xx_gmu_resume(). Confusingly enough, that

[PATCH v3 1/2] drm: Add DRM_GEM_FOPS

2022-06-09 Thread Rob Clark
From: Rob Clark The DEFINE_DRM_GEM_FOPS() helper is a bit limiting if a driver wants to provide additional file ops, like show_fdinfo(). v2: Split out DRM_GEM_FOPS instead of making DEFINE_DRM_GEM_FOPS varardic v3: nits Signed-off-by: Rob Clark Acked-by: Thomas Zimmermann --- include

[PATCH v3 2/2] drm/msm: Expose client engine utilization via fdinfo

2022-06-09 Thread Rob Clark
From: Rob Clark Similar to AMD commit 874442541133 ("drm/amdgpu: Add show_fdinfo() interface"), using the infrastructure added in previous patches, we add basic client info and GPU engine utilisation for msm. Example output: # cat /proc/`pgrep glmark2`/fdinfo/6

Re: [PATCH] drm/msm: Grab the GPU runtime in a6xx routines, not the GMU one

2022-06-09 Thread Rob Clark
On Thu, Jun 9, 2022 at 7:34 AM Douglas Anderson wrote: > > From testing on sc7180-trogdor devices, reading the GMU registers > needs the GMU clocks to be enabled. Those clocks get turned on in > a6xx_gmu_resume(). Confusingly enough, that function is called as a > result of the runtime_pm of the

Re: [Freedreno] [PATCH] drm/msm: Switch ordering of runpm put vs devfreq_idle

2022-06-08 Thread Rob Clark
On Wed, Jun 8, 2022 at 12:36 PM Akhil P Oommen wrote: > > On 6/8/2022 3:00 AM, Rob Clark wrote: > > On Tue, Sep 28, 2021 at 7:52 AM Akhil P Oommen > > wrote: > >> On 9/27/2021 8:59 PM, Rob Clark wrote: > >>> From: Rob Clark > >>> > >&g

[PATCH v2] drm/msm: Switch ordering of runpm put vs devfreq_idle

2022-06-08 Thread Rob Clark
From: Rob Clark I've seen a few crashes like: CPU: 0 PID: 216 Comm: A618-worker Tainted: GW 5.4.196 #7 Hardware name: Google Wormdingler rev1+ INX panel board (DT) pstate: 20c9 (nzCv daif +PAN +UAO) pc : msm_readl+0x14/0x34 lr : a6xx_gpu_busy+0x40/0x80

Re: [Freedreno] [PATCH] drm/msm: Switch ordering of runpm put vs devfreq_idle

2022-06-07 Thread Rob Clark
On Tue, Sep 28, 2021 at 7:52 AM Akhil P Oommen wrote: > > On 9/27/2021 8:59 PM, Rob Clark wrote: > > From: Rob Clark > > > > I've seen a few crashes like: > > > > Internal error: synchronous external abort: 9610 [#1] PREEMPT SMP > >

Re: [PATCH v2 2/2] drm/msm: Expose client engine utilization via fdinfo

2022-06-07 Thread Rob Clark
On Tue, Jun 7, 2022 at 9:02 AM Rob Clark wrote: > > On Tue, Jun 7, 2022 at 1:56 AM Tvrtko Ursulin > wrote: > > > > > > On 06/06/2022 20:54, Rob Clark wrote: > > > From: Rob Clark > > > > > > Similar to AMD commit > > >

Re: [PATCH v2 2/2] drm/msm: Expose client engine utilization via fdinfo

2022-06-07 Thread Rob Clark
On Tue, Jun 7, 2022 at 1:56 AM Tvrtko Ursulin wrote: > > > On 06/06/2022 20:54, Rob Clark wrote: > > From: Rob Clark > > > > Similar to AMD commit > > 874442541133 ("drm/amdgpu: Add show_fdinfo() interface"), using the > > infrastructure ad

Re: [PATCH v2 1/2] drm: Add DRM_GEM_FOPS

2022-06-07 Thread Rob Clark
On Mon, Jun 6, 2022 at 11:56 PM Thomas Zimmermann wrote: > > Hi > > Am 06.06.22 um 21:54 schrieb Rob Clark: > > From: Rob Clark > > > > The DEFINE_DRM_GEM_FOPS() helper is a bit limiting if a driver wants to > > provide additional file ops, like show_fdinfo

Re: [PATCH] drm/msm: Fix double pm_runtime_disable() call

2022-06-06 Thread Rob Clark
o fix. Therefore, instead check > whether runtime PM is still enabled, and only disable it in that case. > > Fixes: 17e822f7591f ("drm/msm: fix unbalanced pm_runtime_enable in > adreno_gpu_{init, cleanup}") > Signed-off-by: Maximilian Luz Reviewed-by: Rob Clark > --- > d

[PATCH v2 2/2] drm/msm: Expose client engine utilization via fdinfo

2022-06-06 Thread Rob Clark
From: Rob Clark Similar to AMD commit 874442541133 ("drm/amdgpu: Add show_fdinfo() interface"), using the infrastructure added in previous patches, we add basic client info and GPU engine utilisation for msm. Example output: # cat /proc/`pgrep glmark2`/fdinfo/6

[PATCH v2 1/2] drm: Add DRM_GEM_FOPS

2022-06-06 Thread Rob Clark
From: Rob Clark The DEFINE_DRM_GEM_FOPS() helper is a bit limiting if a driver wants to provide additional file ops, like show_fdinfo(). Signed-off-by: Rob Clark --- include/drm/drm_gem.h | 26 ++ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/include

Re: [PATCH v6 17/22] drm/shmem-helper: Add generic memory shrinker

2022-06-05 Thread Rob Clark
On Sun, Jun 5, 2022 at 9:47 AM Daniel Vetter wrote: > > On Fri, 27 May 2022 at 01:55, Dmitry Osipenko > wrote: > > > > Introduce a common DRM SHMEM shrinker framework that allows to reduce > > code duplication among DRM drivers by replacing theirs custom shrinker > > implementations with the

Re: linux-next: Fixes tag needs some work in the drm tree

2022-06-03 Thread Rob Clark
On Fri, Jun 3, 2022 at 5:38 PM Stephen Rothwell wrote: > > Hi Rob, > > On Fri, 3 Jun 2022 07:58:14 -0700 Rob Clark wrote: > > > > will the truncated subject confuse the scripts that look for patches > > to backport to stable, ie. do we *really* have to rewrite

Re: linux-next: Fixes tag needs some work in the drm tree

2022-06-03 Thread Rob Clark
On Thu, Jun 2, 2022 at 10:16 PM Stephen Rothwell wrote: > > Hi all, > > In commit > > 8caad14e7224 ("drm/msm/dpu: Fix pointer dereferenced before checking") > > Fixes tag > > Fixes: d7d0e73f7de33 ("drm/msm/dpu: introduce the dpu_encoder_phys_* for > > has these problem(s): > > - Subject has

Re: [PATCH] drm/msm: Ensure mmap offset is initialized

2022-05-31 Thread Rob Clark
On Tue, May 31, 2022 at 1:34 PM Dmitry Baryshkov wrote: > > On Tue, 31 May 2022 at 23:08, Rob Clark wrote: > > > > From: Rob Clark > > > > If a GEM object is allocated, and then exported as a dma-buf fd which is > > mmap'd before or without the GEM buffer bei

Re: [PATCH] drm/msm/dpu: Fix pointer dereferenced before checking

2022-05-31 Thread Rob Clark
On Mon, May 30, 2022 at 12:34 AM Haowen Bai wrote: > > The ctx->hw is dereferencing before null checking, so move > it after checking. > > Signed-off-by: Haowen Bai > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git

[PATCH] drm/msm: Ensure mmap offset is initialized

2022-05-31 Thread Rob Clark
From: Rob Clark If a GEM object is allocated, and then exported as a dma-buf fd which is mmap'd before or without the GEM buffer being directly mmap'd, the vma_node could be unitialized. This leads to a situation where the CPU mapping is not correctly torn down in drm_vma_node_unmap(). Fixes

Re: [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-31 Thread Rob Clark
On Tue, May 31, 2022 at 5:32 AM Daniel Vetter wrote: > > On Mon, 30 May 2022 at 17:41, Rob Clark wrote: > > > > On Mon, May 30, 2022 at 7:49 AM Daniel Vetter wrote: > > > > > > On Mon, 30 May 2022 at 15:54, Rob Clark wrote: > > > > > >

Re: [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Rob Clark
On Mon, May 30, 2022 at 10:20 AM Thomas Zimmermann wrote: > > Hi > > Am 30.05.22 um 17:41 schrieb Rob Clark: > > On Mon, May 30, 2022 at 7:49 AM Daniel Vetter wrote: > >> > >> On Mon, 30 May 2022 at 15:54, Rob Clark wrote: > >>> > >

Re: [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Rob Clark
On Mon, May 30, 2022 at 7:49 AM Daniel Vetter wrote: > > On Mon, 30 May 2022 at 15:54, Rob Clark wrote: > > > > On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann > > wrote: > > > > > > Hi > > > > > > Am 29.05.22 um 18:29 schrieb

Re: [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Rob Clark
On Mon, May 30, 2022 at 7:16 AM Thomas Zimmermann wrote: > > Hi > > Am 30.05.22 um 15:47 schrieb Rob Clark: > > On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann > > wrote: > >> > >> Hi > >> > >> Am 29.05.22 um 18:29 schrieb R

Re: [PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-30 Thread Rob Clark
On Mon, May 30, 2022 at 12:26 AM Thomas Zimmermann wrote: > > Hi > > Am 29.05.22 um 18:29 schrieb Rob Clark: > > From: Rob Clark > > > > If a GEM object is allocated, and then exported as a dma-buf fd which is > > mmap'd before or without the GEM buffer bei

[PATCH v2] drm/msm/adreno: Allow larger address space size

2022-05-29 Thread Rob Clark
From: Rob Clark The restriction to 4G was strictly to work around 64b math bug in some versions of SQE firmware. This appears to be fixed in a650+ SQE fw, so allow a larger address space size on these devices. Also, add a modparam override for debugging and igt. v2: Send the right version

[PATCH] drm/msm/adreno: Allow larger address space size

2022-05-29 Thread Rob Clark
From: Rob Clark The restriction to 4G was strictly to work around 64b math bug in some versions of SQE firmware. This appears to be fixed in a650+ SQE fw, so allow a larger address space size on these devices. Also, add a modparam override for debugging and igt. Signed-off-by: Rob Clark

[PATCH] drm/prime: Ensure mmap offset is initialized

2022-05-29 Thread Rob Clark
From: Rob Clark If a GEM object is allocated, and then exported as a dma-buf fd which is mmap'd before or without the GEM buffer being directly mmap'd, the vma_node could be unitialized. This leads to a situation where the CPU mapping is not correctly torn down in drm_vma_node_unmap(). Fixes

[PATCH] drm/msm/gem: Separate object and vma unpin

2022-05-27 Thread Rob Clark
From: Rob Clark Previously the BO_PINNED state in the submit was tracking two related but different things: (1) that the buffer object was pinned, and (2) that the vma (mapping within a set of pagetables) was pinned. But with fenced vma unpin (needed so that userspace couldn't race with retire

Re: [PATCH v4 12/13] drm/msm: Utilize gpu scheduler priorities

2022-05-26 Thread Rob Clark
On Thu, May 26, 2022 at 6:29 AM Tvrtko Ursulin wrote: > > > On 26/05/2022 04:15, Rob Clark wrote: > > On Wed, May 25, 2022 at 9:11 AM Tvrtko Ursulin > > wrote: > >> > >> > >> On 24/05/2022 15:57, Rob Clark wrote: > >>>

Re: [Freedreno] [PATCH v4 12/13] drm/msm: Utilize gpu scheduler priorities

2022-05-26 Thread Rob Clark
On Thu, May 26, 2022 at 4:38 AM Tvrtko Ursulin wrote: > > > On 26/05/2022 04:37, Rob Clark wrote: > > On Wed, May 25, 2022 at 9:22 AM Tvrtko Ursulin > > wrote: > >> > >> > >> On 25/05/2022 14:41, Rob Clark wrote: > >>>

Re: [PATCH v4 12/13] drm/msm: Utilize gpu scheduler priorities

2022-05-25 Thread Rob Clark
On Wed, May 25, 2022 at 9:22 AM Tvrtko Ursulin wrote: > > > On 25/05/2022 14:41, Rob Clark wrote: > > On Wed, May 25, 2022 at 2:46 AM Tvrtko Ursulin > > wrote: > >> > >> > >> On 24/05/2022 15:50, Rob Clark wrote: > >>>

Re: [PATCH v4 12/13] drm/msm: Utilize gpu scheduler priorities

2022-05-25 Thread Rob Clark
On Wed, May 25, 2022 at 9:11 AM Tvrtko Ursulin wrote: > > > On 24/05/2022 15:57, Rob Clark wrote: > > On Tue, May 24, 2022 at 6:45 AM Tvrtko Ursulin > > wrote: > >> > >> On 23/05/2022 23:53, Rob Clark wrote: > >>> > >>> btw,

Re: [PATCH v4 12/13] drm/msm: Utilize gpu scheduler priorities

2022-05-25 Thread Rob Clark
On Wed, May 25, 2022 at 2:46 AM Tvrtko Ursulin wrote: > > > On 24/05/2022 15:50, Rob Clark wrote: > > On Tue, May 24, 2022 at 6:45 AM Tvrtko Ursulin > > wrote: > >> > >> > >> On 23/05/2022 23:53, Rob Clark wrote: > >>>

Re: [PATCH v4 12/13] drm/msm: Utilize gpu scheduler priorities

2022-05-24 Thread Rob Clark
On Tue, May 24, 2022 at 7:57 AM Rob Clark wrote: > > On Tue, May 24, 2022 at 6:45 AM Tvrtko Ursulin > wrote: > > > > On 23/05/2022 23:53, Rob Clark wrote: > > > > > > btw, one fun (but unrelated) issue I'm hitting with scheduler... I'm > > > tryin

Re: [PATCH v4 12/13] drm/msm: Utilize gpu scheduler priorities

2022-05-24 Thread Rob Clark
On Tue, May 24, 2022 at 6:45 AM Tvrtko Ursulin wrote: > > On 23/05/2022 23:53, Rob Clark wrote: > > > > btw, one fun (but unrelated) issue I'm hitting with scheduler... I'm > > trying to add an igt test to stress shrinker/eviction, similar to the > > existing tests/

Re: [PATCH v4 12/13] drm/msm: Utilize gpu scheduler priorities

2022-05-24 Thread Rob Clark
On Tue, May 24, 2022 at 6:45 AM Tvrtko Ursulin wrote: > > > On 23/05/2022 23:53, Rob Clark wrote: > > On Mon, May 23, 2022 at 7:45 AM Tvrtko Ursulin > > wrote: > >> > >> > >> Hi Rob, > >> > >> On 28/07/2021 02:06, Rob Clark wr

Re: [PATCH v4 12/13] drm/msm: Utilize gpu scheduler priorities

2022-05-23 Thread Rob Clark
On Mon, May 23, 2022 at 7:45 AM Tvrtko Ursulin wrote: > > > Hi Rob, > > On 28/07/2021 02:06, Rob Clark wrote: > > From: Rob Clark > > > > The drm/scheduler provides additional prioritization on top of that > > provided by however many number of ringbuffers

Re: [PATCH v2] drm/msm/dpu: handle pm_runtime_get_sync() errors in bind path

2022-05-18 Thread Rob Clark
> but at the very least we should be able to prevent the > crash by handling the error and bailing out earlier. > > changes in v2: > - use pm_runtime_resume_and_get() instead of > pm_runtime_get_sync() > > Signed-off-by: Abhinav Kumar Reviewed-by: Rob Clar

Re: [PATCH 1/1] drm/panfrost: Add support for devcoredump

2022-05-18 Thread Rob Clark
On Tue, May 17, 2022 at 10:42 AM Adrián Larumbe wrote: > > In the event of a job timeout, debug dump information will be written into > /sys/class/devcoredump. > > Inspired by etnaviv's similar feature. > > Signed-off-by: Adrián Larumbe > --- > drivers/gpu/drm/panfrost/Kconfig | 1 + >

Re: [PATCH 1/2] drm/msm/dsi: move DSI host powerup to modeset time

2022-05-11 Thread Rob Clark
On Wed, May 11, 2022 at 2:49 PM Dmitry Baryshkov wrote: > > On 11/05/2022 23:06, Doug Anderson wrote: > > Hi, > > > > On Tue, Dec 7, 2021 at 2:29 PM Dmitry Baryshkov > > wrote: > >> > >> The DSI subsystem does not fully fall into the pre-enable/enable system > >> of callbacks, since typically

Re: [Freedreno] [RFC v2] drm/msm: Add initial ci/ subdirectory

2022-05-11 Thread Rob Clark
On Wed, May 11, 2022 at 12:14 PM Daniel Vetter wrote: > > On Wed, 11 May 2022 at 19:46, Rob Clark wrote: > > > > On Wed, May 11, 2022 at 10:12 AM Daniel Vetter wrote: > > > > > > On Tue, 10 May 2022 at 22:26, Rob Clark wrote: > > > > > &

Re: [Freedreno] Adding CI results to the kernel tree was Re: [RFC v2] drm/msm: Add initial ci/ subdirectory

2022-05-11 Thread Rob Clark
On Wed, May 11, 2022 at 12:12 PM Linus Torvalds wrote: > > On Wed, May 11, 2022 at 12:08 PM Linus Torvalds > wrote: > > > > The kernel tree might have just the expected *failures* listed, if > > there are any. Presumably the ci tree has to have the expected results > > anyway, so what's the

Re: Adding CI results to the kernel tree was Re: [RFC v2] drm/msm: Add initial ci/ subdirectory

2022-05-11 Thread Rob Clark
On Wed, May 11, 2022 at 12:08 PM Linus Torvalds wrote: > > On Wed, May 11, 2022 at 11:40 AM Rob Clark wrote: > > > > It is missing in this revision of the RFC, but the intention is to > > have the gitlab-ci.yml point to a specific commit SHA in the > > gfx-ci/drm-ci

Re: Adding CI results to the kernel tree was Re: [RFC v2] drm/msm: Add initial ci/ subdirectory

2022-05-11 Thread Rob Clark
On Wed, May 11, 2022 at 10:33 AM Linus Torvalds wrote: > > On Tue, May 10, 2022 at 10:07 PM Dave Airlie wrote: > > > > > And use it to store expectations about what the drm/msm driver is > > > supposed to pass in the IGT test suite. > > > > I wanted to loop in Linus/Greg to see if there are any

Re: [Freedreno] [RFC v2] drm/msm: Add initial ci/ subdirectory

2022-05-11 Thread Rob Clark
On Wed, May 11, 2022 at 10:12 AM Daniel Vetter wrote: > > On Tue, 10 May 2022 at 22:26, Rob Clark wrote: > > > > On Tue, May 10, 2022 at 12:39 PM Jessica Zhang > > wrote: > > > > > > > > > > > > On 5/10/2022 7:13 AM, Tomeu Vizos

Re: [Freedreno] Adding CI results to the kernel tree was Re: [RFC v2] drm/msm: Add initial ci/ subdirectory

2022-05-11 Thread Rob Clark
On Wed, May 11, 2022 at 9:43 AM Daniel Vetter wrote: > > On Wed, 11 May 2022 at 15:33, Rob Clark wrote: > > On Wed, May 11, 2022 at 4:50 AM Greg Kroah-Hartman > > wrote: > > > > > > On Wed, May 11, 2022 at 12:26:05PM +0200, Michel Dänzer wrote: > > &

Re: [RFC] drm/msm: Add initial ci/ subdirectory

2022-05-11 Thread Rob Clark
On Wed, May 11, 2022 at 7:26 AM Jani Nikula wrote: > > On Tue, 10 May 2022, Tomeu Vizoso wrote: > > And use it to store expectations about what the drm/msm driver is > > supposed to pass in the IGT test suite. > > > > Also include a configuration file that points to the out-of-tree CI > >

Re: [Freedreno] Adding CI results to the kernel tree was Re: [RFC v2] drm/msm: Add initial ci/ subdirectory

2022-05-11 Thread Rob Clark
On Wed, May 11, 2022 at 4:50 AM Greg Kroah-Hartman wrote: > > On Wed, May 11, 2022 at 12:26:05PM +0200, Michel Dänzer wrote: > > On 2022-05-11 08:22, Greg Kroah-Hartman wrote: > > > On Wed, May 11, 2022 at 03:06:47PM +1000, Dave Airlie wrote: > > >>> And use it to store expectations about what

Re: [RFC v3] drm/msm: Add initial ci/ subdirectory

2022-05-11 Thread Rob Clark
On Tue, May 10, 2022 at 11:15 PM Tomeu Vizoso wrote: > > And use it to store expectations about what the drm/msm driver is > supposed to pass in the IGT test suite. > > Also include a configuration file that points to the out-of-tree CI > scripts. > > By storing the test expectations along the

Re: [Freedreno] [RFC v2] drm/msm: Add initial ci/ subdirectory

2022-05-10 Thread Rob Clark
On Tue, May 10, 2022 at 12:39 PM Jessica Zhang wrote: > > > > On 5/10/2022 7:13 AM, Tomeu Vizoso wrote: > > And use it to store expectations about what the drm/msm driver is > > supposed to pass in the IGT test suite. > > > > Also include a configuration file that points to the out-of-tree CI > >

Re: [PATCH] drm/msm: Fix fb plane offset calculation

2022-05-10 Thread Rob Clark
On Tue, May 10, 2022 at 10:46 AM Dmitry Baryshkov wrote: > > On Tue, 10 May 2022 at 19:52, Rob Clark wrote: > > > > From: Rob Clark > > > > The offset got dropped by accident. > > > > Fixes: d413e6f97134 ("drm/msm: Drop msm_gem_iova()") &

[PATCH] drm/msm: Fix fb plane offset calculation

2022-05-10 Thread Rob Clark
From: Rob Clark The offset got dropped by accident. Fixes: d413e6f97134 ("drm/msm: Drop msm_gem_iova()") Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_fb.c b/drivers/gpu/drm/ms

Re: [pull] drm/msm: drm-msm-next-2022-05-09 for v5.19

2022-05-09 Thread Rob Clark
On Mon, May 9, 2022 at 9:02 AM Rob Clark wrote: > > Hi Dave & Daniel, > > Here is the main drm/msm pull request for v5.19, containing: > > - Fourcc modifier for tiled but not compressed layouts > - Support for userspace allocated IOVA (GPU virtual address) >

[pull] drm/msm: drm-msm-next-2022-05-09 for v5.19

2022-05-09 Thread Rob Clark
msm: fix error check return value of irq_of_parse_and_map() Marijn Suijten (2): drm/msm/dpu: Bind pingpong block to intf on active ctls in cmd encoder drm/msm/dpu: Use indexed array initializer to prevent mismatches Rob Clark (16): drm/fourcc: Add QCOM tiled modifiers drm

Re: [bug report] drm/msm: devcoredump iommu fault support

2022-05-09 Thread Rob Clark
On Sun, May 8, 2022 at 11:28 PM Dan Carpenter wrote: > > Hello Rob Clark, > > The patch e25e92e08e32: "drm/msm: devcoredump iommu fault support" > from Jun 10, 2021, leads to the following Smatch static checker > warning: > > drivers/gpu/drm/msm/msm_gpu.c:418 rec

Re: [PATCH v3 2/2] drm/msm/mdp5: Return error code in mdp5_mixer_release when deadlock is detected

2022-05-05 Thread Rob Clark
rence error, let's have mdp5_mixer_release > check if an error is returned and propagate that error. > > Reported-by: Tomeu Vizoso > Signed-off-by: Jessica Zhang Fixes: 7907a0d77cb4 ("drm/msm/mdp5: Use the new private_obj state") Reviewed-by: Rob Clark > --- > d

Re: [PATCH v3 1/2] drm/msm/mdp5: Return error code in mdp5_pipe_release when deadlock is detected

2022-05-05 Thread Rob Clark
eu Vizoso > Signed-off-by: Jessica Zhang Fixes: 7907a0d77cb4 ("drm/msm/mdp5: Use the new private_obj state") Reviewed-by: Rob Clark > --- > drivers/gpu/drm/msm/disp/mdp5/mdp5_pipe.c | 15 +++ > drivers/gpu/drm/msm/disp/mdp5/mdp5_pipe.h | 2 +- > dri

Re: [PATCH v2] drm/msm/mdp5: Return error code in mdp5_pipe_release when deadlock is detected

2022-05-04 Thread Rob Clark
On Wed, May 4, 2022 at 6:55 PM Jessica Zhang wrote: > > mdp5_get_global_state runs the risk of hitting a -EDEADLK when acquiring > the modeset lock, but currently mdp5_pipe_release doesn't check for if > an error is returned. Because of this, there is a possibility of > mdp5_pipe_release hitting

Re: [PATCH] drm/msm: Limit command submission when no IOMMU

2022-05-03 Thread Rob Clark
On Tue, May 3, 2022 at 5:12 AM Lucas Stach wrote: > > Am Montag, dem 02.05.2022 um 10:29 -0700 schrieb Rob Clark: > > From: Rob Clark > > > > Running the GPU without an IOMMU is not really a supported (or sane) > > configuration. Yet it can be useful during SoC

[PATCH] drm/msm: Limit command submission when no IOMMU

2022-05-02 Thread Rob Clark
From: Rob Clark Running the GPU without an IOMMU is not really a supported (or sane) configuration. Yet it can be useful during SoC bringup (ie. if the iommu driver doesn't work yet). Lets limit it to users who already have /dev/mem access, to avoid the chance that a user accidentially

[pull] drm/msm: drm-msm-fixes-2022-04-30

2022-04-30 Thread Rob Clark
Hi Dave & Daniel, One last fix for v5.18, to fix a lockdep issue. Sorry, I meant to send this a couple days ago but forgot. The following changes since commit 0371870b96907bf560ecf7dc3fadc238fadf7845: drm/msm: Revert "drm/msm: Stop using iommu_present()" (2022-04-19 10:33:07 -0700) are

Re: [PATCH v2] MAINTAINERS: Add Dmitry as MSM DRM driver co-maintainer

2022-04-29 Thread Rob Clark
ted part. Let's note this in the MAINTAINERS file. > > While we are at it, per Rob's suggestion let's also promote Abhinav > Kumar to M: (as he is actively working on the driver) and switch Sean > Paul to R: (since he isn't doing much on msm these days). > > Signed-off-by: Dmitr

Re: [PATCH v2] drm/msm: add trace_dma_fence_emit to msm_gpu_submit

2022-04-27 Thread Rob Clark
On Tue, Apr 26, 2022 at 11:20 PM Christian König wrote: > > Am 26.04.22 um 20:50 schrieb Chia-I Wu: > > On Tue, Apr 26, 2022 at 11:02 AM Christian König > > wrote: > >> Am 26.04.22 um 19:40 schrieb Chia-I Wu: > >>> [SNIP] > >> Well I just send a patch to completely remove the trace point. >

Re: [PATCH v2] drm/msm: add trace_dma_fence_emit to msm_gpu_submit

2022-04-26 Thread Rob Clark
On Tue, Apr 26, 2022 at 10:08 AM Christian König wrote: > > Am 26.04.22 um 19:05 schrieb Rob Clark: > > On Tue, Apr 26, 2022 at 9:42 AM Christian König > > wrote: > >> Am 26.04.22 um 18:32 schrieb Chia-I Wu: > >>> On Tue, Apr 12, 2022 at 2:26

Re: [PATCH v2] drm/msm: add trace_dma_fence_emit to msm_gpu_submit

2022-04-26 Thread Rob Clark
> fence timelines. > >> > >> v2: improve commit message (Dmitry) > >> > >> Signed-off-by: Chia-I Wu > >> Cc: Rob Clark > >> Reviewed-by: Dmitry Baryshkov > > This has been reviewed. Should we land it? > > No, there are still open discussio

Re: [PATCH] drm/virtio: Add execbuf flag to request no fence-event

2022-04-22 Thread Rob Clark
On Tue, Apr 5, 2022 at 10:57 AM Chia-I Wu wrote: > > On Tue, Apr 5, 2022 at 10:38 AM Rob Clark wrote: > > > > From: Rob Clark > > > > It would have been cleaner to have a flag to *request* the fence event. > > But that ship has sailed. So add a flag so t

Re: [PATCH v3] drm: of: Properly try all possible cases for bridge/panel detection

2022-04-20 Thread Rob Clark
On Tue, Apr 5, 2022 at 10:01 AM Thierry Reding wrote: > > On Fri, Apr 01, 2022 at 09:44:46AM +0200, Paul Kocialkowski wrote: > > Hi Bjorn, > > > > On Thu 31 Mar 22, 20:16, Bjorn Andersson wrote: > > > On Tue 29 Mar 06:27 PDT 2022, Paul Kocialkowski wrote: > > > > > > > While bridge/panel

[pull] drm/msm: drm-msm-fixes-2022-04-20 for v5.18

2022-04-20 Thread Rob Clark
Hi Dave & Daniel, One more fix for v5.18.. actually a revert to fix iommu breakage on older devices The following changes since commit 390d645877ffd6dcb55f162d618045b2779217b3: drm/msm/gpu: Avoid -Wunused-function with !CONFIG_PM_SLEEP (2022-04-11 18:35:31 -0700) are available in the Git

Re: [PATCH AUTOSEL 5.4 11/14] drm/msm: Stop using iommu_present()

2022-04-19 Thread Rob Clark
Signed-off-by: Robin Murphy > Reviewed-by: Rob Clark > Patchwork: https://patchwork.freedesktop.org/patch/480707/ > Link: > https://lore.kernel.org/r/5ab4f4574d7f3e042261da702d493ee40d003356.1649168268.git.robin.mur...@arm.com > Signed-off-by: Dmitry Baryshkov > Signed-off-by: Rob

[pull] drm/msm: drm-msm-fixes-2022-04-13 for v5.18

2022-04-13 Thread Rob Clark
tion with !CONFIG_PM_SLEEP Rob Clark (5): drm/msm/gpu: Rename runtime suspend/resume functions drm/msm/gpu: Park scheduler threads for system suspend drm/msm/gpu: Remove mutex from wait_event condition drm/msm: Add missing put_task_struct() in debugfs path drm/msm: Fix r

Re: [PATCH] drm/msm: add trace_dma_fence_emit to msm_gpu_submit

2022-04-12 Thread Rob Clark
visualization can't easily differentiate between drivers/timelines where the split matters and ones where it doesn't.. IMO it is better to just have the extra trace even in the cases where it comes at the same time as the init trace BR, -R > Regards, > Christian. > > > > > Sig

[PATCH v4 10/10] drm/msm: Add a way for userspace to allocate GPU iova

2022-04-11 Thread Rob Clark
From: Rob Clark The motivation at this point is mainly native userspace mesa driver in a VM guest. The one remaining synchronous "hotpath" is buffer allocation, because guest needs to wait to know the bo's iova before it can start emitting cmdstream/state that references

[PATCH v4 09/10] drm/msm/gem: Add fenced vma unpin

2022-04-11 Thread Rob Clark
From: Rob Clark With userspace allocated iova (next patch), we can have a race condition where userspace observes the fence completion and deletes the vma before retire_submit() gets around to unpinning the vma. To handle this, add a fenced unpin which drops the refcount but tracks the fence

[PATCH v4 08/10] drm/msm/gem: Split vma lookup and pin

2022-04-11 Thread Rob Clark
From: Rob Clark This way we only lookup vma once per object per submit, for both the submit and retire path. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c| 60 +--- drivers/gpu/drm/msm/msm_gem.h| 9 +++-- drivers/gpu/drm/msm

[PATCH v4 07/10] drm/msm/gem: Rework vma lookup and pin

2022-04-11 Thread Rob Clark
From: Rob Clark Combines duplicate vma lookup in the get_and_pin path. Signed-off-by: Rob Clark Reviewed-by: Dmitry Osipenko --- drivers/gpu/drm/msm/msm_gem.c | 50 ++- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/msm

[PATCH v4 06/10] drm/msm: Drop msm_gem_iova()

2022-04-11 Thread Rob Clark
From: Rob Clark There was only a single user, which could just as easily stash the iova when pinning. v2: fix prepare->prepare->cleanup->cleanup sequences Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_fb.c | 20 ++-- drivers/gp

[PATCH v4 05/10] drm/msm/gem: Drop PAGE_SHIFT for address space mm

2022-04-11 Thread Rob Clark
From: Rob Clark Get rid of all the unnecessary conversion between address/size and page offsets. It just confuses things. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 +- drivers/gpu/drm/msm/msm_gem.c | 5 ++--- drivers/gpu

[PATCH v4 04/10] drm/msm/gem: Split out inuse helper

2022-04-11 Thread Rob Clark
From: Rob Clark Prep for a following patch, where it gets a bit more complicated. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 2 +- drivers/gpu/drm/msm/msm_gem.h | 1 + drivers/gpu/drm/msm/msm_gem_vma.c | 9 +++-- 3 files changed, 9 insertions(+), 3 deletions

[PATCH v4 03/10] drm/msm/gem: Convert some missed GEM_WARN_ON()s

2022-04-11 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_vma.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_vma.c b/drivers/gpu/drm/msm/msm_gem_vma.c index f914ddbaea89..64906594fc65 100644 --- a/drivers/gpu/drm/msm

[PATCH v4 02/10] drm/msm/gpu: Drop duplicate fence counter

2022-04-11 Thread Rob Clark
From: Rob Clark The ring seqno counter duplicates the fence-context last_fence counter. They end up getting incremented in lock-step, on the same scheduler thread, but the split just makes things less obvious. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2

[PATCH v4 01/10] drm/msm/gem: Move prototypes

2022-04-11 Thread Rob Clark
From: Rob Clark These belong more cleanly in the gem header. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_drv.h | 23 --- drivers/gpu/drm/msm/msm_gem.h | 22 ++ 2 files changed, 22 insertions(+), 23 deletions

[PATCH v4 00/10] drm/msm: Userspace allocated GPU addresses

2022-04-11 Thread Rob Clark
From: Rob Clark The first six paches are various cleanups and simplifications. The next two get rid of redundant vma lookups in the submit and retire paths. Following that, fenced vma lets us indicate a fence value following which the vma is no longer used, which is needed because otherwise

Re: [PATCH] drm/atomic-helpers: remove legacy_cursor_update hacks

2022-04-07 Thread Rob Clark
On Thu, Apr 7, 2022 at 3:59 PM Abhinav Kumar wrote: > > Hi Rob and Daniel > > On 4/7/2022 3:51 PM, Rob Clark wrote: > > On Wed, Apr 6, 2022 at 6:27 PM Jessica Zhang > > wrote: > >> > >> > >> > >> On 3/31/2022 8:20 AM, Daniel Vetter w

Re: [PATCH] drm/atomic-helpers: remove legacy_cursor_update hacks

2022-04-07 Thread Rob Clark
s: https://bugzilla.kernel.org/show_bug.cgi?id=199425 > > References: > > https://lore.kernel.org/all/20220221134155.125447-9-max...@cerno.tech/ > > References: https://bugzilla.kernel.org/show_bug.cgi?id=199425 > > Cc: Maxime Ripard > > Tested-by: Maxime Ripard > &

[PATCH] drm/msm: Fix range size vs end confusion

2022-04-07 Thread Rob Clark
From: Rob Clark The fourth param is size, rather than range_end. Note that we could increase the address space size if we had a way to prevent buffers from spanning a 4G split, mostly just to avoid fw bugs with 64b math. Fixes: 84c31ee16f90 ("drm/msm/a6xx: Add support for per-ins

Re: [PATCH] drm/atomic-helpers: remove legacy_cursor_update hacks

2022-04-06 Thread Rob Clark
g afaict. > > v4: Fixup i915 fixup ... > > References: https://bugzilla.kernel.org/show_bug.cgi?id=199425 > References: > https://lore.kernel.org/all/20220221134155.125447-9-max...@cerno.tech/ > References: https://bugzilla.kernel.org/show_bug.cgi?id=199425 > Cc: Maxime Ripard

[PATCH v3 10/10] drm/msm: Add a way for userspace to allocate GPU iova

2022-04-06 Thread Rob Clark
From: Rob Clark The motivation at this point is mainly native userspace mesa driver in a VM guest. The one remaining synchronous "hotpath" is buffer allocation, because guest needs to wait to know the bo's iova before it can start emitting cmdstream/state that references

[PATCH v3 09/10] drm/msm/gem: Add fenced vma unpin

2022-04-06 Thread Rob Clark
From: Rob Clark With userspace allocated iova (next patch), we can have a race condition where userspace observes the fence completion and deletes the vma before retire_submit() gets around to unpinning the vma. To handle this, add a fenced unpin which drops the refcount but tracks the fence

[PATCH v3 08/10] drm/msm/gem: Split vma lookup and pin

2022-04-06 Thread Rob Clark
From: Rob Clark This way we only lookup vma once per object per submit, for both the submit and retire path. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c| 60 +--- drivers/gpu/drm/msm/msm_gem.h| 9 +++-- drivers/gpu/drm/msm

<    6   7   8   9   10   11   12   13   14   15   >