Re: [PATCH 2/2] adreno: Detect shutdown during get_param()

2022-12-01 Thread Rob Clark
On Thu, Dec 1, 2022 at 10:42 AM Joel Fernandes wrote: > > On Sat, Nov 12, 2022 at 6:35 PM Rob Clark wrote: > > > > On Fri, Nov 11, 2022 at 1:28 PM Akhil P Oommen > > wrote: > > > > > > On 11/12/2022 1:19 AM, Joel Fernandes (Google) wrote: > > &g

[PATCH v2 1/2] drm/shmem-helper: Remove errant put in error path

2022-11-30 Thread Rob Clark
From: Rob Clark drm_gem_shmem_mmap() doesn't own this reference, resulting in the GEM object getting prematurely freed leading to a later use-after-free. Link: https://syzkaller.appspot.com/bug?extid=c8ae65286134dd1b800d Reported-by: syzbot+c8ae65286134dd1b8...@syzkaller.appspotmail.com

[PATCH v2 2/2] drm/shmem-helper: Avoid vm_open error paths

2022-11-30 Thread Rob Clark
From: Rob Clark vm_open() is not allowed to fail. Fortunately we are guaranteed that the pages are already pinned, thanks to the initial mmap which is now being cloned into a forked process, and only need to increment the refcnt. So just increment it directly. Previously if a signal was

[PATCH v2 0/2] drm/shmem-helper: Fix a couple of error path bugs

2022-11-30 Thread Rob Clark
From: Rob Clark A couple fixes for error paths that userspace could manage to trigger. Rob Clark (2): drm/shmem-helper: Remove errant put in error path drm/shmem-helper: Avoid vm_open error paths drivers/gpu/drm/drm_gem_shmem_helper.c | 18 -- 1 file changed, 12 insertions

[PATCH v2] drm/virtio: Spiff out cmd queue/response traces

2022-11-29 Thread Rob Clark
From: Rob Clark Add a sequence # for more easily matching up cmd/resp, and the # of free slots in the virtqueue to more easily see starvation issues. v2: Fix handling of string fields as well Signed-off-by: Rob Clark Reviewed-by: Dmitry Osipenko --- drivers/gpu/drm/virtio/virtgpu_drv.h

Re: [2/2] drm/shmem-helper: Avoid vm_open error paths

2022-11-29 Thread Rob Clark
On Tue, Nov 29, 2022 at 12:32 PM Guenter Roeck wrote: > > On Tue, Nov 29, 2022 at 12:02:42PM -0800, Rob Clark wrote: > > From: Rob Clark > > > > vm_open() is not allowed to fail. Fortunately we are guaranteed that > > the pages are already pinned, and only nee

[PATCH 1/2] drm/shmem-helper: Remove errant put in error path

2022-11-29 Thread Rob Clark
From: Rob Clark drm_gem_shmem_mmap() doesn't own this reference! Fixes: 2194a63a818d ("drm: Add library for shmem backed GEM objects") Cc: sta...@vger.kernel.org Signed-off-by: Rob Clark --- drivers/gpu/drm/drm_gem_shmem_helper.c | 1 - 1 file changed, 1 deletion(-) diff --gi

[PATCH 2/2] drm/shmem-helper: Avoid vm_open error paths

2022-11-29 Thread Rob Clark
From: Rob Clark vm_open() is not allowed to fail. Fortunately we are guaranteed that the pages are already pinned, and only need to increment the refcnt. So just increment it directly. Fixes: 2194a63a818d ("drm: Add library for shmem backed GEM objects") Cc: sta...@vger.kernel.org

[PATCH 0/2] drm/shmem-helper: Fix a couple of error path bugs

2022-11-29 Thread Rob Clark
From: Rob Clark A couple fixes for error paths that userspace could manage to trigger. Rob Clark (2): drm/shmem-helper: Remove errant put in error path drm/shmem-helper: Avoid vm_open error paths drivers/gpu/drm/drm_gem_shmem_helper.c | 15 +++ 1 file changed, 11 insertions

[PATCH] drm/virtio: Spiff out cmd queue/response traces

