Re: [PATCH 3/5] drm/amdgpu: Fix null pointer dereference to aca_handle

2024-05-13 Thread Lazar, Lijo
On 5/14/2024 6:30 AM, Ma, Jun wrote: > Hi Lijo & Kevin, thanks for review, will drop this patch > In the original function below check is there. if (!handle || !info || type >= ACA_ERROR_TYPE_COUNT) return -EINVAL; So moving this to a later stage is still valid.

[PATCH] drm/amdgpu/pm: Drop hard-code value of usTMax

2024-05-13 Thread Ma Jun
Drop hard-code value of nsTmax because we read this value from fantable below. Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c

[PATCH v2] drm/amdgpu: Fix the null pointer dereference to ras_manager

2024-05-13 Thread Ma Jun
Check ras_manager before using it Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 925ec65ac5ed..2bcf5c3b5d70

RE: [PATCH 01/22] drm/amdgpu: fix dereference after null check

2024-05-13 Thread Zhang, Jesse(Jie)
[AMD Official Use Only - AMD Internal Distribution Only] Hi Christian, -Original Message- From: Christian König Sent: Monday, May 13, 2024 7:41 PM To: Zhang, Jesse(Jie) ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Koenig, Christian ; Huang, Tim Subject: Re: [PATCH 01/22]

RE: [PATCH 1/5] drm/amdgpu/pm: Fix the null pointer dereference for smu7

2024-05-13 Thread Wang, Yang(Kevin)
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Yang Wang Best Regards, Kevin -Original Message- From: Ma, Jun Sent: Monday, May 13, 2024 4:56 PM To: amd-gfx@lists.freedesktop.org Cc: Feng, Kenneth ; Deucher, Alexander ; Wang, Yang(Kevin) ; Koenig, Christian ;

RE: [PATCH 5/5] drm/amdgpu: Remove dead code in amdgpu_ras_add_mca_err_addr

2024-05-13 Thread Chai, Thomas
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: YiPeng Chai - Best Regards, Thomas -Original Message- From: amd-gfx On Behalf Of Ma Jun Sent: Monday, May 13, 2024 4:56 PM To: amd-gfx@lists.freedesktop.org Cc: Feng, Kenneth ; Deucher, Alexander ;

Re: [PATCH 3/5] drm/amdgpu: Fix null pointer dereference to aca_handle

2024-05-13 Thread Ma, Jun
Hi Lijo & Kevin, thanks for review, will drop this patch Regards, Ma Jun On 5/14/2024 7:13 AM, Wang, Yang(Kevin) wrote: > [AMD Official Use Only - AMD Internal Distribution Only] > > -Original Message- > From: Ma, Jun > Sent: Monday, May 13, 2024 4:56 PM > To:

[PATCH] drm/amdgpu: fix compiler 'side-effect' check issue for RAS_EVENT_LOG()

2024-05-13 Thread Yang Wang
create a new helper function to avoid compiler 'side-effect' check about RAS_EVENT_LOG() macro. Signed-off-by: Yang Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 18 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 13 ++--- 2 files changed, 24 insertions(+), 7

Re: [PATCH] drm/kfd: Correct pined buffer handling at kfd restore and validate process

2024-05-13 Thread Felix Kuehling
On 2024-05-13 11:18, Xiaogang.Chen wrote: > From: Xiaogang Chen > > This reverts 8a774fe912ff09e39c2d3a3589c729330113f388 "drm/amdgpu: avoid > restore > process run into dead loop" since buffer got pined is not related whether it Spelling: pined -> pinned Same in the commit headline. >

RE: [PATCH 3/5] drm/amdgpu: Fix null pointer dereference to aca_handle

2024-05-13 Thread Wang, Yang(Kevin)
[AMD Official Use Only - AMD Internal Distribution Only] -Original Message- From: Ma, Jun Sent: Monday, May 13, 2024 4:56 PM To: amd-gfx@lists.freedesktop.org Cc: Feng, Kenneth ; Deucher, Alexander ; Wang, Yang(Kevin) ; Koenig, Christian ; Ma, Jun Subject: [PATCH 3/5] drm/amdgpu: Fix

RE: [PATCH v3 10/10] Documentation/amdgpu: Add PM policy documentation

2024-05-13 Thread Deucher, Alexander
[Public] > -Original Message- > From: Lazar, Lijo > Sent: Monday, May 13, 2024 5:21 AM > To: amd-gfx@lists.freedesktop.org > Cc: Zhang, Hawking ; Deucher, Alexander > ; Kamal, Asad ; Ma, > Le > Subject: [PATCH v3 10/10] Documentation/amdgpu: Add PM policy > documentation > > Add

