[PATCH 06/12] drm/msm/adreno: Allow SoC specific gpu device table entries

2023-07-06 Thread Rob Clark
From: Rob Clark There are cases where there are differences due to SoC integration. Such as cache-coherency support, and (in the next patch) e-fuse to speedbin mappings. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/adreno_device.c | 34 +++--- drivers/gpu/drm/msm

[PATCH 07/12] drm/msm/adreno: Move speedbin mapping to device table

2023-07-06 Thread Rob Clark
From: Rob Clark This simplifies the code. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 171 ++--- drivers/gpu/drm/msm/adreno/adreno_device.c | 51 ++ drivers/gpu/drm/msm/adreno/adreno_gpu.h| 25 +++ 3 files changed, 92 insertions(+), 155

[PATCH 05/12] drm/msm/adreno: Use quirk to identify cached-coherent support

2023-07-06 Thread Rob Clark
From: Rob Clark It is better to explicitly list it. With the move to opaque chip-id's for future devices, we should avoid trying to infer things like generation from the numerical value. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/adreno_device.c

[PATCH 04/12] drm/msm/adreno: Use quirk identify hw_apriv

2023-07-06 Thread Rob Clark
From: Rob Clark Rather than just open coding a list of gpu-id matches. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 3 +-- drivers/gpu/drm/msm/adreno/adreno_device.c | 4 drivers/gpu/drm/msm/adreno/adreno_gpu.h| 1 + 3 files changed, 6 insertions(+), 2

[PATCH 03/12] drm/msm/adreno: Remove redundant revn param

2023-07-06 Thread Rob Clark
From: Rob Clark This just duplicates what is in adreno_info, and can cause confusion if used before it is set. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 -- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 1 - drivers/gpu/drm/msm/adreno/adreno_gpu.h | 22

[PATCH 02/12] drm/msm/adreno: Remove redundant gmem size param

2023-07-06 Thread Rob Clark
From: Rob Clark Even in the ocmem case, the allocated ocmem buffer size should match the requested size. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2

[PATCH 01/12] drm/msm/adreno: Remove GPU name

2023-07-06 Thread Rob Clark
From: Rob Clark No real need to have marketing names in the kernel. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/adreno_device.c | 24 -- drivers/gpu/drm/msm/adreno/adreno_gpu.c| 13 +--- drivers/gpu/drm/msm/adreno/adreno_gpu.h| 1 - 3 files

[PATCH 00/12] drm/msm/adreno: Move away from legacy revision matching

2023-07-06 Thread Rob Clark
From: Rob Clark Downstream seems to be moving to using the chip_id as simply an opaque identifier, and if we want to avoid headaches with userspace mesa supporting both kgsl and upstream, we should move away from the assumption that certain bits in the chip_id have a specific meaning. Patches 6

Re: [PATCH 1/2] drm/msm/adreno: Fix warn splat for devices without revn

2023-07-05 Thread Rob Clark
On Tue, Jul 4, 2023 at 10:20 AM Dmitry Baryshkov wrote: > > On Tue, 4 Jul 2023 at 19:36, Rob Clark wrote: > > > > From: Rob Clark > > > > Recently, a WARN_ON() was introduced to ensure that revn is filled before > > adreno_is_aXYZ is called. This however

[PATCH 1/2] drm/msm/adreno: Fix warn splat for devices without revn

2023-07-04 Thread Rob Clark
From: Rob Clark Recently, a WARN_ON() was introduced to ensure that revn is filled before adreno_is_aXYZ is called. This however doesn't work very well when revn is 0 by design (such as for A635). Cc: Konrad Dybcio Fixes: cc943f43ece7 ("drm/msm/adreno: warn if chip revn is verif

[PATCH 2/2] drm/msm/a690: Remove revn and name

2023-07-04 Thread Rob Clark
From: Rob Clark These fields are deprecated. But any userspace new enough to support a690 also knows how to identify the GPU based on chip-id. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/adreno_device.c | 2 -- drivers/gpu/drm/msm/adreno/adreno_gpu.h| 3 ++- 2 files changed

Re: [PATCH v2] drm/msm/adreno: Assign revn to A635

2023-07-02 Thread Rob Clark
On Sun, Jul 2, 2023 at 7:34 AM Dmitry Baryshkov wrote: > > On 02/07/2023 17:31, Rob Clark wrote: > > On Sat, Jul 1, 2023 at 5:24 PM Dmitry Baryshkov > > wrote: > >> > >> On Sat, 1 Jul 2023 at 18:50, Rob Clark wrote: > >>> > >>>

Re: [PATCH v2] drm/msm/adreno: Assign revn to A635

2023-07-02 Thread Rob Clark
On Sat, Jul 1, 2023 at 5:24 PM Dmitry Baryshkov wrote: > > On Sat, 1 Jul 2023 at 18:50, Rob Clark wrote: > > > > On Fri, Jun 30, 2023 at 4:12 PM Konrad Dybcio > > wrote: > > > > > > Recently, a WARN_ON() was introduced to ensure that revn is filled b

