[PATCH] drm/amdgpu: fix dereference null return value for the function amdgpu_vm_pt_parent

2024-05-22 Thread Jesse Zhang
The pointer parent may be NULLed by the function amdgpu_vm_pt_parent. To make the code more robust, check the pointer parent. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdg

Re: [PATCH v2 1/6] drm/ci: uprev mesa version

2024-05-22 Thread Vignesh Raman
Hi Dmitry, On 20/05/24 16:13, Dmitry Baryshkov wrote: On Fri, May 17, 2024 at 02:54:57PM +0530, Vignesh Raman wrote: zlib.net is not allowing tarball download anymore and results in below error in kernel+rootfs_arm32 container build, urllib.error.HTTPError: HTTP Error 403: Forbidden urllib.erro

Re: [PATCH v2 3/6] drm/ci: build virtual GPU driver as module

2024-05-22 Thread Vignesh Raman
Hi Dmitry, On 21/05/24 12:39, Vignesh Raman wrote: Hi Dmitry, On 20/05/24 16:32, Dmitry Baryshkov wrote: On Fri, May 17, 2024 at 02:54:59PM +0530, Vignesh Raman wrote: With latest IGT, the tests tries to load the module and it fails. So build the virtual GPU driver for virtio as module. Why

[PATCH v2 3/4] tests/amdgpu/amd_abm: Add support for panel_power_saving property

2024-05-22 Thread Mario Limonciello
From: Mario Limonciello When the "panel power saving" property is set to forbidden the compositor has indicated that userspace prefers to have color accuracy and fidelity instead of power saving. Verify that the sysfs file behaves as expected in this situation. Signed-off-by: Mario Limonciello

[PATCH v2 2/4] tests/amdgpu/amd_abm: Make set_abm_level return type int

2024-05-22 Thread Mario Limonciello
From: Mario Limonciello In order to bubble of cases of expeted errors on set_abm_level() change the return type to int. Signed-off-by: Mario Limonciello --- tests/amdgpu/amd_abm.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/tests/amdg

[PATCH v2 4/4] tests/amdgpu/amd_psr: Add support for `power saving policy` property

2024-05-22 Thread Mario Limonciello
Verify that the property has disabled PSR --- tests/amdgpu/amd_psr.c | 74 ++ 1 file changed, 74 insertions(+) diff --git a/tests/amdgpu/amd_psr.c b/tests/amdgpu/amd_psr.c index 9da161a09..a9f4a6aa5 100644 --- a/tests/amdgpu/amd_psr.c +++ b/tests/amdgpu/amd

[PATCH v2 1/4] Add support for API for drivers to set power saving policy