[PATCH 2/2] drm/amdgpu: apply state adjust rules to some additional HAINAN vairants

2024-05-13 Thread Alex Deucher
They need a similar workaround. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1839 Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c

[PATCH 1/2] drm/radeon: apply state adjust rules to some additional HAINAN vairants

2024-05-13 Thread Alex Deucher
They need a similar workaround. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1839 Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/si_dpm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c

Re: [PATCH] drm/amdgpu/pm: update documentation on memory clock

2024-05-13 Thread Alex Deucher
Ping? On Thu, May 2, 2024 at 5:07 PM Alex Deucher wrote: > > Update documentation for RDNA3 dGPUs. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/pm/amdgpu_pm.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c >

[PATCH 3/3] drm/amdgpu/gfx11: enable gfx pipe1 hardware support

2024-05-13 Thread Alex Deucher
Enable gfx pipe1 hardware support. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c index d750ab86e4b27..96f441917b719

[PATCH 1/3] drm/amdgpu/gfx11: select HDP ref/mask according to gfx ring pipe

2024-05-13 Thread Alex Deucher
Use correct ref/mask for differnent gfx ring pipe. Ported from ZhenGuo's patch for gfx10. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c

[PATCH 2/3] drm/amdgpu/gfx11: handle priority setup for gfx pipe1

2024-05-13 Thread Alex Deucher
Set up pipe1 as a high priority queue. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 36 ++ 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c index

Re: [PATCH] drm/amdgpu/soc24: use common nbio callback to set remap offset

2024-05-13 Thread Alex Deucher
Ping. On Wed, May 8, 2024 at 3:42 PM Alex Deucher wrote: > > This fixes HDP flushes on systems with non-4K pages. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/soc24.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git

Re: [PATCH v2] drm/amd/display: fix documentation warnings for mpc.h

2024-05-13 Thread Alex Deucher
On Sat, May 11, 2024 at 12:22 AM Stephen Rothwell wrote: > > Hi Marcelo, > > On Sat, 11 May 2024 13:37:17 +1000 Stephen Rothwell > wrote: > > > > Thanks for doing this. > > > > I haven't tested it, but just a couple of little things: > > > > On Fri, 10 May 2024 21:02:02 -0300 Marcelo Mendes

Re: [PATCH v2] drm/amdgpu: Add Ring Hang Events

2024-05-13 Thread Christian König
Am 09.05.24 um 22:41 schrieb Ori Messinger: This patch adds 'ring hang' events to the driver. This is done by adding a 'reset_ring_hang' bool variable to the struct 'amdgpu_reset_context' in the amdgpu_reset.h file. The purpose for this 'reset_ring_hang' variable is whenever a GPU reset is

Re: [PATCH] drm/amdgpu/vcn: remove irq disabling in vcn 5 suspend

2024-05-13 Thread David Wu
On 2024-05-13 13:43, Christian König wrote: Am 13.05.24 um 19:41 schrieb David Wu: On 2024-05-13 13:11, Christian König wrote: Am 09.05.24 um 20:40 schrieb David (Ming Qiang) Wu: We do not directly enable/disable VCN IRQ in vcn 5.0.0. And we do not handle the IRQ state as well. So the

Re: [PATCH] drm/amdgpu/vcn: remove irq disabling in vcn 5 suspend

2024-05-13 Thread Christian König
Am 13.05.24 um 19:41 schrieb David Wu: On 2024-05-13 13:11, Christian König wrote: Am 09.05.24 um 20:40 schrieb David (Ming Qiang) Wu: We do not directly enable/disable VCN IRQ in vcn 5.0.0. And we do not handle the IRQ state as well. So the calls to disable IRQ and set state are removed.

Re: [PATCH] drm/amdgpu/vcn: remove irq disabling in vcn 5 suspend

2024-05-13 Thread David Wu
On 2024-05-13 13:11, Christian König wrote: Am 09.05.24 um 20:40 schrieb David (Ming Qiang) Wu: We do not directly enable/disable VCN IRQ in vcn 5.0.0. And we do not handle the IRQ state as well. So the calls to disable IRQ and set state are removed. This effectively gets rid of the

Re: [PATCH] drm/amdgpu/vcn: remove irq disabling in vcn 5 suspend

2024-05-13 Thread Christian König
Am 09.05.24 um 20:40 schrieb David (Ming Qiang) Wu: We do not directly enable/disable VCN IRQ in vcn 5.0.0. And we do not handle the IRQ state as well. So the calls to disable IRQ and set state are removed. This effectively gets rid of the warining of "WARN_ON(!amdgpu_irq_enabled(adev,