2022-11-29 Thread Rob Clark
From: Rob Clark Add a sequence # for more easily matching up cmd/resp, and the # of free slots in the virtqueue to more easily see starvation issues. Signed-off-by: Rob Clark --- drivers/gpu/drm/virtio/virtgpu_drv.h | 3 +++ drivers/gpu/drm/virtio/virtgpu_trace.h | 20

Re: [PATCH v9 01/11] drm/msm/gem: Prevent blocking within shrinker loop

2022-11-29 Thread Rob Clark
m the loop. > > This problem was found during shrinker/madvise IOCTL testing of > virtio-gpu driver. The MSM driver is affected in the same way. > > Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Clark > --- > drivers/gpu/drm/drm_gem.c | 9 ++

[pull] drm/msm: drm-msm-next-2022-11-28 for v6.2

2022-11-28 Thread Rob Clark
Fix speed-bin detection vs. probe-defer - Enable clamp_to_idle on 7c3 - Improved hangcheck detection -------- Rob Clark (6): drm/msm: Remove exclusive-fence hack drm/msm/a6xx: Fix speed-bin detection vs probe-defer d

Re: Try to address the DMA-buf coherency problem

2022-11-18 Thread Rob Clark
On Thu, Nov 17, 2022 at 7:38 AM Nicolas Dufresne wrote: > > Le jeudi 17 novembre 2022 à 13:10 +0100, Christian König a écrit : > > > > DMA-Buf let's the exporter setup the DMA addresses the importer uses to > > > > be able to directly decided where a certain operation should go. E.g. we > > > > ha

[PATCH] drm/msm: Enable unpin/eviction by default

2022-11-15 Thread Rob Clark
From: Rob Clark We've had this enabled in the CrOS kernel for a while now without seeing issues, so let's flip the switch upstream now. 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/g

[PATCH] drm/msm: Enable clamp_to_idle for 7c3

2022-11-15 Thread Rob Clark
From: Rob Clark This was overlooked. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index ebe9599a8316

[PATCH v3] drm/msm/a6xx: Fix speed-bin detection vs probe-defer