2024-05-22 Thread Mario Limonciello
--- lib/igt_kms.c | 26 ++ lib/igt_kms.h | 6 ++ 2 files changed, 32 insertions(+) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index af63d13b1..4ce5e4a95 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -6581,3 +6581,29 @@ int get_num_scalers(int drm_fd, enum pipe pip

[PATCH v2 0/4] Add support for testing power saving policy DRM property

2024-05-22 Thread Mario Limonciello
During the Display Next hackfest 2024 one of the topics discussed was the need for compositor to be able to relay intention to drivers that color fidelity or low latency is preferred over power savings. To accomplish this a new optional DRM property is being introduced called "power saving policy"

[PATCH v2 0/2] Add support for 'power saving policy' property

2024-05-22 Thread Mario Limonciello
During the Display Next hackfest 2024 one of the topics discussed was the need for compositor to be able to relay intention to drivers that color fidelity is preferred over power savings. To accomplish this a new optional DRM property is being introduced called "power saving policy". This propert

[PATCH v2 2/2] drm/amd: Add power_saving_policy drm property to eDP connectors

2024-05-22 Thread Mario Limonciello
When the `power_saving_policy` property is set to bit mask "Require color accuracy" ABM should be disabled immediately and any requests by sysfs to update will return an -EBUSY error. When the `power_saving_policy` property is set to bit mask "Require low latency" PSR should be disabled. When the

[PATCH v2 1/2] drm: Introduce 'power saving policy' drm property

2024-05-22 Thread Mario Limonciello
The `power saving policy` DRM property is an optional property that can be added to a connector by a driver. This property is for compositors to indicate intent of policy of whether a driver can use power saving features that may compromise the experience intended by the compositor. Signed-off-by

Re: [PATCH] drm/amd/display: Pass errors from amdgpu_dm_init() up

2024-05-22 Thread Harry Wentland
On 2024-05-19 09:02, Mario Limonciello wrote: > Errors in amdgpu_dm_init() are silently ignored and dm_hw_init() > will succeed. However often these are fatal errors and it would > be better to pass them up. > > Signed-off-by: Mario Limonciello Reviewed-by: Harry Wentland Harry > --- > drive

[PATCH] drm/amdgpu: Make CPX mode auto default in NPS4

2024-05-22 Thread Rajneesh Bhardwaj
On GFXIP9.4.3, make CPX mode as the default compute mode if the node is setup in NPS4 memory partition mode. This change is only applicable for dGPU, for APU, continue to use TPX mode. Cc: Lijo Lazar Signed-off-by: Rajneesh Bhardwaj --- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 2 +- 1 file

[pull] amdgpu, amdkfd drm-fixes-6.10

2024-05-22 Thread Alex Deucher
Hi Dave, Sima, Fixes for 6.10. The following changes since commit 5a5a10d9db77939a22e1d65fc0a4ba6b5d8f4fce: drm/buddy: Fix the warn on's during force merge (2024-05-20 06:42:12 +1000) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git tags/amd-drm-fixes

Re: [PATCH] drm/amdgpu/display: Fix null pointer dereference in dc_stream_program_cursor_position

2024-05-22 Thread Harry Wentland
On 2024-05-22 11:36, Srinivasan Shanmugam wrote: > The fix involves adding a null check for 'stream' at the beginning of > the function. If 'stream' is NULL, the function immediately returns > false. This ensures that 'stream' is not NULL when we dereference it to > access 'ctx' in 'dc = stream-

[PATCH 2/4] drm/amdgpu: use helper in amdgpu_gart_unbind

2024-05-22 Thread Yunxiang Li
When amdgpu_gart_invalidate_tlb helper is introduced this part was left out of the conversion. Avoid the code duplication here. Signed-off-by: Yunxiang Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdg

[PATCH 3/4] drm/amdgpu: remove tlb flush in amdgpu_gtt_mgr_recover

2024-05-22 Thread Yunxiang Li
At this point the gart is not set up, there's no point to invalidate tlb here and it could even be harmful. Signed-off-by: Yunxiang Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c b/drivers/gpu/d

[PATCH 4/4] drm/amdgpu: prevent gpu access during reset recovery

2024-05-22 Thread Yunxiang Li
Random accesses to the GPU while it is not re-initialized can lead to a bad time. So add a rwsem to prevent such accesses. Normal accesses will now take the read lock for shared GPU access, reset takes the write lock for exclusive GPU access. Care need to be taken so that the recovery thread does

[PATCH 1/4] drm/amd/amdgpu: remove unnecessary flush when enable gart

2024-05-22 Thread Yunxiang Li
From: Likun Gao Remove hdp flush for gc v11/12 when enable gart. Remove flush tlb for gc v10/11/12 when enable gart. Signed-off-by: Likun Gao Signed-off-by: Yunxiang Li --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 --- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 3 --- drivers/gpu/drm/amd/amdg

[linux-next:master] BUILD REGRESSION 8314289a8d50a4e05d8ece1ae0445a3b57bb4d3b

2024-05-22 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 8314289a8d50a4e05d8ece1ae0445a3b57bb4d3b Add linux-next specific files for 20240522 Error/Warning: (recently discovered and may have been fixed) m68k-linux-ld: regmap-spi.c:(.text+0x272

[PATCH] drm/amdgpu/display: Fix null pointer dereference in dc_stream_program_cursor_position

2024-05-22 Thread Srinivasan Shanmugam
The fix involves adding a null check for 'stream' at the beginning of the function. If 'stream' is NULL, the function immediately returns false. This ensures that 'stream' is not NULL when we dereference it to access 'ctx' in 'dc = stream->ctx->dc;' the function. Fixes the below: drivers/g

Re: [PATCH 3/3] drm/amdgpu: Update the impelmentation of AMDGPU_PTE_MTYPE_VG10

2024-05-22 Thread Alex Deucher
Series is: Reviewed-by: Alex Deucher On Wed, May 22, 2024 at 1:47 AM Shane Xiao wrote: > > This patch changes the implementation of AMDGPU_PTE_MTYPE_VG10, > clear the bits before setting the new one. > > Suggested-by: Alex Deucher > Signed-off-by: longlyao > Signed-off-by: Shane Xiao > --- >

Re: [PATCH v1 00/10] ipdump support for gfx10 and gfx11

2024-05-22 Thread Alex Deucher
On Wed, May 22, 2024 at 3:30 AM Sunil Khatri wrote: > > With this support for gfx10 and gfx11 ipdump is complete. > Also added dev_info needed fields for devcoredump. A few comments on patch 4. The rest are: Reviewed-by: Alex Deucher > > Sunil Khatri (10): > drm/amdgpu: rename the ip_dump to

Re: [PATCH v1 04/10] drm/amdgpu: add prints while ip register dump

2024-05-22 Thread Alex Deucher
On Wed, May 22, 2024 at 3:30 AM Sunil Khatri wrote: > > add prints before and after ip registers are > dump. It avoids user to think of system being > stuck/hung as register dump takes time after a > gpu hang. > > Signed-off-by: Sunil Khatri > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2

Re: [PATCH v2] drm/amd/display: Add pixel encoding info to debugfs

2024-05-22 Thread Simon Ser
On Wednesday, May 22nd, 2024 at 15:36, Mario Limonciello wrote: > > To be perfectly honest with you, I haven't given that much though. I > > used the 'bpc' and 'colorspace' property in debugfs, since I could not > > find that information anywhere else. And since I also needed to verify > > the p

Re: [PATCH v2] drm/amd/display: Add pixel encoding info to debugfs

2024-05-22 Thread Mario Limonciello
+ Simon On 5/22/2024 05:07, Rino André Johnsen wrote: To be perfectly honest with you, I haven't given that much though. I used the 'bpc' and 'colorspace' property in debugfs, since I could not find that information anywhere else. And since I also needed to verify the pixel encoding being used,

Re: [PATCH v3 2/3] drm/panel/lg-sw43408: select CONFIG_DRM_DISPLAY_DP_HELPER

2024-05-22 Thread Neil Armstrong
On 22/05/2024 08:25, Dmitry Baryshkov wrote: This panel driver uses DSC PPS functions and as such depends on the DRM_DISPLAY_DP_HELPER. Select this symbol to make required functions available to the driver. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/2024042008

Re: [PATCH v3 3/3] drm/panel/lg-sw43408: mark sw43408_backlight_ops as static

2024-05-22 Thread Neil Armstrong
On 22/05/2024 08:25, Dmitry Baryshkov wrote: Fix sparse warning regarding symbol 'sw43408_backlight_ops' not being declared. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202404200739.hbwzvohr-...@intel.com/ Reviewed-by: Neil Armstrong Fixes: 069a6c0e94f9 ("drm:

Re: [PATCH] drm/amd/amdgpu: fix the inst passed to amdgpu_virt_rlcg_reg_rw

2024-05-22 Thread Lazar, Lijo
On 5/22/2024 1:11 PM, Zhao, Victor wrote: > [AMD Official Use Only - AMD Internal Distribution Only] > > Hi Lijo, > > This patch alone is not working. > Since in your approach amdgpu_virt_rlcg_reg_rw is taking logical xcc id, so > all the read/write calls need to be fixed with it. > For examp

Re: Kernel 5.15.150 black screen with AMD Raven/Picasso GPU

2024-05-22 Thread Armin Wolf
Am 20.05.24 um 18:22 schrieb Alex Deucher: On Sat, May 18, 2024 at 8:17 PM Armin Wolf wrote: Am 17.05.24 um 03:30 schrieb Barry Kauler: Armin, Yifan, Prike, I will top-post, so you don't have to scroll down. After identifying the commit that causes black screen with my gpu, I posted the resu

Re: [PATCH v2] drm/amd/display: Add pixel encoding info to debugfs

2024-05-22 Thread Rino André Johnsen
What is already there in debugfs is 'bpc' and 'colorspace', but not the pixel encoding/format. I have searched high and low for that to be able to verify that my monitor and computer are using my preferred combination of all those three values. I do think it should be available as a standard DRM C

Re: [PATCH 0/2] Add support for Panel Power Savings property

2024-05-22 Thread Xaver Hugl
Am Di., 21. Mai 2024 um 19:28 Uhr schrieb Leo Li : > > > > On 2024-05-21 12:21, Mario Limonciello wrote: > > On 5/21/2024 11:14, Xaver Hugl wrote: > >> Am Di., 21. Mai 2024 um 16:00 Uhr schrieb Mario Limonciello > >> : > >>> > >>> On 5/21/2024 08:43, Simon Ser wrote: > This makes sense to me i

Re: [PATCH 0/2] Add support for Panel Power Savings property

2024-05-22 Thread Xaver Hugl
Am Di., 21. Mai 2024 um 16:00 Uhr schrieb Mario Limonciello : > > On 5/21/2024 08:43, Simon Ser wrote: > > This makes sense to me in general. I like the fact that it's simple and > > vendor-neutral. > > > > Do we want to hardcode "panel" in the name? Are we sure that this will > > ever only apply t

Re: [PATCH] drm/mst: Fix NULL pointer dereference at drm_dp_add_payload_part2

2024-05-22 Thread Linux regression tracking (Thorsten Leemhuis)
Hi, Thorsten here, the Linux kernel's regression tracker. Top-posting for once, to make this easily accessible to everyone. Hmm, from here it looks like the patch now that it was reviewed more that a week ago is still not even in -next. Is there a reason? I know, we are in the merge window. But a

RE: [PATCH] drm/amd/amdgpu: fix the inst passed to amdgpu_virt_rlcg_reg_rw

2024-05-22 Thread Zhao, Victor
[AMD Official Use Only - AMD Internal Distribution Only] Hi Lijo, This patch alone is not working. Since in your approach amdgpu_virt_rlcg_reg_rw is taking logical xcc id, so all the read/write calls need to be fixed with it. For example, WREG32_SOC15_OFFSET. There will be bunch of places need t

[PATCH v1 00/10] ipdump support for gfx10 and gfx11

2024-05-22 Thread Sunil Khatri
With this support for gfx10 and gfx11 ipdump is complete. Also added dev_info needed fields for devcoredump. Sunil Khatri (10): drm/amdgpu: rename the ip_dump to ip_dump_core drm/amdgpu: Add cp queues support fro gfx10 in ipdump drm/amdgpu: add gfx queue support of gfx10 in ipdump drm/amdg

[PATCH v1 10/10] drm/amdgpu: add gfx queue support for gfx11 ipdump

2024-05-22 Thread Sunil Khatri
Add support of all the CP GFX queues for gfx11 ipdump to be used by devcoredump. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 92 ++ 1 file changed, 92 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/am

[PATCH v1 01/10] drm/amdgpu: rename the ip_dump to ip_dump_core

2024-05-22 Thread Sunil Khatri
Rename the memory pointer from ip_dump to ip_dump_core to make it specific to core registers and rest other registers to be dumped in their respective memories. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 14 +++--

[PATCH v1 05/10] drm/amdgpu: add more device info to the devcoredump

2024-05-22 Thread Sunil Khatri
Adding more device information: a. PCI info b. VRAM and GTT info c. GDC config Also correct the print layout and section information for in devcoredump. Signed-off-by: Sunil Khatri --- .../gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 21 +-- 1 file changed, 19 insertions(+), 2 de

[PATCH v1 09/10] drm/amdgpu: add cp queue registers for gfx11 ipdump

2024-05-22 Thread Sunil Khatri
Add gfx11 support of CP queue registers for all queues to be used by devcoredump. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 111 - 1 file changed, 109 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/driv

[PATCH v1 04/10] drm/amdgpu: add prints while ip register dump

2024-05-22 Thread Sunil Khatri
add prints before and after ip registers are dump. It avoids user to think of system being stuck/hung as register dump takes time after a gpu hang. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd

[PATCH v1 07/10] drm/amdgpu: add gfx11 registers support in ipdump

2024-05-22 Thread Sunil Khatri
Add general registers of gfx11 in ipdump for devcoredump support. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 107 - 1 file changed, 106 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/a

[PATCH v1 06/10] drm/amdgpu: Add missing offsets in gc_11_0_0_offset.h

2024-05-22 Thread Sunil Khatri
IB1 registers: regCP_IB1_CMD_BUFSZ regCP_IB1_BASE_LO regCP_IB1_BASE_HI regCP_IB1_BUFSZ regCP_MES_DEBUG_INTERRUPT_INSTR_PNTR Above registers are part of the asic but not of the offset file for gc_11_0_0_offset.h and hence adding them. Signed-off-by: Sunil Khatri --- .../gpu/drm/amd/include/asic_

[PATCH v1 08/10] drm/amdgpu: add print support for gfx11 ipdump

2024-05-22 Thread Sunil Khatri
Add support of gfx11 ipdump print so devcoredump could trigger it to dump the captured registers in devcoredump. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH v1 02/10] drm/amdgpu: Add cp queues support fro gfx10 in ipdump

2024-05-22 Thread Sunil Khatri
Add support to dump registers of all instances of cp queue registers of gfx10 to devcoredump. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 116 +++- 2 files changed, 113 insertions(+), 4 deletions(-

[PATCH v1 03/10] drm/amdgpu: add gfx queue support of gfx10 in ipdump

2024-05-22 Thread Sunil Khatri
Add gfx queue register for all instances in devcoredump for gfx10. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 90 + 2 files changed, 91 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/am

RE: [PATCH 1/4 V2] drm/amdgpu: fix invadate operation for umsch

2024-05-22 Thread Yu, Lang
[Public] >-Original Message- >From: Lazar, Lijo >Sent: Wednesday, May 22, 2024 12:57 PM >To: Zhang, Jesse(Jie) ; amd- >g...@lists.freedesktop.org >Cc: Deucher, Alexander ; Koenig, Christian >; Huang, Tim ; Yu, Lang > >Subject: Re: [PATCH 1/4 V2] drm/amdgpu: fix invadate operation for umsc