Re: [RESEND 4/6] drm/amdgpu: remove amdgpu_connector_edid() and stop using edid_blob_ptr

2024-05-13 Thread Robert Foss
On Fri, May 10, 2024 at 5:09 PM Jani Nikula wrote: > > amdgpu_connector_edid() copies the EDID from edid_blob_ptr as a side > effect if amdgpu_connector->edid isn't initialized. However, everywhere > that the returned EDID is used, the EDID should have been set > beforehands. > > Only the drm

Re: [RESEND 3/6] drm/radeon: remove radeon_connector_edid() and stop using edid_blob_ptr

2024-05-13 Thread Robert Foss
On Fri, May 10, 2024 at 5:08 PM Jani Nikula wrote: > > radeon_connector_edid() copies the EDID from edid_blob_ptr as a side > effect if radeon_connector->edid isn't initialized. However, everywhere > that the returned EDID is used, the EDID should have been set > beforehands. > > Only the drm

Re: [PATCH] drm/amdgpu: fix getting vram info for gfx12

2024-05-13 Thread Alex Deucher
On Mon, May 13, 2024 at 11:32 AM Min, Frank wrote: > > [AMD Official Use Only - AMD Internal Distribution Only] > > From: Frank Min > > gfx12 query video mem channel/type/width from umc_info of atom list, so fix > it accordingly. > > Signed-off-by: Frank Min Acked-by: Alex Deucher > --- >

Re: [RESEND 2/6] drm/radeon: convert to using is_hdmi and has_audio from display info

2024-05-13 Thread Robert Foss
On Fri, May 10, 2024 at 5:08 PM Jani Nikula wrote: > > Prefer the parsed results for is_hdmi and has_audio in display info over > calling drm_detect_hdmi_monitor() and drm_detect_monitor_audio(), > respectively. > > Cc: Alex Deucher > Cc: Christian König > Cc: Pan, Xinhui > Cc:

Re: [PATCH v10 6/6] drm/amdgpu: Enable userq fence interrupt support

2024-05-13 Thread Christian König
Am 10.05.24 um 10:50 schrieb Arunpravin Paneer Selvam: Add support to handle the userqueue protected fence signal hardware interrupt. Create a xarray which maps the doorbell index to the fence driver address. This would help to retrieve the fence driver information when an userq fence interrupt

Re: [PATCH v10 5/6] drm/amdgpu: Remove the MES self test

2024-05-13 Thread Christian König
Am 10.05.24 um 10:50 schrieb Arunpravin Paneer Selvam: Remove MES self test as this conflicts the userqueue fence interrupts. Please also completely remove the amdgpu_mes_self_test() function and any now unused code. Regards, Christian. Signed-off-by: Arunpravin Paneer Selvam ---

Re: [PATCH v3] drm/amdgpu: Add Ring Hang Events

2024-05-13 Thread Christian König
Am 13.05.24 um 06:14 schrieb Ori Messinger: This patch adds 'ring hang' events to the driver. This is done by adding a 'reset_ring_hang' bool variable to the struct 'amdgpu_reset_context' in the amdgpu_reset.h file. The purpose for this 'reset_ring_hang' variable is whenever a GPU reset is

Re: [PATCH v10 4/6] drm/amdgpu: Implement userqueue signal/wait IOCTL

2024-05-13 Thread Christian König
Am 10.05.24 um 10:50 schrieb Arunpravin Paneer Selvam: This patch introduces new IOCTL for userqueue secure semaphore. The signal IOCTL called from userspace application creates a drm syncobj and array of bo GEM handles and passed in as parameter to the driver to install the fence into it. The

Re: [PATCH v2 2/2] drm/tests: Add a unit test for range bias allocation

2024-05-13 Thread Matthew Auld
On 13/05/2024 16:11, Paneer Selvam, Arunpravin wrote: Hi Matthew, On 5/13/2024 1:49 PM, Matthew Auld wrote: On 12/05/2024 08:59, Arunpravin Paneer Selvam wrote: Allocate cleared blocks in the bias range when the DRM buddy's clear avail is zero. This will validate the bias range allocation in

[PATCH] drm/kfd: Correct pined buffer handling at kfd restore and validate process

2024-05-13 Thread Xiaogang . Chen
From: Xiaogang Chen This reverts 8a774fe912ff09e39c2d3a3589c729330113f388 "drm/amdgpu: avoid restore process run into dead loop" since buffer got pined is not related whether it needs mapping. And skip buffer validation at kfd driver if the buffer has been pinned. Signed-off-by: Xiaogang Chen