2022-11-15 Thread Rob Clark
From: Rob Clark If we get an error (other than -ENOENT) we need to propagate that up the stack. Otherwise if the nvmem driver hasn't probed yet, we'll end up end up claiming that we support all the OPPs which is not likely to be true (and on some generations impossible to be true, ie

[PATCH v2] drm/msm/a6xx: Fix speed-bin detection vs probe-defer

2022-11-14 Thread Rob Clark
From: Rob Clark If we get an error (other than -ENOENT) we need to propagate that up the stack. Otherwise if the nvmem driver hasn't probed yet, we'll end up end up claiming that we support all the OPPs which is not likely to be true (and on some generations impossible to be true, ie

Re: [PATCH] drm/msm/a6xx: Fix speed-bin detection vs probe-defer

2022-11-14 Thread Rob Clark
On Mon, Nov 14, 2022 at 11:59 AM Akhil P Oommen wrote: > > On 11/15/2022 1:11 AM, Rob Clark wrote: > > From: Rob Clark > > > > If we get an error (other than -ENOENT) we need to propagate that up the > > stack. Otherwise if the nvmem driver hasn't probed yet,

Re: [PATCH] drm/msm/a6xx: Fix speed-bin detection vs probe-defer

2022-11-14 Thread Rob Clark
On Mon, Nov 14, 2022 at 12:27 PM Doug Anderson wrote: > > Hi, > > On Mon, Nov 14, 2022 at 11:41 AM Rob Clark wrote: > > > > From: Rob Clark > > > > If we get an error (other than -ENOENT) we need to propagate that up the > > stack. Otherwise if the nv

[PATCH] drm/msm/a6xx: Fix speed-bin detection vs probe-defer

2022-11-14 Thread Rob Clark
From: Rob Clark If we get an error (other than -ENOENT) we need to propagate that up the stack. Otherwise if the nvmem driver hasn't probed yet, we'll end up with whatever OPP(s) are represented by bit zero. Fixed: fe7952c629da ("drm/msm: Add speed-bin support to a618 gpu"

[PATCH v4 1/2] drm/msm/adreno: Simplify read64/write64 helpers

2022-11-14 Thread Rob Clark
From: Rob Clark The _HI reg is always following the _LO reg, so no need to pass these offsets seprately. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Reviewed-by: Akhil P Oommen --- drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 3 +-- drivers/gpu/drm/msm/adreno/a5xx_gpu.c

[PATCH v4 2/2] drm/msm: Hangcheck progress detection

2022-11-14 Thread Rob Clark
From: Rob Clark If the hangcheck timer expires, check if the fw's position in the cmdstream has advanced (changed) since last timer expiration, and allow it up to three additional "extensions" to it's alotted time. The intention is to continue to catch "shader stuck in a

[PATCH v4 0/2] drm/msm: Improved hang detection

2022-11-14 Thread Rob Clark
From: Rob Clark Try to detect when submit jobs are making forward progress and give them a bit more time. Rob Clark (2): drm/msm/adreno: Simplify read64/write64 helpers drm/msm: Hangcheck progress detection drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 3 +- drivers/gpu/drm/msm/adreno

Re: [PATCH 1/2] adreno: Shutdown the GPU properly

2022-11-12 Thread Rob Clark
0x5c/0x1a8 > > [ 192.649034] msm_job_run+0xb0/0x11c > > [ 192.649058] drm_sched_main+0x170/0x434 > > [ 192.649086] kthread+0x134/0x300 > > [ 192.649114] ret_from_fork+0x10/0x20 > > > > Fix by calling adreno_system_suspend() in the device_shutdown() path. >

Re: [PATCH 2/2] adreno: Detect shutdown during get_param()

2022-11-12 Thread Rob Clark
2.534461] invoke_syscall+0x4c/0x118 > > [ 292.534467] el0_svc_common+0x98/0x104 > > [ 292.534473] do_el0_svc+0x30/0x80 > > [ 292.534478] el0_svc+0x20/0x50 > > [ 292.534481] el0t_64_sync_handler+0x78/0x108 > > [ 292.534485] el0t_64_sync+0x1a4/0x1a8 > > [

Re: [Freedreno] [RFC PATCH 0/3] Support for Solid Fill Planes

2022-11-07 Thread Rob Clark
On Mon, Nov 7, 2022 at 4:22 PM Jessica Zhang wrote: > > > > On 11/7/2022 2:09 PM, Rob Clark wrote: > > On Mon, Nov 7, 2022 at 1:32 PM Jessica Zhang > > wrote: > >> > >> > >> > >> On 11/7/2022 11:37 AM, Ville Syrjälä wrote: > &g

Re: [Freedreno] [RFC PATCH 0/3] Support for Solid Fill Planes

2022-11-07 Thread Rob Clark
On Mon, Nov 7, 2022 at 1:32 PM Jessica Zhang wrote: > > > > On 11/7/2022 11:37 AM, Ville Syrjälä wrote: > > On Fri, Oct 28, 2022 at 03:59:49PM -0700, Jessica Zhang wrote: > >> Introduce and add support for COLOR_FILL and COLOR_FILL_FORMAT > >> properties. When the color fill value is set, and the

Re: Must-Pass Test Suite for KMS drivers

2022-11-07 Thread Rob Clark
On Mon, Nov 7, 2022 at 1:29 AM Maxime Ripard wrote: > > On Thu, Oct 27, 2022 at 08:08:28AM -0700, Rob Clark wrote: > > On Wed, Oct 26, 2022 at 1:17 AM wrote: > > > > > > Hi Rob, > > > > > > On Mon, Oct 24, 2022 at 08:48:15AM -0700, Rob Clark wrote

[RFC] drm/msm: Boost on waits

2022-11-04 Thread Rob Clark
From: Rob Clark Minimize interactive latency by boosting frequency when userspace is waiting on the GPU to finish. Signed-off-by: Rob Clark --- I did contemplate also boosting on dma_fence_wait(), but (a) that would require some extra plumbing thru gpu-sched, (b) that only captures a sub-set

[PATCH v3 2/2] drm/msm: Hangcheck progress detection

2022-11-04 Thread Rob Clark
From: Rob Clark If the hangcheck timer expires, check if the fw's position in the cmdstream has advanced (changed) since last timer expiration, and allow it up to three additional "extensions" to it's alotted time. The intention is to continue to catch "shader stuck in a

[PATCH v3 1/2] drm/msm/adreno: Simplify read64/write64 helpers

2022-11-04 Thread Rob Clark
From: Rob Clark The _HI reg is always following the _LO reg, so no need to pass these offsets seprately. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Reviewed-by: Akhil P Oommen --- drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 3 +-- drivers/gpu/drm/msm/adreno/a5xx_gpu.c

[PATCH v3 0/2] drm/msm: Improved hang detection

2022-11-04 Thread Rob Clark
From: Rob Clark Try to detect when submit jobs are making forward progress and give them a bit more time. Rob Clark (2): drm/msm/adreno: Simplify read64/write64 helpers drm/msm: Hangcheck progress detection drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 3 +- drivers/gpu/drm/msm/adreno

Re: Try to address the DMA-buf coherency problem

2022-11-04 Thread Rob Clark
On Wed, Nov 2, 2022 at 5:21 AM Christian König wrote: > > Hi Lucas, > > Am 02.11.22 um 12:39 schrieb Lucas Stach: > > Hi Christian, > > > > going to reply in more detail when I have some more time, so just some > > quick thoughts for now. > > > > Am Mittwoch, dem 02.11.2022 um 12:18 +0100 schrieb

Re: [PATCH v2 2/2] drm/msm: Hangcheck progress detection

2022-11-03 Thread Rob Clark
On Wed, Nov 2, 2022 at 4:26 PM Dmitry Baryshkov wrote: > > On 02/11/2022 01:33, Rob Clark wrote: > > From: Rob Clark > > > > If the hangcheck timer expires, check if the fw's position in the > > cmdstream has advanced (changed) since last timer expiration, and

Re: [PATCH v4 1/2] drm/msm: move domain allocation into msm_iommu_new()

2022-11-02 Thread Rob Clark
kernel test robot > Signed-off-by: Dmitry Baryshkov Reviewed-by: Rob Clark > --- > drivers/gpu/drm/msm/adreno/a6xx_gmu.c| 12 +--- > drivers/gpu/drm/msm/adreno/a6xx_gpu.c| 23 +++--- > drivers/gpu/drm/msm/adreno/adreno_gpu.c | 25 +

Re: [PATCH v4 2/2] drm/msm: remove duplicated code from a6xx_create_address_space

2022-11-02 Thread Rob Clark
: Dmitry Baryshkov Reviewed-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/a5xx_gpu.c | 2 +- > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 28 +-

[PATCH] drm/syncobj: Remove unused field

2022-11-02 Thread Rob Clark
From: Rob Clark Seems to be a leftover after commit e7cdf5c82f17 ("drm/syncobj: Stop reusing the same struct file for all syncobj -> fd"). Signed-off-by: Rob Clark --- include/drm/drm_syncobj.h | 4 1 file changed, 4 deletions(-) diff --git a/include/drm/drm_syncobj.h

Re: [PATCH] drm/msm: Remove exclusive-fence hack

2022-11-02 Thread Rob Clark
On Wed, Nov 2, 2022 at 3:46 AM Christian König wrote: > > Am 01.11.22 um 22:40 schrieb Rob Clark: > > From: Rob Clark > > > > The workaround was initially necessary due to dma_resv having only a > > single exclusive fence slot, yet whe don't necessarily know wh

[PATCH v2 2/2] drm/msm: Hangcheck progress detection

2022-11-01 Thread Rob Clark
From: Rob Clark If the hangcheck timer expires, check if the fw's position in the cmdstream has advanced (changed) since last timer expiration, and allow it up to three additional "extensions" to it's alotted time. The intention is to continue to catch "shader stuck in a

[PATCH v2 1/2] drm/msm/adreno: Simplify read64/write64 helpers

2022-11-01 Thread Rob Clark
From: Rob Clark The _HI reg is always following the _LO reg, so no need to pass these offsets seprately. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Reviewed-by: Akhil P Oommen --- drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 3 +-- drivers/gpu/drm/msm/adreno/a5xx_gpu.c

[PATCH v2 0/2] drm/msm: Improved hang detection

2022-11-01 Thread Rob Clark
From: Rob Clark Try to detect when submit jobs are making forward progress and give them a bit more time. Rob Clark (2): drm/msm/adreno: Simplify read64/write64 helpers drm/msm: Hangcheck progress detection drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 3 +- drivers/gpu/drm/msm/adreno

Re: [PATCH 2/2] drm/msm: Hangcheck progress detection

2022-11-01 Thread Rob Clark
On Tue, Nov 1, 2022 at 12:54 PM Akhil P Oommen wrote: > > On 11/1/2022 4:24 AM, Rob Clark wrote: > > From: Rob Clark > > > > If the hangcheck timer expires, check if the fw's position in the > > cmdstream has advanced (changed) since last timer expiration, and

[PATCH] drm/msm: Remove exclusive-fence hack

2022-11-01 Thread Rob Clark
From: Rob Clark The workaround was initially necessary due to dma_resv having only a single exclusive fence slot, yet whe don't necessarily know what order the gpu scheduler will schedule jobs. Unfortunately this workaround also has the result of forcing implicit sync, even when userspace

[PATCH 1/2] drm/msm/adreno: Simplify read64/write64 helpers

2022-10-31 Thread Rob Clark
From: Rob Clark The _HI reg is always following the _LO reg, so no need to pass these offsets seprately. Signed-off-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

[PATCH 2/2] drm/msm: Hangcheck progress detection

2022-10-31 Thread Rob Clark
From: Rob Clark If the hangcheck timer expires, check if the fw's position in the cmdstream has advanced (changed) since last timer expiration, and allow it up to three additional "extensions" to it's alotted time. The intention is to continue to catch "shader stuck in a

[PATCH 0/2] drm/msm: Improved hang detection

2022-10-31 Thread Rob Clark
From: Rob Clark Try to detect when submit jobs are making forward progress and give them a bit more time. Rob Clark (2): drm/msm/adreno: Simplify read64/write64 helpers drm/msm: Hangcheck progress detection drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 3 +- drivers/gpu/drm/msm/adreno

Re: [PATCH 2/3] drm/prime: set the dma_coherent flag for export

2022-10-27 Thread Rob Clark
On Thu, Oct 20, 2022 at 7:57 AM Christian König wrote: > > Am 20.10.22 um 16:43 schrieb Rob Clark: > > On Thu, Oct 20, 2022 at 5:13 AM Christian König > > wrote: > >> When a device driver is snooping the CPU cache during access we assume > >> that all import

Re: [PATCH v3 1/2] drm/msm: move domain allocation into msm_iommu_new()

2022-10-27 Thread Rob Clark
On Tue, Oct 25, 2022 at 1:04 PM Dmitry Baryshkov wrote: > > After the msm_iommu instance is created, the IOMMU domain is completely > handled inside the msm_iommu code. Move the iommu_domain_alloc() call > into the msm_iommu_new() to simplify callers code. > > Reported-by: kernel test robot > Sig

Re: Must-Pass Test Suite for KMS drivers

2022-10-27 Thread Rob Clark
On Wed, Oct 26, 2022 at 1:17 AM wrote: > > Hi Rob, > > On Mon, Oct 24, 2022 at 08:48:15AM -0700, Rob Clark wrote: > > On Mon, Oct 24, 2022 at 5:43 AM wrote: > > > I've discussing the idea for the past year to add an IGT test suite that > > &g

[pull] drm/msm: drm-msm-fixes-2022-10-24 for v6.1-rc3

2022-10-24 Thread Rob Clark
m/msm: Fix return type of mdp4_lvds_connector_mode_valid Rob Clark (4): drm/msm/gem: Unpin objects slightly later drm/msm/a6xx: Fix kvzalloc vs state_kcalloc usage drm/msm/a6xx: Skip snapshotting unused GMU buffers drm/msm/a6xx: Remove state objects from list before freeing

Re: [PATCH v2 1/2] drm/msm: remove duplicated code from a6xx_create_address_space

2022-10-24 Thread Rob Clark
On Mon, Oct 24, 2022 at 8:14 AM Dmitry Baryshkov wrote: > > The function a6xx_create_address_space() is mostly a copy of > adreno_iommu_create_address_space() with added quirk setting. Reuse the > original function to do the work, while introducing the wrapper to set > the quirk. > > Signed-off-by

Re: Must-Pass Test Suite for KMS drivers

2022-10-24 Thread Rob Clark
On Mon, Oct 24, 2022 at 5:43 AM wrote: > > Hi, > > I've discussing the idea for the past year to add an IGT test suite that > all well-behaved KMS drivers must pass. > > The main idea behind it comes from v4l2-compliance and cec-compliance, > that are being used to validate that the drivers are sa

Re: [PATCH v2 00/10] drm/msm: probe deferral fixes

2022-10-24 Thread Rob Clark
On Mon, Oct 24, 2022 at 4:34 AM Johan Hovold wrote: > > On Fri, Oct 21, 2022 at 09:05:52AM -0700, Abhinav Kumar wrote: > > Hi Johan > > > > On 10/20/2022 11:27 PM, Johan Hovold wrote: > > > On Tue, Sep 20, 2022 at 11:06:30AM +0200, Johan Hovold wrote: > > >> On Tue, Sep 13, 2022 at 10:53:10AM +020

Re: [PATCH 2/3] drm/prime: set the dma_coherent flag for export

2022-10-20 Thread Rob Clark
On Thu, Oct 20, 2022 at 5:13 AM Christian König wrote: > > When a device driver is snooping the CPU cache during access we assume > that all importers need to be able to snoop the CPU cache as well. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/drm_prime.c | 2 ++ > 1 file changed,

Re: [PATCH v9] drm: Add initial ci/ subdirectory

2022-10-14 Thread Rob Clark
for merge requests > - Switch to zstd for the build artifacts to align with Mesa > - Add Qcom USB PHYs to config as they are now =m in the defconfig > > Signed-off-by: Tomeu Vizoso Reviewed-by: Rob Clark > --- > Documentation/gpu/automated_testing.rst | 144 + >

[PATCH 1/3] drm/msm/a6xx: Fix kvzalloc vs state_kcalloc usage

2022-10-13 Thread Rob Clark
From: Rob Clark adreno_show_object() is a trap! It will re-allocate the pointer it is passed on first call, when the data is ascii85 encoded, using kvmalloc/ kvfree(). Which means the data *passed* to it must be kvmalloc'd, ie. we cannot use the state_kcalloc() helper. This partially re

[PATCH 3/3] drm/msm/a6xx: Remove state objects from list before freeing

2022-10-13 Thread Rob Clark
From: Rob Clark Technically it worked as it was before, only because it was using the _safe version of the iterator. But it is sloppy practice to leave dangling pointers. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH 2/3] drm/msm/a6xx: Skip snapshotting unused GMU buffers

2022-10-13 Thread Rob Clark
From: Rob Clark Some buffers are unused on certain sub-generations of a6xx. So just skip them. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm

[PATCH 0/3] drm/msm/a6xx: devcore dump fixes

2022-10-13 Thread Rob Clark
From: Rob Clark First patch fixes a recently introduced memory corruption, the remaining two are cleanups. Rob Clark (3): drm/msm/a6xx: Fix kvzalloc vs state_kcalloc usage drm/msm/a6xx: Skip snapshotting unused GMU buffers drm/msm/a6xx: Remove state objects from list before freeing

Re: [DNM RFC PATCH] drm/msm: Use lowercase hex for !defines

2022-10-12 Thread Rob Clark
On Sat, Oct 8, 2022 at 10:43 AM Konrad Dybcio wrote: > > drm/msm capitalizes hex numbers rather randomly. Try to unify it. yeah, there were some different preferences of various patch authors for shouty HEX vs quiet hex... tbh I prefer the latter, but not really sure it is worth the noise in git

Re: [Freedreno] [PATCH -next] drm/msm/msm_gem_shrinker: fix compile error in can_block()

2022-09-29 Thread Rob Clark
On Thu, Sep 29, 2022 at 4:51 AM Akhil P Oommen wrote: > > On 9/29/2022 3:00 PM, Yang Yingliang wrote: > > I got the compile error: > > > >drivers/gpu/drm/msm/msm_gem_shrinker.c: In function ‘can_block’: > >drivers/gpu/drm/msm/msm_gem_shrinker.c:29:21: error: ‘__GFP_ATOMIC’ > > undeclared

[PATCH] drm/msm: Fix build break with recent mm tree

2022-09-29 Thread Rob Clark
From: Rob Clark 9178e3dcb121 ("mm: discard __GFP_ATOMIC") removed __GFP_ATOMIC, replacing it with a check for not __GFP_DIRECT_RECLAIM. Reported-by: Randy Dunlap Reported-by: Stephen Rothwell Signed-off-by: Rob Clark --- Sorry, this was reported by Stephen earlier in the month, w

Re: linux-next: Tree for Sep 28 (drivers/gpu/drm/msm/msm_gem_shrinker.c)

2022-09-29 Thread Rob Clark
On Thu, Sep 29, 2022 at 12:09 AM Geert Uytterhoeven wrote: > > On Thu, Sep 29, 2022 at 8:10 AM Randy Dunlap wrote: > > On 9/28/22 12:26, broo...@kernel.org wrote: > > > Changes since 20220927: > > > > > > > on x86_64: > > > > ../drivers/gpu/drm/msm/msm_gem_shrinker.c: In function ‘can_block’: > >

[PATCH] drm/msm/gem: Unpin objects slightly later

2022-09-23 Thread Rob Clark
From: Rob Clark The introduction of 025d27239a2f exposes a problem with f371bcc0c2ac, in that we need to keep the object pinned in the time the submit is queued up in the gpu scheduler. Otherwise the shrinker will see it as a thing that can be evicted if we wait for it to be signaled. But if

[PATCH] drm/msm: Add MSM_INFO_GET_FLAGS

2022-09-23 Thread Rob Clark
From: Rob Clark In some cases crosvm needs a way to query the cache flags to communicate them to the guest kernel for guest userspace mapping. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c | 10 ++ include/uapi/drm/msm_drm.h| 1 + 2 files changed, 11 insertions

[pull] drm/msm: drm-msm-next-2022-09-22 for v6.1

2022-09-22 Thread Rob Clark
lace parent names with clk_hw pointers drm/msm/dsi_phy_7nm: Replace parent names with clk_hw pointers Nathan Chancellor (1): drm/msm/dsi: Remove use of device_node in dsi_host_parse_dt() Rob Clark (19): drm/msm: Reorder lock vs submit alloc drm/msm: Small submit cleanup

Re: [PATCH 2/2] drm/msm/dpu: Add support for P010 format

2022-09-12 Thread Rob Clark
On Thu, Sep 1, 2022 at 1:34 PM Jessica Zhang wrote: > > Add support for P010 color format. This adds support for both linear and > compressed formats. > > Signed-off-by: Jessica Zhang Reviewed-by: Rob Clark > --- > drivers/gpu/drm/msm/disp/dpu1/

Re: [PATCH 1/2] drm/msm/dpu: Add support for XR30 format

2022-09-12 Thread Rob Clark
On Thu, Sep 1, 2022 at 1:34 PM Jessica Zhang wrote: > > Add support for XR30 color format. This supports both linear and > compressed formats. > > Signed-off-by: Jessica Zhang Reviewed-by: Rob Clark > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c| 7 +++ &

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

2022-09-11 Thread Rob Clark
On Wed, Sep 7, 2022 at 3:25 AM Dmitry Osipenko wrote: > > On 8/23/22 19:47, Rob Clark wrote: > > 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 Os

Re: [PATCH v1] drm/ttm: Refcount allocated tail pages

2022-09-08 Thread Rob Clark
iately stop this completely broken approach. We have discussed > > this multiple times now. > > Yeah we need to get this stuff closed for real by tagging them all with > VM_IO or VM_PFNMAP asap. > > It seems ot be a recurring amount of fun that people try to mmap dma-buf > and

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

2022-09-07 Thread Rob Clark
On Wed, Sep 7, 2022 at 9:55 AM Daniel Vetter wrote: > > On Thu, Aug 18, 2022 at 08:01:53AM -0700, Rob Clark wrote: > > On Thu, Aug 18, 2022 at 7:54 AM Christian König > > wrote: > > > > > > Am 18.08.22 um 16:25 schrieb Rob Clark: > > > >

Re: [Linaro-mm-sig] [PATCH v2 1/3] dma-buf: Add ioctl to query mmap info

2022-09-07 Thread Rob Clark
On Tue, Sep 6, 2022 at 12:46 PM Daniel Vetter wrote: > > On Mon, Aug 01, 2022 at 10:04:55AM -0700, Rob Clark wrote: > > From: Rob Clark > > > > This is a fairly narrowly focused interface, providing a way for a VMM > > in userspace to tell the guest kernel wh

Re: [PATCH] drm/msm: fix repeated words in comments

2022-08-27 Thread Rob Clark
On Fri, Aug 26, 2022 at 2:43 AM Dmitry Baryshkov wrote: > > On 23/08/2022 14:54, Jilin Yuan wrote: > > Delete the redundant word 'one'. > > The whitespace is unnecessary. > > > > > Signed-off-by: Jilin Yuan > > Reviewed-by: Dmitry Baryshkov > Fixes: 7198e6b03155 ("drm/msm: add a3xx gpu support

[pull] drm/msm: drm-msm-fixes-2022-08-27 for v6.0

2022-08-27 Thread Rob Clark
regulators for msm8996_dsi_cfg drm/msm/dsi: Fix number of regulators for SDM660 Kuogee Hsieh (2): drm/msm/dp: make eDP panel as the first connected connector drm/msm/dp: delete DP_RECOVERED_CLOCK_OUT_EN to fix tps4 Rob Clark (1): drm/msm/rd: Fix FIFO-full deadlock sunliming (1

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

[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

[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

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

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

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

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: [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-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 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-16 Thread 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:27 AM Christian König > > wrote: > >> Am 15.08.22 um 23:15 schrieb Rob Clark: > >>> From: Rob Clark > >>> > >

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

2022-08-16 Thread Rob Clark
On Tue, Aug 16, 2022 at 1:27 AM Christian König wrote: > > Am 15.08.22 um 23:15 schrieb Rob Clark: > > From: Rob Clark > > > > This is a fairly narrowly focused interface, providing a way for a VMM > > in userspace to tell the guest kernel what pgprot settings to us

[PATCH v2 3/3] drm/msm/prime: Add mmap_info support

2022-08-15 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 1dee0d18abbb..1db53545ac40 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers

[PATCH v2 2/3] drm/prime: Wire up mmap_info support

2022-08-15 Thread Rob Clark
From: Rob Clark Just plumbing the thing thru an extra layer. Signed-off-by: Rob Clark --- drivers/gpu/drm/drm_prime.c | 3 +++ include/drm/drm_gem.h | 11 +++ 2 files changed, 14 insertions(+) diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c index

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

2022-08-15 Thread Rob Clark
From: Rob Clark This is a fairly narrowly focused interface, providing a way for a VMM in userspace to tell the guest kernel what pgprot settings to use when mapping a buffer to guest userspace. For buffers that get mapped into guest userspace, virglrenderer returns a dma-buf fd to the VMM

[PATCH v2 0/3] dma-buf: map-info support

2022-08-15 Thread Rob Clark
From: Rob Clark See 1/3 for motivation. Rob Clark (3): dma-buf: Add ioctl to query mmap coherency/cache info drm/prime: Wire up mmap_info support drm/msm/prime: Add mmap_info support drivers/dma-buf/dma-buf.c | 63 ++-- drivers/gpu/drm/drm_prime.c | 3

[PATCH] drm/virtio: Fix same-context optimization

2022-08-12 Thread Rob Clark
From: Rob Clark When VIRTGPU_EXECBUF_RING_IDX is used, we should be considering the timeline that the EB if running on rather than the global driver fence context. Fixes: 85c83ea915ed ("drm/virtio: implement context init: allocate an array of fence contexts") Signed-off-by:

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

2022-08-12 Thread Rob Clark
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 8/11/22 02:19, Rob Clark wrote: > > > On Wed, Aug 10, 2022 at 3:23 PM Dmitry Osipenko > > > wrote: > > >> > > >

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