Re: [PATCH] drm/msm/adreno: warn if GPU revision is not known yet

2023-07-01 Thread Rob Clark
On Sat, Jul 1, 2023 at 10:15 AM Rob Clark wrote: > > From: Rob Clark > > The commit 010c8bbad2cb ("drm: msm: adreno: Disable preemption on Adreno > 510") tried to check GPU's revn before revn being set. Add WARN_ON_ONCE > to prevent such bugs from happ

Re: [PATCH v2] drm/msm/adreno: Assign revn to A635

2023-07-01 Thread Rob Clark
On Sat, Jul 1, 2023 at 8:49 AM Rob Clark wrote: > > On Fri, Jun 30, 2023 at 4:12 PM Konrad Dybcio > wrote: > > > > Recently, a WARN_ON() was introduced to ensure that revn is filled before > > adreno_is_aXYZ is called. This however doesn't work very well when

[PATCH] drm/msm/adreno: warn if GPU revision is not known yet

2023-07-01 Thread Rob Clark
From: Rob Clark The commit 010c8bbad2cb ("drm: msm: adreno: Disable preemption on Adreno 510") tried to check GPU's revn before revn being set. Add WARN_ON_ONCE to prevent such bugs from happening again. A separate helper is necessary so that the warning is displayed really just

[PATCH] drm/msm/a690: Remove revn and name

2023-07-01 Thread Rob Clark
From: Rob Clark These fields are deprecated. But any userspace new enough to support a690 also knows how to identify the GPU based on chip-id. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno/adreno_device.c | 2 -- drivers/gpu/drm

Re: [PATCH v2] drm/msm/adreno: Assign revn to A635

2023-07-01 Thread Rob Clark
On Fri, Jun 30, 2023 at 4:12 PM Konrad Dybcio wrote: > > Recently, a WARN_ON() was introduced to ensure that revn is filled before > adreno_is_aXYZ is called. This however doesn't work very well when revn is > 0 by design (such as for A635). Fill it in as a stopgap solution for > -fixes. > > Fixes

Re: [PATCH] drm/msm/adreno: Assign revn to A635

2023-06-30 Thread Rob Clark
On Wed, Jun 28, 2023 at 12:54 PM Dmitry Baryshkov wrote: > > On 28/06/2023 22:05, Konrad Dybcio wrote: > > Recently, a WARN_ON() was introduced to ensure that revn is filled before > > adreno_is_aXYZ is called. This however doesn't work very well when revn is > > 0 by design (such as for A635). Fi

[PATCH] drm/msm/a6xx: Fix misleading comment

2023-06-30 Thread Rob Clark
From: Rob Clark The range is actually len+1. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.h b/drivers/gpu/drm/msm/adreno/a6xx_gpu.h index eea2e60ce3b7

Re: [PATCH v6 0/3] Add sync object UAPI support to VirtIO-GPU driver