Re: [PATCH v2 2/2] drm/tests: Add a unit test for range bias allocation

2024-05-13 Thread Paneer Selvam, Arunpravin
Hi Matthew, On 5/13/2024 1:49 PM, Matthew Auld wrote: On 12/05/2024 08:59, Arunpravin Paneer Selvam wrote: Allocate cleared blocks in the bias range when the DRM buddy's clear avail is zero. This will validate the bias range allocation in scenarios like system boot when no cleared blocks are

[PATCH] drm/amdgpu: fix getting vram info for gfx12

2024-05-13 Thread Min, Frank
[AMD Official Use Only - AMD Internal Distribution Only] From: Frank Min gfx12 query video mem channel/type/width from umc_info of atom list, so fix it accordingly. Signed-off-by: Frank Min --- .../gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 263 ++ 1 file changed, 148

Re: [RFC 1/5] drm/amdgpu: Fix migration rate limiting accounting

2024-05-13 Thread Friedrich Vock
On 09.05.24 11:19, Tvrtko Ursulin wrote: On 08/05/2024 20:08, Friedrich Vock wrote: On 08.05.24 20:09, Tvrtko Ursulin wrote: From: Tvrtko Ursulin The logic assumed any migration attempt worked and therefore would over- account the amount of data migrated during buffer re-validation. As a

Re: [PATCH] drm/amdgpu: add initial value for gfx12 AGP aperture

2024-05-13 Thread Alex Deucher
Reviewed-by: Alex Deucher On Mon, May 13, 2024 at 5:37 AM Gao, Likun wrote: > > [AMD Official Use Only - AMD Internal Distribution Only] > > This patch was > Reviewed-by: Likun Gao . > > Regards, > Likun > > -Original Message- > From: Min, Frank > Sent: Monday, May 13, 2024 4:56 PM >

[PATCH v1 0/4] Add CP and GFX Queue register in ip Dump for

2024-05-13 Thread Sunil Khatri
*** BLURB HERE *** Sunil Khatri (4): drm/amdgpu: update the ip_dump to ipdump_core drm/amdgpu: Add support to dump gfx10 cp registers drm/amdgpu: add support to dump gfx10 queue registers drm/amdgpu: add prints while ip registr dump drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +

[PATCH v2 3/4] drm/amdgpu: add support to dump gfx10 queue registers

2024-05-13 Thread Sunil Khatri
Add gfx queue register for all instances in ip dump 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 | 86 + 2 files changed, 87 insertions(+) diff --git

[PATCH v2 4/4] drm/amdgpu: add prints while ip registr dump

2024-05-13 Thread Sunil Khatri
add prints before and after during ip registers 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

[PATCH v2 2/4] drm/amdgpu: Add support to dump gfx10 cp registers

2024-05-13 Thread Sunil Khatri
add support to dump registers of all instances of cp registers in gfx10 Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 117 +++- 2 files changed, 114 insertions(+), 4 deletions(-) diff --git

[PATCH v2 1/4] drm/amdgpu: update the ip_dump to ipdump_core

2024-05-13 Thread Sunil Khatri
Update the memory pointer from ip_dump to ipdump_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

Re: [RESEND 0/6] drm, nouveau/radeon/amdpgu: edid_blob_ptr cleanups

2024-05-13 Thread Alex Deucher
On Mon, May 13, 2024 at 8:20 AM Jani Nikula wrote: > > On Fri, 10 May 2024, Alex Deucher wrote: > > On Fri, May 10, 2024 at 11:17 AM Jani Nikula wrote: > >> > >> I've sent this some moths ago, let's try again... > >> > >> BR, > >> Jani. > >> > >> Jani Nikula (6): > >> drm/nouveau: convert to

Re: [RFC 0/5] Discussion around eviction improvements

2024-05-13 Thread Tvrtko Ursulin
On 09/05/2024 13:40, Tvrtko Ursulin wrote: On 08/05/2024 19:09, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Last few days I was looking at the situation with VRAM over subscription, what happens versus what perhaps should happen. Browsing through the driver and running some simple

Re: [RFC PATCH 00/18] TTM interface for managing VRAM oversubscription

2024-05-13 Thread Friedrich Vock
Hi, On 02.05.24 16:23, Maarten Lankhorst wrote: Hey, [snip] For Xe, I've been loking at using cgroups. A small prototype is available at https://cgit.freedesktop.org/~mlankhorst/linux/log/?h=dumpcg To stimulate discussion, I've added amdgpu support as well. This should make it possible to

