Re: [PATCH v8 2/2] drm/gem: Don't map imported GEMs

2022-08-16 Thread Rob Clark
On Tue, Aug 16, 2022 at 4:45 AM Dmitry Osipenko wrote: > > On 8/12/22 18:01, Rob Clark wrote: > > On Fri, Aug 12, 2022 at 7:57 AM Rob Clark wrote: > >> > >> On Fri, Aug 12, 2022 at 4:26 AM Dmitry Osipenko > >> wrote: > >>> > >>> On

Re: [PATCH v2 1/3] dma-buf: Add ioctl to query mmap coherency/cache info

2022-08-17 Thread Rob Clark
On Wed, Aug 17, 2022 at 2:57 AM Christian König wrote: > > > > Am 16.08.22 um 19:29 schrieb Rob Clark: > > On Tue, Aug 16, 2022 at 9:51 AM Christian König > > wrote: > >> Am 16.08.22 um 16:26 schrieb Rob Clark: > >>> On Tue, Aug 16, 2022 at 1:

Re: [PATCH v2 1/3] dma-buf: Add ioctl to query mmap coherency/cache info

2022-08-18 Thread Rob Clark
On Thu, Aug 18, 2022 at 4:21 AM Christian König wrote: > > Am 17.08.22 um 15:44 schrieb Rob Clark: > > On Wed, Aug 17, 2022 at 2:57 AM Christian König > > wrote: > >> [SNIP] > >> > >> The resulting cache attrs from combination of S1 and S2 translation

Re: [PATCH v2 1/3] dma-buf: Add ioctl to query mmap coherency/cache info

2022-08-18 Thread Rob Clark
On Thu, Aug 18, 2022 at 7:54 AM Christian König wrote: > > Am 18.08.22 um 16:25 schrieb Rob Clark: > > On Thu, Aug 18, 2022 at 4:21 AM Christian König > > wrote: > >> Am 17.08.22 um 15:44 schrieb Rob Clark: > >>> On Wed, Aug 17, 2022 at 2:57 AM Chr

Re: Rust in our code base

2022-08-21 Thread Rob Clark
On Sat, Aug 20, 2022 at 5:23 AM Karol Herbst wrote: > > Hey everybody, > > so I think it's time to have this discussion for real. > > I am working on Rusticl > (https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439) > which I would like to merge quite soon. > > Others might also plan on

[PATCH] drm/msm: De-open-code some CP_EVENT_WRITE

2022-08-21 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a3xx_gpu.c b/drivers

[PATCH 0/5] drm/msm+iommu/arm-smmu-qcom: tlbinv optimizations

2022-08-21 Thread Rob Clark
From: Rob Clark Two additions to adreno_smmu_priv to allow for a couple of optimizations: + Use a separate ASID for each set of pgtables to avoid over-invalidation. + Detect the case of unmapping from non-current pgtables where we can skip the redundant tlbinv Rob Clark (5): iommu

[PATCH 1/5] iommu/arm-smmu-qcom: Fix indentation

2022-08-21 Thread Rob Clark
From: Rob Clark Plus typo. Signed-off-by: Rob Clark --- include/linux/adreno-smmu-priv.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/adreno-smmu-priv.h b/include/linux/adreno-smmu-priv.h index c637e0997f6d..ac4c2c0ab724 100644 --- a/include

[PATCH 2/5] iommu/arm-smmu-qcom: Provide way to access current TTBR0

2022-08-21 Thread Rob Clark
From: Rob Clark The drm driver can skip tlbinv when unmapping from something that isn't the current pgtables, as there is already a tlbinv on context switch. Signed-off-by: Rob Clark --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 9 + include/linux/adreno-smmu-priv.h

[PATCH 4/5] drm/msm: Use separate ASID for each set of pgtables