2023-06-27 Thread Rob Clark
context fence sharing working (with the > wait pushed down to the host), that's something the current UAPI can't do > - Work iteratively (i.e, it's fine to merge Mesa/virglrenderer MRs as > "experimental") and in steps, no need to figure everything out at once > > N

[pull] drm/msm: drm-msm-next-2023-06-18 for v6.5

2023-06-18 Thread Rob Clark
eck support on INTF block drm/msm/dpu: Remove intr_rdptr from DPU >= 5.0.0 pingpong config Neil Armstrong (1): dt-bindings: display: msm: dp-controller: document SM8550 compatible Rob Clark (8): drm/msm/atomic: Don't try async if crtc not active drm/msm: Fix vmap ma

Re: [PATCH] drm/msm/adreno: make adreno_is_a690()'s argument const

2023-06-14 Thread Rob Clark
660(gpu) || adreno_is_a690(gpu) || > adreno_is_7c3(gpu); > > Fixes: 1b90e8f8879c ("drm/msm/adreno: change adreno_is_* functions to accept > const argument") > Signed-off-by: Dmitry Baryshkov Reviewed-by: Rob Clark > --- > drivers/gpu/drm/msm/adreno/adreno_gpu.h | 2

Re: [PATCH 6/8] drm: Add drm_gem_prime_fd_to_handle_obj

2023-06-09 Thread Rob Clark
On Fri, Jun 9, 2023 at 7:12 AM Tvrtko Ursulin wrote: > > > On 09/06/2023 13:44, Iddamsetty, Aravind wrote: > > On 09-06-2023 17:41, Tvrtko Ursulin wrote: > >> From: Tvrtko Ursulin > >> > >> I need a new flavour of the drm_gem_prime_fd_to_handle helper, one which > >> will return a reference to a

Re: Adreno devfreq lockdep splat with 6.3-rc2

2023-06-09 Thread Rob Clark
On Thu, Jun 8, 2023 at 11:17 PM Johan Hovold wrote: > > On Thu, Jun 08, 2023 at 02:17:45PM -0700, Rob Clark wrote: > > On Thu, Jun 8, 2023 at 7:12 AM Johan Hovold wrote: > > > > Have you had a chance to look at this regression yet? It prevents us > > > from u

[pull] drm/msm: drm-msm-fixes-2023-06-08 for v6.4-rc6 [resend]

2023-06-08 Thread Rob Clark
lugin/unplugged interrupts at hpd_enable/disable Rob Clark (1): drm/msm: Set max segment size earlier drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 - drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 + drivers/gpu/drm/msm/dp/dp_catalog.c | 15 ++- drivers/gpu/drm/msm/dp/dp_catalog.h

Re: Adreno devfreq lockdep splat with 6.3-rc2

2023-06-08 Thread Rob Clark
On Thu, Jun 8, 2023 at 7:12 AM Johan Hovold wrote: > > Hi Rob, > > Have you had a chance to look at this regression yet? It prevents us > from using lockdep on the X13s as it is disabled as soon as we start > the GPU. Hmm, curious what is different between x13s and sc7180/sc7280 things? Or did lo

Re: [PATCH v3 1/3] drm/msm/adreno: Add Adreno A690 support

2023-06-05 Thread Rob Clark
ECT_RDONLY(0x008d0, 0x000bc), + A6XX_PROTECT_RDONLY(0x008de, 0x000ae), A6XX_PROTECT_NORDWR(0x00900, 0x0004d), A6XX_PROTECT_NORDWR(0x0098d, 0x00272), A6XX_PROTECT_NORDWR(0x00e00, 0x1), @@ -824,7 +824,7 @@ static const u32 a690_protect[] = { A6XX_PROTECT_RDONLY(0x03cc4, 0x01fff), A6XX_P

[pull] drm/msm: drm-msm-fixes-2023-06-04 for v6.4-rc6

2023-06-04 Thread Rob Clark
mutex Abhinav Kumar (1): drm/msm/dp: add module parameter for PSR Dmitry Baryshkov (1): drm/msm/a6xx: initialize GMU mutex earlier Kuogee Hsieh (1): drm/msm/dp: enable HDP plugin/unplugged interrupts at hpd_enable/disable Rob Clark (1): drm/msm

Re: [PATCH v2 2/6] drm/msm/a6xx: Explain CP_PROTECT_CNTL writes in a6xx_set_cp_protect

2023-05-25 Thread Rob Clark
On Fri, May 19, 2023 at 6:29 AM Konrad Dybcio wrote: > > We have the necessary information, so explain which bit does what. > > Signed-off-by: Konrad Dybcio > --- > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/d

[PATCH 2/2] drm/amdgpu: Remove duplicate fdinfo fields

2023-05-25 Thread Rob Clark
From: Rob Clark Some of the fields that are handled by drm_show_fdinfo() crept back in when rebasing the patch. Remove them again. Fixes: 376c25f8ca47 ("drm/amdgpu: Switch to fdinfo helper") Signed-off-by: Rob Clark --- drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 3 --- 1 file

[PATCH 1/2] drm/amdgpu: Fix no-procfs build

2023-05-25 Thread Rob Clark
From: Rob Clark Fixes undefined symbol when PROC_FS is not enabled. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202305251510.u0r2as7k-...@intel.com/ Fixes: 376c25f8ca47 ("drm/amdgpu: Switch to fdinfo helper") Signed-off-by: Rob Clark --- drivers/g

[PATCH v5 7/7] drm/doc: Relax fdinfo string constraints

2023-05-24 Thread Rob Clark
From: Rob Clark The restriction about no whitespace, etc, really only applies to the usage of strings in keys. Values can contain anything (other than newline). Signed-off-by: Rob Clark Acked-by: Tvrtko Ursulin Acked-by: Dave Airlie --- Documentation/gpu/drm-usage-stats.rst | 27

[PATCH v5 6/7] drm/msm: Add memory stats to fdinfo

2023-05-24 Thread Rob Clark
From: Rob Clark Use the new helper to export stats about memory usage. v2: Drop unintended hunk v3: Rebase Signed-off-by: Rob Clark Reviewed-by: Emil Velikov Acked-by: Dave Airlie --- drivers/gpu/drm/msm/msm_drv.c | 2 ++ drivers/gpu/drm/msm/msm_gem.c | 15 +++ 2 files changed

[PATCH v5 4/7] drm/amdgpu: Switch to fdinfo helper

2023-05-24 Thread Rob Clark
From: Rob Clark v2: Rebase on drm-misc-next Signed-off-by: Rob Clark Reviewed-by: Christian König Acked-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 32 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.h

[PATCH v5 5/7] drm: Add fdinfo memory stats

2023-05-24 Thread Rob Clark
From: Rob Clark Add support to dump GEM stats to fdinfo. v2: Fix typos, change size units to match docs, use div_u64 v3: Do it in core v4: more kerneldoc v5: doc fixes v6: Actually use u64, bit more comment docs Signed-off-by: Rob Clark Reviewed-by: Emil Velikov Reviewed-by: Daniel Vetter

[PATCH v5 3/7] drm/msm: Switch to fdinfo helper

2023-05-24 Thread Rob Clark
From: Rob Clark Now that we have a common helper, use it. v2: Rebase on drm-misc-next Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Acked-by: Dave Airlie --- drivers/gpu/drm/msm/msm_drv.c | 11 +-- drivers/gpu/drm/msm/msm_gpu.c | 2 -- 2 files changed, 5 insertions(+), 8

[PATCH v5 2/7] drm: Add common fdinfo helper

2023-05-24 Thread Rob Clark
From: Rob Clark Handle a bit of the boiler-plate in a single case, and make it easier to add some core tracked stats. This also ensures consistent behavior across drivers for standardised fields. v2: Update drm-usage-stats.rst, 64b client-id, rename drm_show_fdinfo v3: Rebase on drm-misc-next

[PATCH v5 1/7] drm/docs: Fix usage stats typos

2023-05-24 Thread Rob Clark
From: Rob Clark Fix a couple missing ':'s. Signed-off-by: Rob Clark Reviewed-by: Rodrigo Vivi Acked-by: Dave Airlie --- Documentation/gpu/drm-usage-stats.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/gpu/drm-usage-stats.rst b/Documen

[PATCH v5 0/7] drm: fdinfo memory stats

2023-05-24 Thread Rob Clark
From: Rob Clark Similar motivation to other similar recent attempt[1]. But with an attempt to have some shared code for this. As well as documentation. It is probably a bit UMA-centric, I guess devices with VRAM might want some placement stats as well. But this seems like a reasonable start

Re: [PATCH] drm/msm/dp: add module parameter for PSR

2023-05-23 Thread Rob Clark
ts enabled for all sinks if PSR is supported. > > I had discussed with Rob that till we have some more confidence with the > reported issues we would go with the modparam so as to not do the full > revert. > > In this particular case, the one line revert is not really a deal > breaker. In some other implementations, it might not really be so > trivial to revert the feature with a one line change. > > So I would like to understand what is the concern with the mod param if > the maintainers are onboard with it. Tbf, I'd go further in the modparam direction, ie. add a default disabled modparam, but then _also_ enable the modparam in CI and add the failing tests to xfails. I'd rather have xfails in CI than skips. Acked-by: Rob Clark BR, -R

Re: [PATCH] MAINTAINERS: Add Marijn Suijten as drm/msm reviewer

2023-05-19 Thread Rob Clark
oad allows for it. > > I think Marijn does a good job of reviewing incoming patches in the > mentioned area. > > Acked-by: Dmitry Baryshkov Acked-by: Rob Clark > > > > > MAINTAINERS | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a

Re: [PATCH v2 8/9] drm/fdinfo: Add comm/cmdline override fields

2023-05-18 Thread Rob Clark
On Thu, May 18, 2023 at 2:43 AM Tvrtko Ursulin wrote: > > > In case you were waiting for me looking at the rest of the series, there > was this reply from the previous round I can expand on. > > On 02/05/2023 08:50, Tvrtko Ursulin wrote: > > > > On 01/05/2023 17:58

[pull] drm/msm: drm-msm-fixes-2023-05-17 for v6.4-rc3

2023-05-17 Thread Rob Clark
sub-block in SM8[34]50/SC8280XP drm/msm/dpu: Set PINGPONG block length to zero for DPU >= 7.0.0 drm/msm/dpu: Remove duplicate register defines from INTF Rob Clark (5): drm/msm/atomic: Don't try async if crtc not active drm/msm: Fix vmap madv warning drm/msm: Fix submi

[PATCH v4 2/2] drm/msm: Be more shouty if per-process pgtables aren't working

2023-05-16 Thread Rob Clark
From: Rob Clark Otherwise it is not always obvious if a dt or iommu change is causing us to fall back to global pgtable. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_iommu.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_iommu.c b

[PATCH v4 1/2] iommu/arm-smmu-qcom: Fix missing adreno_smmu's

2023-05-16 Thread Rob Clark
From: Rob Clark When the special handling of qcom,adreno-smmu was moved into qcom_smmu_create(), it was overlooked that we didn't have all the required entries in qcom_smmu_impl_of_match. So we stopped getting adreno_smmu_priv on sc7180, breaking per-process pgtables. Fixes: 30b912a

[PATCH v4 8/9] drm/fdinfo: Add comm/cmdline override fields

2023-05-15 Thread Rob Clark
From: Rob Clark These are useful in particular for VM scenarios where the process which has opened to drm device file is just a proxy for the real user in a VM guest. v2: doc cleanups Signed-off-by: Rob Clark --- Documentation/gpu/drm-usage-stats.rst | 10 ++ drivers/gpu/drm

[PATCH v4 9/9] drm/msm: Wire up comm/cmdline override for fdinfo

2023-05-15 Thread Rob Clark
From: Rob Clark Also store the override strings in drm_file so that fdinfo can display them. We still need to keep our original copy as we could need these override strings after the device file has been closed and drm_file freed. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno

[PATCH v4 7/9] drm/doc: Relax fdinfo string constraints

2023-05-15 Thread Rob Clark
From: Rob Clark The restriction about no whitespace, etc, really only applies to the usage of strings in keys. Values can contain anything (other than newline). Signed-off-by: Rob Clark Acked-by: Tvrtko Ursulin --- Documentation/gpu/drm-usage-stats.rst | 27 ++- 1

[PATCH v4 6/9] drm/msm: Add memory stats to fdinfo

2023-05-15 Thread Rob Clark
From: Rob Clark Use the new helper to export stats about memory usage. v2: Drop unintended hunk v3: Rebase Signed-off-by: Rob Clark Reviewed-by: Emil Velikov --- drivers/gpu/drm/msm/msm_drv.c | 2 ++ drivers/gpu/drm/msm/msm_gem.c | 15 +++ 2 files changed, 17 insertions

[PATCH v4 5/9] drm: Add fdinfo memory stats

2023-05-15 Thread Rob Clark
From: Rob Clark Add support to dump GEM stats to fdinfo. v2: Fix typos, change size units to match docs, use div_u64 v3: Do it in core v4: more kerneldoc v5: doc fixes v6: Actually use u64, bit more comment docs Signed-off-by: Rob Clark Reviewed-by: Emil Velikov Reviewed-by: Daniel Vetter

[PATCH v4 4/9] drm/amdgpu: Switch to fdinfo helper

2023-05-15 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 16 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.h | 2 +- 3 files changed, 9 insertions(+), 12 deletions

[PATCH v4 1/9] drm/docs: Fix usage stats typos

2023-05-15 Thread Rob Clark
From: Rob Clark Fix a couple missing ':'s. Signed-off-by: Rob Clark Reviewed-by: Rodrigo Vivi --- Documentation/gpu/drm-usage-stats.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/gpu/drm-usage-stats.rst b/Documentation/gpu/drm-usage-stats

[PATCH v4 2/9] drm: Add common fdinfo helper

2023-05-15 Thread Rob Clark
From: Rob Clark Handle a bit of the boiler-plate in a single case, and make it easier to add some core tracked stats. This also ensures consistent behavior across drivers for standardised fields. v2: Update drm-usage-stats.rst, 64b client-id, rename drm_show_fdinfo Reviewed-by: Daniel Vetter

[PATCH v4 3/9] drm/msm: Switch to fdinfo helper

2023-05-15 Thread Rob Clark
From: Rob Clark Now that we have a common helper, use it. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_drv.c | 11 +-- drivers/gpu/drm/msm/msm_gpu.c | 2 -- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm

[PATCH v4 0/9] drm: fdinfo memory stats

2023-05-15 Thread Rob Clark
From: Rob Clark Similar motivation to other similar recent attempt[1]. But with an attempt to have some shared code for this. As well as documentation. It is probably a bit UMA-centric, I guess devices with VRAM might want some placement stats as well. But this seems like a reasonable start

[PATCH v3 2/2] drm/msm: Be more shouty if per-process pgtables aren't working

2023-05-11 Thread Rob Clark
From: Rob Clark Otherwise it is not always obvious if a dt or iommu change is causing us to fall back to global pgtable. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_iommu.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_iommu.c b

[PATCH v3 1/2] iommu/arm-smmu-qcom: Fix missing adreno_smmu's

2023-05-11 Thread Rob Clark
From: Rob Clark When the special handling of qcom,adreno-smmu was moved into qcom_smmu_create(), it was overlooked that we didn't have all the required entries in qcom_smmu_impl_of_match. So we stopped getting adreno_smmu_priv on sc7180, breaking per-process pgtables. Fixes: 30b912a

Re: [PATCH 1/2] iommu/arm-smmu-qcom: Fix missing adreno_smmu's

2023-05-11 Thread Rob Clark
On Thu, May 11, 2023 at 7:51 AM Dmitry Baryshkov wrote: > > On Tue, 9 May 2023 at 19:37, Rob Clark wrote: > > > > From: Rob Clark > > > > When the special handling of qcom,adreno-smmu was moved into > > qcom_smmu_create(), it was overlooked that we didn&#x

Re: [PATCH 1/2] iommu/arm-smmu-qcom: Fix missing adreno_smmu's

2023-05-11 Thread Rob Clark
On Tue, May 9, 2023 at 9:37 AM Rob Clark wrote: > > From: Rob Clark > > When the special handling of qcom,adreno-smmu was moved into > qcom_smmu_create(), it was overlooked that we didn't have all the > required entries in qcom_smmu_impl_of_match. So we stopped gettin

[PATCH v4] drm/msm: Fix submit error-path leaks

2023-05-09 Thread Rob Clark
From: Rob Clark For errors after msm_submitqueue_get(), we need to drop the submitqueue reference. Additionally after get_unused_fd() we need to drop the fd. The ordering for dropping the queue lock and put_unused_fd() is not important, so just move this all into out_post_unlock. v2: Only drop

[PATCH v3] drm/msm: Fix submit error-path leaks

2023-05-09 Thread Rob Clark
From: Rob Clark For errors after msm_submitqueue_get(), we need to drop the submitqueue reference. Additionally after get_unused_fd() we need to drop the fd. The ordering for dropping the queue lock and put_unused_fd() is not important, so just move this all into out_post_unlock. v2: Only drop

[PATCH 1/2] iommu/arm-smmu-qcom: Fix missing adreno_smmu's

2023-05-09 Thread Rob Clark
From: Rob Clark When the special handling of qcom,adreno-smmu was moved into qcom_smmu_create(), it was overlooked that we didn't have all the required entries in qcom_smmu_impl_of_match. So we stopped getting adreno_smmu_priv on sc7180, breaking per-process pgtables. Fixes: 30b912a

[PATCH 2/2] drm/msm: Be more shouty if per-process pgtables aren't working

2023-05-09 Thread Rob Clark
From: Rob Clark Otherwise it is not always obvious if a dt or iommu change is causing us to fall back to global pgtable. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_iommu.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_iommu.c b

Re: [PATCH v6 0/3] Add sync object UAPI support to VirtIO-GPU driver

2023-05-08 Thread Rob Clark
On Wed, May 3, 2023 at 10:07 AM Gurchetan Singh wrote: > > > > On Mon, May 1, 2023 at 8:38 AM Dmitry Osipenko > wrote: >> >> On 4/16/23 14:52, Dmitry Osipenko wrote: >> > We have multiple Vulkan context types that are awaiting for the addition >> > of the sync object DRM UAPI support to the Virt

Re: [PATCH 1/2] iommu/arm-smmu-qcom: Fix missing adreno_smmu's

2023-05-04 Thread Rob Clark
On Thu, May 4, 2023 at 10:41 AM Konrad Dybcio wrote: > > > > On 2.05.2023 18:09, Rob Clark wrote: > > From: Rob Clark > > > > When the special handling of qcom,adreno-smmu was moved into > > qcom_smmu_create(), it was overlooked that we didn&#x

[PATCH 2/2] drm/msm: Be more shouty if per-process pgtables aren't working

2023-05-02 Thread Rob Clark
From: Rob Clark Otherwise it is not always obvious if a dt or iommu change is causing us to fall back to global pgtable. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers

[PATCH 1/2] iommu/arm-smmu-qcom: Fix missing adreno_smmu's

2023-05-02 Thread Rob Clark
From: Rob Clark When the special handling of qcom,adreno-smmu was moved into qcom_smmu_create(), it was overlooked that we didn't have all the required entries in qcom_smmu_impl_of_match. So we stopped getting adreno_smmu_priv on sc7180, breaking per-process pgtables. Fixes: 30b912a

Re: [PATCH] drm/msm: Set max segment size earlier

2023-05-01 Thread Rob Clark
On Mon, May 1, 2023 at 1:56 PM Dmitry Baryshkov wrote: > > On 01/05/2023 23:44, Rob Clark wrote: > > From: Rob Clark > > > > Fixes the following splat on a6xx gen2+ (a640, a650, a660 families), > > a6xx gen1 has smaller GMU allocations so they fit under the de

[PATCH] drm/msm: Set max segment size earlier

2023-05-01 Thread Rob Clark
From: Rob Clark Fixes the following splat on a6xx gen2+ (a640, a650, a660 families), a6xx gen1 has smaller GMU allocations so they fit under the default 64K max segment size. [ cut here ] DMA-API: msm_dpu ae01000.display-controller: mapping sg segment longer than

[PATCH v3 9/9] drm/msm: Wire up comm/cmdline override for fdinfo

2023-05-01 Thread Rob Clark
From: Rob Clark Also store the override strings in drm_file so that fdinfo can display them. We still need to keep our original copy as we could need these override strings after the device file has been closed and drm_file freed. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno

[PATCH v3 8/9] drm/fdinfo: Add comm/cmdline override fields

2023-05-01 Thread Rob Clark
From: Rob Clark These are useful in particular for VM scenarios where the process which has opened to drm device file is just a proxy for the real user in a VM guest. v2: doc cleanups Signed-off-by: Rob Clark --- Documentation/gpu/drm-usage-stats.rst | 10 ++ drivers/gpu/drm

[PATCH v3 7/9] drm/doc: Relax fdinfo string constraints

2023-05-01 Thread Rob Clark
From: Rob Clark The restriction about no whitespace, etc, really only applies to the usage of strings in keys. Values can contain anything (other than newline). Signed-off-by: Rob Clark Acked-by: Tvrtko Ursulin --- Documentation/gpu/drm-usage-stats.rst | 27 ++- 1

[PATCH v3 6/9] drm/msm: Add memory stats to fdinfo

2023-05-01 Thread Rob Clark
From: Rob Clark Use the new helper to export stats about memory usage. v2: Drop unintended hunk v3: Rebase Signed-off-by: Rob Clark Reviewed-by: Emil Velikov --- drivers/gpu/drm/msm/msm_drv.c | 2 ++ drivers/gpu/drm/msm/msm_gem.c | 15 +++ 2 files changed, 17 insertions

[PATCH v3 5/9] drm: Add fdinfo memory stats

2023-05-01 Thread Rob Clark
From: Rob Clark Add support to dump GEM stats to fdinfo. v2: Fix typos, change size units to match docs, use div_u64 v3: Do it in core v4: more kerneldoc v5: doc fixes Signed-off-by: Rob Clark Reviewed-by: Emil Velikov Reviewed-by: Daniel Vetter --- Documentation/gpu/drm-usage-stats.rst

[PATCH v3 4/9] drm/amdgpu: Switch to fdinfo helper

2023-05-01 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 16 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.h | 2 +- 3 files changed, 9 insertions(+), 12 deletions

[PATCH v3 3/9] drm/msm: Switch to fdinfo helper

2023-05-01 Thread Rob Clark
From: Rob Clark Now that we have a common helper, use it. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_drv.c | 11 +-- drivers/gpu/drm/msm/msm_gpu.c | 2 -- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm

[PATCH v3 2/9] drm: Add common fdinfo helper

2023-05-01 Thread Rob Clark
From: Rob Clark Handle a bit of the boiler-plate in a single case, and make it easier to add some core tracked stats. This also ensures consistent behavior across drivers for standardised fields. v2: Update drm-usage-stats.rst, 64b client-id, rename drm_show_fdinfo Reviewed-by: Daniel Vetter

[PATCH v3 0/9] drm: fdinfo memory stats

2023-05-01 Thread Rob Clark
From: Rob Clark Similar motivation to other similar recent attempt[1]. But with an attempt to have some shared code for this. As well as documentation. It is probably a bit UMA-centric, I guess devices with VRAM might want some placement stats as well. But this seems like a reasonable start

[PATCH v3 1/9] drm/docs: Fix usage stats typos

2023-05-01 Thread Rob Clark
From: Rob Clark Fix a couple missing ':'s. Signed-off-by: Rob Clark Reviewed-by: Rodrigo Vivi --- Documentation/gpu/drm-usage-stats.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/gpu/drm-usage-stats.rst b/Documentation/gpu/drm-usage-stats

[PATCH v2] drm/msm: Fix submit error-path leaks

2023-05-01 Thread Rob Clark
From: Rob Clark For errors after msm_submitqueue_get(), we need to drop the submitqueue reference. Additionally after get_unused_fd() we need to drop the fd. The ordering for dropping the queue lock and put_unused_fd() is not important, so just move this all into out_post_unlock. v2: Only drop

Re: [PATCH v2 8/9] drm/fdinfo: Add comm/cmdline override fields

2023-05-01 Thread Rob Clark
On Fri, Apr 28, 2023 at 4:05 AM Tvrtko Ursulin wrote: > > > On 27/04/2023 18:53, Rob Clark wrote: > > From: Rob Clark > > > > These are useful in particular for VM scenarios where the process which > > has opened to drm device file is just a proxy fo

[PATCH] drm/msm: Fix submit error-path leaks

2023-05-01 Thread Rob Clark
From: Rob Clark For errors after msm_submitqueue_get(), we need to drop the submitqueue reference. Additionally after get_unused_fd() we need to drop the fd. The ordering for dropping the queue lock and put_unused_fd() is not important, so just move this all into out_post_unlock. Reported-by

Re: [PATCH v2 5/9] drm: Add fdinfo memory stats

2023-04-28 Thread Rob Clark
On Fri, Apr 28, 2023 at 3:56 AM Tvrtko Ursulin wrote: > > > On 27/04/2023 18:53, Rob Clark wrote: > > From: Rob Clark > > > > Add support to dump GEM stats to fdinfo. > > > > v2: Fix typos, change size units to match docs, use div_u64 > > v3: Do it

Re: [PATCH v2 1/9] drm/docs: Fix usage stats typos

2023-04-28 Thread Rob Clark
On Fri, Apr 28, 2023 at 1:50 AM Christian König wrote: > > Am 27.04.23 um 19:53 schrieb Rob Clark: > > From: Rob Clark > > > > Fix a couple missing ':'s. > > > > Signed-off-by: Rob Clark > > Reviewed-by: Rodrigo Vivi > > Reviewed-b

[PATCH v2 9/9] drm/msm: Wire up comm/cmdline override for fdinfo

2023-04-27 Thread Rob Clark
From: Rob Clark Also store the override strings in drm_file so that fdinfo can display them. We still need to keep our original copy as we could need these override strings after the device file has been closed and drm_file freed. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno

[PATCH v2 7/9] drm/doc: Relax fdinfo string constraints

2023-04-27 Thread Rob Clark
From: Rob Clark The restriction about no whitespace, etc, really only applies to the usage of strings in keys. Values can contain anything (other than newline). Signed-off-by: Rob Clark Acked-by: Tvrtko Ursulin --- Documentation/gpu/drm-usage-stats.rst | 27 ++- 1

[PATCH v2 8/9] drm/fdinfo: Add comm/cmdline override fields

2023-04-27 Thread Rob Clark
From: Rob Clark These are useful in particular for VM scenarios where the process which has opened to drm device file is just a proxy for the real user in a VM guest. Signed-off-by: Rob Clark --- Documentation/gpu/drm-usage-stats.rst | 18 ++ drivers/gpu/drm/drm_file.c

[PATCH v2 5/9] drm: Add fdinfo memory stats

2023-04-27 Thread Rob Clark
From: Rob Clark Add support to dump GEM stats to fdinfo. v2: Fix typos, change size units to match docs, use div_u64 v3: Do it in core v4: more kerneldoc Signed-off-by: Rob Clark Reviewed-by: Emil Velikov Reviewed-by: Daniel Vetter --- Documentation/gpu/drm-usage-stats.rst | 54

[PATCH v2 3/9] drm/msm: Switch to fdinfo helper

2023-04-27 Thread Rob Clark
From: Rob Clark Now that we have a common helper, use it. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_drv.c | 11 +-- drivers/gpu/drm/msm/msm_gpu.c | 2 -- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm

[PATCH v2 4/9] drm/amdgpu: Switch to fdinfo helper

2023-04-27 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 16 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.h | 2 +- 3 files changed, 9 insertions(+), 12 deletions

[PATCH v2 6/9] drm/msm: Add memory stats to fdinfo

2023-04-27 Thread Rob Clark
From: Rob Clark Use the new helper to export stats about memory usage. v2: Drop unintended hunk v3: Rebase Signed-off-by: Rob Clark Reviewed-by: Emil Velikov --- drivers/gpu/drm/msm/msm_drv.c | 2 ++ drivers/gpu/drm/msm/msm_gem.c | 15 +++ 2 files changed, 17 insertions

[PATCH v2 2/9] drm: Add common fdinfo helper

2023-04-27 Thread Rob Clark
From: Rob Clark Handle a bit of the boiler-plate in a single case, and make it easier to add some core tracked stats. This also ensures consistent behavior across drivers for standardised fields. v2: Update drm-usage-stats.rst, 64b client-id, rename drm_show_fdinfo Reviewed-by: Daniel Vetter

[PATCH v2 1/9] drm/docs: Fix usage stats typos

2023-04-27 Thread Rob Clark
From: Rob Clark Fix a couple missing ':'s. Signed-off-by: Rob Clark Reviewed-by: Rodrigo Vivi --- Documentation/gpu/drm-usage-stats.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/gpu/drm-usage-stats.rst b/Documentation/gpu/drm-usage-stats

[PATCH v2 0/9] drm: fdinfo memory stats

2023-04-27 Thread Rob Clark
From: Rob Clark Similar motivation to other similar recent attempt[1]. But with an attempt to have some shared code for this. As well as documentation. It is probably a bit UMA-centric, I guess devices with VRAM might want some placement stats as well. But this seems like a reasonable start

Re: [RFC 2/3] drm/msm: Rework get_comm_cmdline() helper

2023-04-27 Thread Rob Clark
On Thu, Apr 27, 2023 at 2:39 AM Daniel Vetter wrote: > > On Fri, Apr 21, 2023 at 07:47:26AM -0700, Rob Clark wrote: > > On Fri, Apr 21, 2023 at 2:33 AM Emil Velikov > > wrote: > > > > > > Greeting all, > > > > > > Sorry for the delay - East

[PATCH] drm/syncobj: Add deadline support for syncobj waits

2023-04-26 Thread Rob Clark
From: Rob Clark Add a new flag to let userspace provide a deadline as a hint for syncobj and timeline waits. This gives a hint to the driver signaling the backing fences about how soon userspace needs it to compete work, so it can addjust GPU frequency accordingly. An immediate deadline can be

Re: [PATCH v4 5/6] drm: Add fdinfo memory stats

2023-04-21 Thread Rob Clark
On Fri, Apr 21, 2023 at 4:59 AM Tvrtko Ursulin wrote: > > > On 21/04/2023 12:45, Emil Velikov wrote: > > On Fri, 21 Apr 2023 at 12:23, Tvrtko Ursulin > > wrote: > > > >> On 21/04/2023 11:26, Emil Velikov wrote: > >>>

Re: [RFC 2/3] drm/msm: Rework get_comm_cmdline() helper

2023-04-21 Thread Rob Clark
On Fri, Apr 21, 2023 at 2:33 AM Emil Velikov wrote: > > Greeting all, > > Sorry for the delay - Easter Holidays, food coma and all that :-) > > On Tue, 18 Apr 2023 at 15:31, Rob Clark wrote: > > > > On Tue, Apr 18, 2023 at 1:34 AM Daniel Vetter wrote: > > &

Re: [RFC 6/6] drm/i915: Implement fdinfo memory stats printing

2023-04-20 Thread Rob Clark
On Thu, Apr 20, 2023 at 6:11 AM Tvrtko Ursulin wrote: > > > On 19/04/2023 15:38, Rob Clark wrote: > > On Wed, Apr 19, 2023 at 7:06 AM Tvrtko Ursulin > > wrote: > >> > >> > >> On 18/04/2023 17:08, Rob Clark wrote: > >>> On Tue, Apr 18,

<    1   2   3   4   5   6   7   8   9   10   >