Re: [RESEND 0/6] drm, nouveau/radeon/amdpgu: edid_blob_ptr cleanups

2024-05-13 Thread Jani Nikula
On Fri, 10 May 2024, Alex Deucher wrote: > On Fri, May 10, 2024 at 11:17 AM Jani Nikula wrote: >> >> I've sent this some moths ago, let's try again... >> >> BR, >> Jani. >> >> Jani Nikula (6): >> drm/nouveau: convert to using is_hdmi and has_audio from display info >> drm/radeon: convert to

Re: [RESEND 1/6] drm/nouveau: convert to using is_hdmi and has_audio from display info

2024-05-13 Thread Jani Nikula
On Fri, 10 May 2024, Lyude Paul wrote: > Reviewed-by: Lyude Paul Thanks, how do you want to handle merging this? BR, Jani. > > On Fri, 2024-05-10 at 18:08 +0300, Jani Nikula wrote: >> Prefer the parsed results for is_hdmi and has_audio in display info >> over >> calling

Re: [PATCH 4/5] drm/amdgpu: Fix null pointer dereference to bo

2024-05-13 Thread Christian König
Am 13.05.24 um 10:56 schrieb Ma Jun: Check bo before using it Signed-off-by: Ma Jun Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c

RE: [PATCH] drm/amd/amdgpu: update jpeg 5 capability

2024-05-13 Thread Liu, Leo
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Leo Liu > -Original Message- > From: Wu, David > Sent: Thursday, May 9, 2024 5:37 PM > To: amd-gfx@lists.freedesktop.org; Deucher, Alexander > > Cc: Koenig, Christian ; Liu, Leo > ; Jiang, Sonny > Subject: [PATCH]

Re: [PATCH 02/20] drm/amdgpu: don't trample pdev drvdata

2024-05-13 Thread Christian König
Am 10.05.24 um 20:12 schrieb Matthew Auld: The driver release callback is called when a particular drm_device goes away, just like with drmm, so here we should never nuke the pdev drvdata pointer, since that could already be pointing to a new drvdata. For example something hotunplugs the device,

Re: [PATCH 01/22] drm/amdgpu: fix dereference after null check

2024-05-13 Thread Christian König
Am 10.05.24 um 04:50 schrieb Jesse Zhang: check the pointer hive before use. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Re: [PATCH 05/22] drm/amd/pm: check specific index for aldebaran

2024-05-13 Thread Lazar, Lijo
On 5/10/2024 8:20 AM, Jesse Zhang wrote: > Check for specific indexes that may be invalid values. > > Signed-off-by: Jesse Zhang > --- > drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git

Re: [PATCH] drm/amd/display: Don't register panel_power_savings on OLED panels

2024-05-13 Thread Harry Wentland
On 2024-05-09 13:05, Mario Limonciello wrote: OLED panels don't support the ABM, they shouldn't offer the panel_power_savings attribute to the user. Check whether aux BL control support was enabled to decide whether to offer it. Reported-by: Gergo Koteles Closes:

Re: [PATCH 09/22] drm/amd/pm: check specific index for smu13

2024-05-13 Thread Lazar, Lijo
On 5/13/2024 4:27 PM, Lazar, Lijo wrote: > > > On 5/10/2024 8:20 AM, Jesse Zhang wrote: >> Check for specific indexes that may be invalid values. >> >> Signed-off-by: Jesse Zhang >> --- >> drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >>

Re: [PATCH 09/22] drm/amd/pm: check specific index for smu13

2024-05-13 Thread Lazar, Lijo
On 5/10/2024 8:20 AM, Jesse Zhang wrote: > Check for specific indexes that may be invalid values. > > Signed-off-by: Jesse Zhang > --- > drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git

Re: [PATCH 3/5] drm/amdgpu: Fix null pointer dereference to aca_handle

2024-05-13 Thread Lazar, Lijo
On 5/13/2024 2:26 PM, Ma Jun wrote: > Check handle pointer before using it > > Signed-off-by: Ma Jun > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c >

Re: [PATCH 2/5] drm/amdgpu: Fix the null pointer dereference to ras_manager

2024-05-13 Thread Lazar, Lijo
On 5/13/2024 2:26 PM, Ma Jun wrote: > Check ras_manager before using it > > Signed-off-by: Ma Jun > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c >

[PATCH v3 10/10] Documentation/amdgpu: Add PM policy documentation

2024-05-13 Thread Lijo Lazar
Add documentation about the newly added pm_policy node in sysfs. Signed-off-by: Lijo Lazar --- Documentation/gpu/amdgpu/thermal.rst | 6 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 48 2 files changed, 54 insertions(+) diff --git