2022-08-21 Thread Rob Clark
From: Rob Clark Optimize TLB invalidation by using different ASID for each set of pgtables. There can be scenarios where multiple processes end up with the same ASID (such as >256 processes using the GPU), but this is harmless, it will only result in some over-invalidation (but less o

[PATCH 3/5] iommu/arm-smmu-qcom: Add private interface to tlbinv by ASID

2022-08-21 Thread Rob Clark
From: Rob Clark This will let the drm driver use different ASID values for each set of pgtables to avoid over-invalidation on unmap. Signed-off-by: Rob Clark --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 + drivers/iommu/arm/arm-smmu/arm-smmu.c | 43 -- drivers

[PATCH 5/5] drm/msm: Skip tlbinv on unmap from non-current pgtables

2022-08-21 Thread Rob Clark
From: Rob Clark We can rely on the tlbinv done by CP_SMMU_TABLE_UPDATE in this case. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 ++ drivers/gpu/drm/msm/msm_iommu.c | 29 +++ 2 files changed, 35 insertions(+) diff --git a/drivers

Re: Rust in our code base

2022-08-21 Thread Rob Clark
On Sun, Aug 21, 2022 at 10:45 AM Karol Herbst wrote: > > On Sun, Aug 21, 2022 at 7:43 PM Karol Herbst wrote: > > > > On Sun, Aug 21, 2022 at 5:46 PM Rob Clark wrote: > > > > > > On Sat, Aug 20, 2022 at 5:23 AM Karol Herbst wrote: > > > > > &

[PATCH] drm/msm/iommu: optimize map/unmap

2022-08-22 Thread Rob Clark
From: Rob Clark Using map_pages/unmap_pages cuts down on the # of pgtable walks needed in the process of finding where to insert/remove an entry. The end result is ~5-10x faster than mapping a single page at a time. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_iommu.c | 91

[PATCH v2] drm/msm/iommu: optimize map/unmap

2022-08-23 Thread Rob Clark
From: Rob Clark Using map_pages/unmap_pages cuts down on the # of pgtable walks needed in the process of finding where to insert/remove an entry. The end result is ~5-10x faster than mapping a single page at a time. v2: Rename iommu_pgsize(), drop obsolete comments, fix error handling in

Re: [PATCH v8 2/2] drm/gem: Don't map imported GEMs

2022-08-23 Thread Rob Clark
On Tue, Aug 23, 2022 at 3:01 AM Christian König wrote: > > Am 22.08.22 um 19:26 schrieb Dmitry Osipenko: > > On 8/16/22 22:55, Dmitry Osipenko wrote: > >> On 8/16/22 15:03, Christian König wrote: > >>> Am 16.08.22 um 13:44 schrieb Dmitry Osipenko: > [SNIP] > > The other complication I not

Re: [Freedreno] [PATCH v2] drm/msm/iommu: optimize map/unmap

2022-08-23 Thread Rob Clark
On Tue, Aug 23, 2022 at 2:37 PM Akhil P Oommen wrote: > > On 8/23/2022 10:07 PM, Rob Clark wrote: > > From: Rob Clark > > > > Using map_pages/unmap_pages cuts down on the # of pgtable walks needed > > in the process of finding where to insert/remove an entry. The e

Re: [PATCH 5/5] drm/msm: Skip tlbinv on unmap from non-current pgtables

2022-08-24 Thread Rob Clark
On Wed, Aug 24, 2022 at 10:46 AM Akhil P Oommen wrote: > > On 8/21/2022 11:49 PM, Rob Clark wrote: > > From: Rob Clark > > > > We can rely on the tlbinv done by CP_SMMU_TABLE_UPDATE in this case. > > > > Signed-off-by: Rob Clark > > --- > &

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

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

2022-05-09 Thread Rob Clark
and_map() drm: 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

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

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

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

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 the

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

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

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 i

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

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

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

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

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-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 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: [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-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: > >>> On Tue, May 24, 2

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

[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

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

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 buffe

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 Rob

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

[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

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 a/drive

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 buffe

[PATCH] drm/msm/gem: Fix error return on fence id alloc fail

2022-06-24 Thread Rob Clark
From: Rob Clark This was a typo, we didn't actually want to return zero. Fixes: a61acbbe9cf8 ("drm/msm: Track "seqno" fences by idr") Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_submit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

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

2022-06-24 Thread Rob Clark
On Fri, Jun 24, 2022 at 1:58 PM Daniel Vetter wrote: > > On Thu, Jun 16, 2022 at 06:59:46AM -0700, Rob Clark wrote: > > On Thu, Jun 16, 2022 at 1:28 AM Stephen Boyd wrote: > > > > > > Quoting Rob Clark (2022-06-13 13:50:32) > > > > diff --git a/driver

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

2022-06-24 Thread Rob Clark
On Fri, Jun 24, 2022 at 2:36 PM Daniel Vetter wrote: > > On Fri, Jun 24, 2022 at 02:28:25PM -0700, Rob Clark wrote: > > On Fri, Jun 24, 2022 at 1:58 PM Daniel Vetter wrote: > > > > > > On Thu, Jun 16, 2022 at 06:59:46AM -0700, Rob Clark wrote: > > > > On

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

2022-06-24 Thread Rob Clark
On Fri, Jun 24, 2022 at 1:49 PM Daniel Vetter wrote: > > On Thu, Jun 09, 2022 at 10:42:11AM -0700, Rob Clark wrote: > > From: Rob Clark > > > > The DEFINE_DRM_GEM_FOPS() helper is a bit limiting if a driver wants to > > provide additional file ops, like show_f

[PATCH 00/15] drm+msm: Shrinker and LRU rework

2022-06-25 Thread Rob Clark
From: Rob Clark This is mostly motivated by getting drm/msm to pass an i-g-t shrinker test that I've been working on. In particular the test creates and cycles between more GEM buffers than what will fit in RAM to force eviction and re-pin. (There are sub-tests that cover this case both s

[PATCH 01/15] drm/msm: Switch to pfn mappings

2022-06-25 Thread Rob Clark
From: Rob Clark I'm not entirely sure why we were using VM_MIXEDMAP. These are never CoW mappings. Let's switch to be more consistent with what other drivers and the GEM shmem helpers do. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 5 +++-- 1 file changed, 3

[PATCH 02/15] drm/msm: Make enable_eviction flag static

2022-06-25 Thread Rob Clark
From: Rob Clark No need for it to be visible outside of this one src file. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_shrinker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_gem_shrinker.c b/drivers/gpu/drm/msm/msm_gem_shrinker.c

[PATCH 03/15] drm/msm: Reorder lock vs submit alloc

2022-06-25 Thread Rob Clark
From: Rob Clark This lets us drop the NORETRY. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_submit.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index

[PATCH 04/15] drm/msm: Small submit cleanup

2022-06-25 Thread Rob Clark
From: Rob Clark Move more initialization into submit_create(). Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_submit.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm

[PATCH 05/15] drm/msm: Split out idr_lock

2022-06-25 Thread Rob Clark
From: Rob Clark Otherwise if we hit reclaim pinning objects in the submit path, we'll be blocking retire_worker trying to free a submit. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c | 4 ++-- drivers/gpu/drm/msm/msm_gem_submit.c | 10 -- drivers/gpu/dr

[PATCH 07/15] drm/msm/gem: Rename update_inactive

2022-06-25 Thread Rob Clark
From: Rob Clark Really what this is doing is updating various LRU lists. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c

[PATCH 06/15] drm/msm/gem: Check for active in shrinker path

2022-06-25 Thread Rob Clark
From: Rob Clark Currently in our shrinker path we shouldn't be encountering anything that is active, but this will change in subsequent patches. So check if there are unsignaled fences. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 10 ++ drivers/gpu/dr

[PATCH 08/15] drm/msm/gem: Rename to pin/unpin_pages

2022-06-25 Thread Rob Clark
From: Rob Clark Since that is what these fxns actually do.. they are getting *pinned* pages (as opposed to cases where we need pages, but don't need them pinned, like CPU mappings). Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 18 +- drivers/gpu/dr

[PATCH 09/15] drm/msm/gem: Consolidate pin/unpin paths

2022-06-25 Thread Rob Clark
From: Rob Clark Avoid having multiple spots where we increment/decrement pin_count (and associated LRU updating) Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers

[PATCH 10/15] drm/msm/gem: Remove active refcnt

2022-06-25 Thread Rob Clark
From: Rob Clark At this point the pinned refcnt is sufficient, and the shrinker is already prepared to encounter objects which are still active according to fences attached to the resv. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c| 45

[PATCH 11/15] drm/gem: Add LRU/shrinker helper

2022-06-25 Thread Rob Clark
From: Rob Clark Add a simple LRU helper to assist with driver's shrinker implementation. It handles tracking the number of backing pages associated with a given LRU, and provides a helper to implement shrinker_scan. A driver can use multiple LRU instances to track objects in various states

[PATCH 13/15] drm/msm/gem: Unpin buffers earlier

2022-06-25 Thread Rob Clark
From: Rob Clark We've already attached the fences, so obj->resv (which shrinker checks) tells us whether they are still active. So we can unpin sooner, before we drop the queue lock. This also avoids the need to grab the obj lock in the retire path, avoiding potential for lock co

[PATCH 12/15] drm/msm/gem: Convert to using drm_gem_lru

2022-06-25 Thread Rob Clark
From: Rob Clark This converts over to use the shared GEM LRU/shrinker helpers. Note that it means we are no longer tracking purgeable or willneed buffers that are active separately. But the most recently pinned buffers should be at the tail of the various LRUs, and the shrinker is already

[PATCH 14/15] drm/msm/gem: Consolidate shrinker trace

2022-06-25 Thread Rob Clark
From: Rob Clark Combine separate trace events for purge vs evict into one. When we add support for purging/evicting active buffers we'll just add more info into this one trace event, rather than adding a bunch more events. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_shrin

[PATCH 15/15] drm/msm/gem: Evict active GEM objects when necessary

2022-06-25 Thread Rob Clark
From: Rob Clark If we are under enough memory pressure, we should stall waiting for active buffers to become idle in order to evict. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_shrinker.c | 68 +- drivers/gpu/drm/msm/msm_gpu_trace.h| 16 +++--- 2 files

[pull] drm/msm: drm-msm-fixes-2022-06-28 for v5.19-rc5

2022-06-28 Thread Rob Clark
error of de-referencing before NULL check in dpu_encoder_phys_wb.c - Fix error return to userspace if fence-id allocation fails in submit ioctl Kuogee Hsieh (1): drm/msm/dp: reset drm_dev to NULL at dp_display_unbind() Rob

Re: [PATCH v6 00/22] Add generic memory shrinker to VirtIO-GPU and Panfrost DRM drivers

2022-06-28 Thread Rob Clark
On Tue, Jun 28, 2022 at 5:51 AM Dmitry Osipenko wrote: > > On 6/28/22 15:31, Robin Murphy wrote: > > ->8- > > [ 68.295951] == > > [ 68.295956] WARNING: possible circular locking dependency detected > > [ 68.295963] 5.19.0-rc3+ #400

[PATCH] drm/i915: Remove __dma_fence_is_chain()

2022-06-28 Thread Rob Clark
From: Rob Clark drive-by cleanup Signed-off-by: Rob Clark --- drivers/gpu/drm/i915/gem/i915_gem_wait.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_wait.c b/drivers/gpu/drm/i915/gem/i915_gem_wait.c index 319936f91ac5

Re: [PATCH v2 1/2] drm/msm/a6xx: Add support for a new 7c3 sku

2022-06-29 Thread Rob Clark
On Tue, Jun 28, 2022 at 10:32 PM Akhil P Oommen wrote: > > On 6/29/2022 9:59 AM, Bjorn Andersson wrote: > > On Tue 10 May 02:53 CDT 2022, Akhil P Oommen wrote: > > > >> Add a new sku to the fuse map of 7c3 gpu. > >> > >> Signed-off-by: Akhil P Oommen > > Is this series still needed/wanted? I've b

[PATCH 0/2] drm/msm: A couple GPU devcore enhancements

2022-06-29 Thread Rob Clark
From: Rob Clark A couple things useful for debugging iova faults: 1. caputre all buffer addresses and sizes even if we don't capture their contents. 2. capture the GEM buffer debug labels Rob Clark (2): drm/msm/gpu: Capture all BO addr+size in devcore drm/msm/gpu: Add GEM debug lab

[PATCH 1/2] drm/msm/gpu: Capture all BO addr+size in devcore

2022-06-29 Thread Rob Clark
From: Rob Clark It is useful to know what buffers userspace thinks are associated with the submit, even if we don't care to capture their content. This brings things more inline with $debugfs/rd cmdstream dumping. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gpu.c

[PATCH 2/2] drm/msm/gpu: Add GEM debug label to devcore

2022-06-29 Thread Rob Clark
From: Rob Clark When trying to understand an iova fault devcore, once you figure out which buffer we accessed beyond the end of, it is useful to see the buffer's debug label. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 1 + drivers/gpu/drm/msm/msm_

Re: [PATCH] drm/msm/dp: make eDP panel as the first connected connector

2022-06-29 Thread Rob Clark
On Wed, Jun 29, 2022 at 5:36 PM Doug Anderson wrote: > > Hi, > > On Tue, Jun 28, 2022 at 1:14 PM Dmitry Baryshkov > wrote: > > > > On 28 June 2022 18:20:06 GMT+03:00, Kuogee Hsieh > > wrote: > > >Some userspace presumes that the first connected connector is the main > > >display, where it's sup

Re: [PATCH v7 7/9] drm/virtio: Improve DMA API usage for shmem BOs

2022-07-05 Thread Rob Clark
On Tue, Jul 5, 2022 at 10:02 AM Dmitry Osipenko wrote: > > On 7/5/22 18:45, Gerd Hoffmann wrote: > > Hi, > > > >>> Also note that pci is not the only virtio transport we have. > >> > >> The VirtIO indeed has other transports, but only PCI is really supported > >> in case of the VirtIO-GPU in ker

Re: [PATCH v8 2/2] drm/gem: Don't map imported GEMs

2022-07-05 Thread Rob Clark
On Tue, Jul 5, 2022 at 4:51 AM Christian König wrote: > > Am 01.07.22 um 11:02 schrieb Dmitry Osipenko: > > Drivers that use drm_gem_mmap() and drm_gem_mmap_obj() helpers don't > > handle imported dma-bufs properly, which results in mapping of something > > else than the imported dma-buf. On NVIDI

[PATCH] drm/msm/mdp5: Fix global state lock backoff

2022-07-07 Thread Rob Clark
From: Rob Clark We need to grab the lock after the early return for !hwpipe case. Otherwise, we could have hit contention yet still returned 0. Fixes an issue that the new CONFIG_DRM_DEBUG_MODESET_LOCK stuff flagged in CI: WARNING: CPU: 0 PID: 282 at drivers/gpu/drm/drm_modeset_lock.c:296

Re: [PATCH 3/7] drm/msm: Fix cx collapse issue during recovery

2022-07-07 Thread Rob Clark
On Thu, Jul 7, 2022 at 9:11 AM Akhil P Oommen wrote: > > There are some hardware logic under CX domain. For a successful > recovery, we should ensure cx headswitch collapses to ensure all the > stale states are cleard out. This is especially true to for a6xx family > where we can GMU co-processor.

[PATCH] drm/msm/dpu: Fix for non-visible planes

2022-07-07 Thread Rob Clark
From: Rob Clark Fixes `kms_cursor_crc --run-subtest cursor-offscreen`.. when the cursor moves offscreen the plane becomes non-visible, so we need to skip over it in crtc atomic test and mixer setup. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 6 ++ 1 file

[pull] drm/msm: drm-msm-next-2022-07-10 for v5.20

2022-07-10 Thread Rob Clark
dt-bindings: msm: update maintainers list with proper id Maximilian Luz (1): drm/msm: Fix double pm_runtime_disable() call Miaoqian Lin (1): drm/msm/mdp4: Fix refcount leak in mdp4_modeset_init_intf Rob Clark (24): Merge tag 'msm-next-5.19-fixes-06-01' of https://gitlab

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

2022-03-31 Thread Rob Clark
On Thu, Mar 31, 2022 at 11:27 AM Dmitry Osipenko wrote: > > On 3/30/22 23:47, Rob Clark wrote: > > From: Rob Clark > > > > Combines duplicate vma lookup in the get_and_pin path. > > > > Signed-off-by: Rob Clark > > -

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

2022-03-31 Thread Rob Clark
On Thu, Mar 31, 2022 at 11:52 AM Dmitry Osipenko wrote: > > ... > > +/* > > + * Get the requested iova but don't pin it. Fails if the requested iova is > > + * not available. Doesn't need a put because iovas are currently valid for > > + * the life of the object. > > + * > > + * Setting an iova

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

2022-03-31 Thread Rob Clark
On Thu, Mar 31, 2022 at 12:41 PM Dmitry Osipenko wrote: > > On 3/31/22 22:02, Rob Clark wrote: > > On Thu, Mar 31, 2022 at 11:52 AM Dmitry Osipenko > > wrote: > >> > >> ... > >>> +/* > >>> + * Get the requested iova but don't pin i

Re: [PATCH 2/4] drm/msm/adreno: use a single register offset for gpu_read64/gpu_write64

2022-04-01 Thread Rob Clark
le.. so I think I'll cherry-pick this ahead of the rest of the series Reviewed-by: Rob Clark > --- > drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 3 +-- > drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 27 - > drivers/gpu/drm/msm/adreno/a5xx_preempt.c |

Re: [PATCH v6 4/4] drm: allow real encoder to be passed for drm_writeback_connector

2022-04-04 Thread Rob Clark
On Fri, Apr 1, 2022 at 8:38 AM Laurent Pinchart wrote: > > Hi Abhinav, > > Thank you for the patch. > > On Thu, Mar 31, 2022 at 05:12:13PM -0700, Abhinav Kumar wrote: > > For some vendor driver implementations, display hardware can > > be shared between the encoder used for writeback and the physi

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

2022-04-05 Thread Rob Clark
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 that userspace which doesn't care about the events can opt-out. Signed-off-by: Rob Clark --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 8 +--- include

Re: [PATCH] drm/msm: Stop using iommu_present()

2022-04-06 Thread Rob Clark
> Signed-off-by: Robin Murphy Reviewed-by: Rob Clark > --- > drivers/gpu/drm/msm/msm_drv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c > index affa95eb05fc..9c36b505daab 100644 > -

Re: [PATCH] drm/msm/mdp5: check the return of kzalloc()

2022-04-06 Thread Rob Clark
On Thu, Mar 24, 2022 at 1:37 AM wrote: > > From: Xiaoke Wang > > kzalloc() is a memory allocation function which can return NULL when > some internal memory errors happen. So it is better to check it to > prevent potential wrong memory access. > > Signed-off-by: Xiaoke Wang > --- > drivers/gpu/

Re: [Intel-gfx] [CI 8/8] drm/i915: Expose client engine utilisation via fdinfo

2022-04-06 Thread Rob Clark
gt; >>>> drm-engine-video-enhance: 0 ns > >>>> > >>>> v2: > >>>>* Update for removal of name and pid. > >>>> > >>>> v3: > >>>>* Use drm_driver.name. > >>>> > >>

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