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

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

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

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

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

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

2022-10-24 Thread Rob Clark
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 drivers/g

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

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

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

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

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

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

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

[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
t 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 drm/msm: Sp

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
ly 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 then call get_user_p

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

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

2022-08-27 Thread Rob Clark
of 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

[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

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

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

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

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

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

2022-08-12 Thread Rob Clark
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: > >> > >> On 8/11/22 01:03, Rob Clark wrote: > >>> On Wed, Aug 10, 2022 at 12:26 PM Dmitry

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

2022-08-10 Thread Rob Clark
On Wed, Aug 10, 2022 at 3:23 PM Dmitry Osipenko wrote: > > On 8/11/22 01:03, Rob Clark wrote: > > On Wed, Aug 10, 2022 at 12:26 PM Dmitry Osipenko > > wrote: > >> > >> On 8/10/22 18:08, Rob Clark wrote: > >>> On Wed, Aug 10, 2022 at 4:47 AM Da

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

2022-08-10 Thread Rob Clark
On Wed, Aug 10, 2022 at 11:25 AM Rodrigo Siqueira Jordao wrote: > > Hi Tomeu, > > First of all, nice patch! I just saw it, and I have some basic questions > (I don't understand many of these CI details). I also CC some CI folks > from the display team at AMD. > > On 2022-07-26 14:16, Tomeu Vizoso

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

2022-08-10 Thread Rob Clark
On Wed, Aug 10, 2022 at 12:26 PM Dmitry Osipenko wrote: > > On 8/10/22 18:08, Rob Clark wrote: > > On Wed, Aug 10, 2022 at 4:47 AM Daniel Vetter wrote: > >> > >> On Wed, Jul 06, 2022 at 10:02:07AM +0300, Dmitry Osipenko wrote: > >>> On 7/6/22 00:48, R

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

2022-08-10 Thread Rob Clark
On Wed, Aug 10, 2022 at 4:47 AM Daniel Vetter wrote: > > On Wed, Jul 06, 2022 at 10:02:07AM +0300, Dmitry Osipenko wrote: > > On 7/6/22 00:48, Rob Clark wrote: > > > On Tue, Jul 5, 2022 at 4:51 AM Christian König > > > wrote: > > >> > >

Re: DMA-buf and uncached system memory

2022-08-09 Thread Rob Clark
On Mon, Feb 15, 2021 at 12:58 AM Christian König wrote: > > Hi guys, > > we are currently working an Freesync and direct scan out from system > memory on AMD APUs in A+A laptops. > > On problem we stumbled over is that our display hardware needs to scan > out from uncached system memory and we

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

2022-08-08 Thread Rob Clark
On Mon, Aug 8, 2022 at 7:56 AM Christian König wrote: > > Am 08.08.22 um 15:26 schrieb Rob Clark: > > On Mon, Aug 8, 2022 at 4:22 AM Christian König > > wrote: > > > > [SNIP] > >>>> If the virtio/virtgpu UAPI was build around the idea that t

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

2022-08-08 Thread Rob Clark
On Mon, Aug 8, 2022 at 4:22 AM Christian König wrote: > > Am 07.08.22 um 21:10 schrieb Rob Clark: > > On Sun, Aug 7, 2022 at 11:05 AM Christian König > > wrote: > >> Am 07.08.22 um 19:56 schrieb Rob Clark: > >>> On Sun, Aug 7, 2022 at 10:38 AM Chr

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

2022-08-08 Thread Rob Clark
On Sun, Aug 7, 2022 at 1:25 PM Akhil P Oommen wrote: > > On 7/29/2022 10:37 PM, 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 what pgprot settings to

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

2022-08-07 Thread Rob Clark
On Sun, Aug 7, 2022 at 11:05 AM Christian König wrote: > > Am 07.08.22 um 19:56 schrieb Rob Clark: > > On Sun, Aug 7, 2022 at 10:38 AM Christian König > > wrote: > >> [SNIP] > >> And exactly that was declared completely illegal the last time it came > >

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

2022-08-07 Thread Rob Clark
On Sun, Aug 7, 2022 at 10:38 AM Christian König wrote: > > Am 07.08.22 um 19:35 schrieb Rob Clark: > > On Sun, Aug 7, 2022 at 10:14 AM Christian König > > wrote: > >> Am 07.08.22 um 19:02 schrieb Rob Clark: > >>> On Sun, Aug 7, 2022 at 9:09 AM Christian Kö

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

2022-08-07 Thread Rob Clark
On Sun, Aug 7, 2022 at 10:14 AM Christian König wrote: > > Am 07.08.22 um 19:02 schrieb Rob Clark: > > On Sun, Aug 7, 2022 at 9:09 AM Christian König > > wrote: > >> Am 29.07.22 um 19:07 schrieb Rob Clark: > >>> From: Rob Clark > >>> > >

[PATCH] drm/msm: Add fault-injection support

2022-08-07 Thread Rob Clark
From: Rob Clark Intended as a way to trigger error paths in mesa. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_debugfs.c | 8 drivers/gpu/drm/msm/msm_drv.c | 15 +++ drivers/gpu/drm/msm/msm_drv.h | 7 +++ 3 files changed, 30 insertions(+) diff --git

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

2022-08-07 Thread Rob Clark
On Sun, Aug 7, 2022 at 9:09 AM Christian König wrote: > > Am 29.07.22 um 19:07 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

[PATCH v2 2/2] drm/msm/rd: Fix FIFO-full deadlock

2022-08-07 Thread Rob Clark
From: Rob Clark If the previous thing cat'ing $debugfs/rd left the FIFO full, then subsequent open could deadlock in rd_write() (because open is blocked, not giving a chance for read() to consume any data in the FIFO). Also it is generally a good idea to clear out old data from the FIFO

[PATCH v2 1/2] drm/msm: Move hangcheck timer restart

2022-08-07 Thread Rob Clark
From: Rob Clark Don't directly restart the hangcheck timer from the timer handler, but instead start it after the recover_worker replays remaining jobs. If the kthread is blocked for other reasons, there is no point to immediately restart the timer. Fixes a random symptom of the problem fixed

Re: [PATCH 1/2] drm/msm: Move hangcheck timer restart

2022-08-04 Thread Rob Clark
On Thu, Aug 4, 2022 at 12:53 AM Akhil P Oommen wrote: > > On 8/4/2022 1:59 AM, Rob Clark wrote: > > On Wed, Aug 3, 2022 at 12:52 PM Akhil P Oommen > > wrote: > >> On 8/3/2022 10:53 PM, Rob Clark wrote: > >>> From: Rob Clark > >>> > >>

Re: [PATCH 1/2] drm/msm: Move hangcheck timer restart

2022-08-03 Thread Rob Clark
On Wed, Aug 3, 2022 at 12:52 PM Akhil P Oommen wrote: > > On 8/3/2022 10:53 PM, Rob Clark wrote: > > From: Rob Clark > > > > Don't directly restart the hangcheck timer from the timer handler, but > > instead start it after the recover_worker replays remainin

[PATCH 2/2] drm/msm/rd: Fix FIFO-full deadlock

2022-08-03 Thread Rob Clark
From: Rob Clark If the previous thing cat'ing $debugfs/rd left the FIFO full, then subsequent open could deadlock in rd_write() (because open is blocked, not giving a chance for read() to consume any data in the FIFO). Also it is generally a good idea to clear out old data from the FIFO

[PATCH 1/2] drm/msm: Move hangcheck timer restart

2022-08-03 Thread Rob Clark
From: Rob Clark Don't directly restart the hangcheck timer from the timer handler, but instead start it after the recover_worker replays remaining jobs. If the kthread is blocked for other reasons, there is no point to immediately restart the timer. Fixes a random symptom of the problem fixed

Re: [PATCH 0/5] clk/qcom: Support gdsc collapse polling using 'reset' inteface

2022-08-02 Thread Rob Clark
On Tue, Aug 2, 2022 at 12:02 AM Dmitry Baryshkov wrote: > > On 30/07/2022 12:17, Akhil P Oommen wrote: > > > > Some clients like adreno gpu driver would like to ensure that its gdsc > > is collapsed at hardware during a gpu reset sequence. This is because it > > has a votable gdsc which could be

[PATCH v4 15/15] drm/msm/gem: Convert to lockdep assert

2022-08-02 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.h | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h index 3c6add51d13b..c4844cf3a585 100644 --- a/drivers/gpu/drm/msm

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

2022-08-02 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 v4 14/15] drm/msm/gem: Add msm_gem_assert_locked()

2022-08-02 Thread Rob Clark
From: Rob Clark All use of msm_gem_is_locked() is just for WARN_ON()s, so extract out into an msm_gem_assert_locked() patch. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 36 +-- drivers/gpu/drm/msm/msm_gem.h | 8 +++- 2 files changed, 25

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

2022-08-02 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_shrinker.c

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

2022-08-02 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 content

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

2022-08-02 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. v2: Check for __GFP_ATOMIC before blocking Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gem_shrinker.c | 70 +- drivers/gpu/drm

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

2022-08-02 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 v4 08/15] drm/msm/gem: Remove active refcnt

2022-08-02 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 v4 06/15] drm/msm/gem: Rename to pin/unpin_pages

2022-08-02 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/drm/msm

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

2022-08-02 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/drm/msm

[PATCH v4 03/15] drm/msm: Split out idr_lock

2022-08-02 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/drm/msm

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

2022-08-02 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

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