[PATCH v3 06/10] drm/amd/pm: Add xgmi plpd to aldebaran pm_policy

2024-05-13 Thread Lijo Lazar
On aldebaran, allow changing xgmi plpd policy through pm_policy sysfs interface. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- .../drm/amd/pm/swsmu/smu13/aldebaran_ppt.c| 35 +++ 1 file changed, 35 insertions(+) diff --git

[PATCH v3 09/10] drm/amd/pm: Remove unused interface to set plpd

2024-05-13 Thread Lijo Lazar
Remove unused callback to set PLPD policy and its implementation from arcturus, aldebaran and SMUv13.0.6 SOCs. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 6 --- .../gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 22 ---

[PATCH v3 08/10] drm/amd/pm: Remove legacy interface for xgmi plpd

2024-05-13 Thread Lijo Lazar
Replace the legacy interface with amdgpu_dpm_set_pm_policy to set XGMI PLPD mode. Also, xgmi_plpd sysfs node is not used by any client. Remove that as well. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- v2: No change v3: Rebase to remove device_attr_id__xgmi_plpd_policy

[PATCH v3 05/10] drm/amd/pm: Add xgmi plpd to SMU v13.0.6 pm_policy

2024-05-13 Thread Lijo Lazar
On SOCs with SMU v13.0.6, allow changing xgmi plpd policy through pm_policy sysfs interface. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 19 +-- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 51 +--

[PATCH v3 04/10] drm/amd/pm: Add xgmi plpd policy to pm_policy

2024-05-13 Thread Lijo Lazar
Add support to set XGMI PLPD policy levels through pm_policy sysfs node. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 + drivers/gpu/drm/amd/pm/amdgpu_pm.c | 3 +++ 2 files changed, 4 insertions(+) diff --git

[PATCH v3 07/10] drm/amd/pm: Add xgmi plpd to arcturus pm_policy

2024-05-13 Thread Lijo Lazar
On arcturus, allow changing xgmi plpd policy through pm_policy sysfs interface. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 7 ++-- .../gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 42 +++ 2 files changed, 46

[PATCH v3 03/10] drm/amd/pm: Add support to select pstate policy

2024-05-13 Thread Lijo Lazar
Add support to select pstate policy in SOCs with SMUv13.0.6 Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c| 2 + .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 71 +++ drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c| 30

[PATCH v3 02/10] drm/amd/pm: Update PMFW messages for SMUv13.0.6

2024-05-13 Thread Lijo Lazar
Add PMF message to select a Pstate policy in SOCs with SMU v13.0.6. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_ppsmc.h | 3 ++- drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 3 ++- 2 files changed, 4

[PATCH v3 01/10] drm/amd/pm: Add support for DPM policies

2024-05-13 Thread Lijo Lazar
Add support to set/get information about different DPM policies. The support is only available on SOCs which use swsmu architecture. A DPM policy type may be defined with different levels. For example, a policy may be defined to select Pstate preference and then later a pstate preference may be

[PATCH v3 00/10] Add PM policy interfaces

2024-05-13 Thread Lijo Lazar
This series adds APIs to get the supported PM policies and also set them. A PM policy type is a predefined policy type supported by an SOC and each policy may define two or more levels to choose from. A user can select the appropriate level through amdgpu_dpm_set_pm_policy() or through sysfs node

RE: [PATCH] drm/amdgpu: add initial value for gfx12 AGP aperture

2024-05-13 Thread Gao, Likun
[AMD Official Use Only - AMD Internal Distribution Only] This patch was Reviewed-by: Likun Gao . Regards, Likun -Original Message- From: Min, Frank Sent: Monday, May 13, 2024 4:56 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Koenig, Christian ; Zhang, Hawking ; Gao,

[PATCH 4/5] drm/amdgpu: Fix null pointer dereference to bo

2024-05-13 Thread Ma Jun
Check bo before using it Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c index 2b7b67916c1d..8269fd6828bf

[PATCH 5/5] drm/amdgpu: Remove dead code in amdgpu_ras_add_mca_err_addr

2024-05-13 Thread Ma Jun
Remove dead code in amdgpu_ras_add_mca_err_addr Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 6da02a209890..0cf67923c0fc

[PATCH 3/5] drm/amdgpu: Fix null pointer dereference to aca_handle

2024-05-13 Thread Ma Jun
Check handle pointer before using it Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c index 28febf33fb1b..e969a7d77b4d

[PATCH 2/5] drm/amdgpu: Fix the null pointer dereference to ras_manager

2024-05-13 Thread Ma Jun
Check ras_manager before using it Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 1dd13ed3b7b5..6da02a209890

[PATCH 1/5] drm/amdgpu/pm: Fix the null pointer dereference for smu7

2024-05-13 Thread Ma Jun
optimize the code to avoid pass a null pointer (hwmgr->backend) to function smu7_update_edc_leakage_table. Signed-off-by: Ma Jun --- .../drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 50 +-- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git

[PATCH] drm/amdgpu: add initial value for gfx12 AGP aperture

2024-05-13 Thread Min, Frank
[AMD Official Use Only - AMD Internal Distribution Only] From: Frank Min add initial value for gfx12 AGP aperture Signed-off-by: Frank Min --- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c

Re: [PATCH v2 2/2] drm/tests: Add a unit test for range bias allocation

2024-05-13 Thread Matthew Auld
On 12/05/2024 08:59, Arunpravin Paneer Selvam wrote: Allocate cleared blocks in the bias range when the DRM buddy's clear avail is zero. This will validate the bias range allocation in scenarios like system boot when no cleared blocks are available and exercise the fallback path too. The

RE: [PATCH 18/22 V3] drm/amd/pm: check negtive return for table entries

2024-05-13 Thread Huang, Tim
[AMD Official Use Only - AMD Internal Distribution Only] This patch is, Reviewed-by: Tim Huang > -Original Message- > From: Jesse Zhang > Sent: Monday, May 13, 2024 4:06 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Koenig, Christian > ; Huang, Tim ; Zhang, >

[PATCH 18/22 V3] drm/amd/pm: check negtive return for table entries

2024-05-13 Thread Jesse Zhang
Function hwmgr->hwmgr_func->get_num_of_pp_table_entries(hwmgr) returns a negative number Signed-off-by: Jesse Zhang Suggested-by: Tim Huang --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git

RE: [PATCH 18/22] drm/amd/pm: check negtive return for table entries

2024-05-13 Thread Zhang, Jesse(Jie)
[AMD Official Use Only - AMD Internal Distribution Only] Hi Tim, -Original Message- From: Huang, Tim Sent: Monday, May 13, 2024 3:40 PM To: Zhang, Jesse(Jie) ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Koenig, Christian ; Zhang, Jesse(Jie) ; Zhang, Jesse(Jie) Subject:

[RESEND 2/6] drm/radeon: convert to using is_hdmi and has_audio from display info

2024-05-13 Thread Jani Nikula
Prefer the parsed results for is_hdmi and has_audio in display info over calling drm_detect_hdmi_monitor() and drm_detect_monitor_audio(), respectively. Cc: Alex Deucher Cc: Christian König Cc: Pan, Xinhui Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Jani Nikula ---

[RESEND 5/6] drm/edid: add a helper for EDID sysfs property show

2024-05-13 Thread Jani Nikula
Add a helper to get the EDID property for sysfs property show. This hides all the edid_blob_ptr usage within drm_edid.c. Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_crtc_internal.h | 2 ++ drivers/gpu/drm/drm_edid.c | 33 +

Re: [PATCH v2] drm/amd/display: fix documentation warnings for mpc.h

2024-05-13 Thread Stephen Rothwell
Hi Marcelo, On Sat, 11 May 2024 13:37:17 +1000 Stephen Rothwell wrote: > > Thanks for doing this. > > I haven't tested it, but just a couple of little things: > > On Fri, 10 May 2024 21:02:02 -0300 Marcelo Mendes Spessoto Junior > wrote: > > > > Fix most of the display documentation

Re: [PATCH v2] drm/amd/display: fix documentation warnings for mpc.h

2024-05-13 Thread Stephen Rothwell
Hi Marcelo, Thanks for doing this. I haven't tested it, but just a couple of little things: On Fri, 10 May 2024 21:02:02 -0300 Marcelo Mendes Spessoto Junior wrote: > > Fix most of the display documentation compile warnings by > documenting struct mpc_funcs functions in dc/inc/hw/mpc.h file.

[PATCH] drm/amd/display: clean up some inconsistent indenting

2024-05-13 Thread Jiapeng Chong
No functional modification involved. drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn401/dcn401_resource.c:792 dcn401_i2c_hw_create() warn: inconsistent indenting. drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn401/dcn401_resource.c:894 dcn401_hubp_create() warn: inconsistent

[RESEND 0/6] drm, nouveau/radeon/amdpgu: edid_blob_ptr cleanups

2024-05-13 Thread Jani Nikula
I've sent this some moths ago, let's try again... BR, Jani. Jani Nikula (6): drm/nouveau: convert to using is_hdmi and has_audio from display info drm/radeon: convert to using is_hdmi and has_audio from display info drm/radeon: remove radeon_connector_edid() and stop using

[RESEND 6/6] drm/connector: update edid_blob_ptr documentation

2024-05-13 Thread Jani Nikula
Accessing the EDID via edid_blob_ptr causes chicken-and-egg problems. Keep edid_blob_ptr as the userspace interface that should be accessed via dedicated functions. Signed-off-by: Jani Nikula --- include/drm/drm_connector.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[RESEND 1/6] drm/nouveau: convert to using is_hdmi and has_audio from display info

2024-05-13 Thread Jani Nikula
Prefer the parsed results for is_hdmi and has_audio in display info over calling drm_detect_hdmi_monitor() and drm_detect_monitor_audio(), respectively. Conveniently, this also removes the need to use edid_blob_ptr. v2: Reverse a backwards if condition (Ilia) Cc: Karol Herbst Cc: Lyude Paul

[RESEND 3/6] drm/radeon: remove radeon_connector_edid() and stop using edid_blob_ptr

2024-05-13 Thread Jani Nikula
radeon_connector_edid() copies the EDID from edid_blob_ptr as a side effect if radeon_connector->edid isn't initialized. However, everywhere that the returned EDID is used, the EDID should have been set beforehands. Only the drm EDID code should look at the EDID property, anyway, so stop using

[RESEND 4/6] drm/amdgpu: remove amdgpu_connector_edid() and stop using edid_blob_ptr

2024-05-13 Thread Jani Nikula
amdgpu_connector_edid() copies the EDID from edid_blob_ptr as a side effect if amdgpu_connector->edid isn't initialized. However, everywhere that the returned EDID is used, the EDID should have been set beforehands. Only the drm EDID code should look at the EDID property, anyway, so stop using

RE: [PATCH 18/22] drm/amd/pm: check negtive return for table entries

2024-05-13 Thread Huang, Tim
[AMD Official Use Only - AMD Internal Distribution Only] Hi Jesse, > -Original Message- > From: Jesse Zhang > Sent: Monday, May 13, 2024 3:34 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Koenig, Christian > ; Huang, Tim ; Zhang, > Jesse(Jie) ; Zhang, Jesse(Jie) > >

RE: [PATCH 2/22 V2] drm/amdgpu: the warning dereferencing obj for nbio_v7_4

2024-05-13 Thread Huang, Tim
[AMD Official Use Only - AMD Internal Distribution Only] This patch is, Reviewed-by: Tim Huang > -Original Message- > From: Jesse Zhang > Sent: Monday, May 13, 2024 3:33 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Koenig, Christian > ; Huang, Tim ; Zhang, >

[PATCH 18/22] drm/amd/pm: check negtive return for table entries

2024-05-13 Thread Jesse Zhang
Function hwmgr->hwmgr_func->get_num_of_pp_table_entries(hwmgr) returns a negative number Signed-off-by: Jesse Zhang Suggested-by: Tim Huang --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git

[PATCH 2/22 V2] drm/amdgpu: the warning dereferencing obj for nbio_v7_4

2024-05-13 Thread Jesse Zhang
if ras_manager obj null, don't print NBIO err data Signed-off-by: Jesse Zhang Suggested-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c b/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c

Re: [RFC 0/5] Discussion around eviction improvements

2024-05-13 Thread Christian König
Just FYI, I've been on sick leave for a while and now trying to catch up. It will probably be at least week until I can look into this again. Sorry, Christian. Am 08.05.24 um 20:09 schrieb Tvrtko Ursulin: From: Tvrtko Ursulin Last few days I was looking at the situation with VRAM over

RE: [PATCH 02/22] drm/amdgpu: the warning dereferencing obj for nbio_v7_4

2024-05-13 Thread Zhang, Jesse(Jie)
[AMD Official Use Only - AMD Internal Distribution Only] Hi Tim -Original Message- From: Huang, Tim Sent: Monday, May 13, 2024 12:23 PM To: Zhang, Jesse(Jie) ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Koenig, Christian Subject: RE: [PATCH 02/22] drm/amdgpu: the warning

Re: [PATCH v3] drm/amdgpu: Add Ring Hang Events

2024-05-13 Thread Lazar, Lijo
On 5/13/2024 9:44 AM, Ori Messinger wrote: > This patch adds 'ring hang' events to the driver. > This is done by adding a 'reset_ring_hang' bool variable to the > struct 'amdgpu_reset_context' in the amdgpu_reset.h file. > The purpose for this 'reset_ring_hang' variable is whenever a GPU >