[PATCH] drm/amdgpu: add mutex to protect ras shared memory

2024-04-28 Thread YiPeng Chai
Add mutex to protect ras shared memory. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c| 121 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c | 2 + 3 files changed, 84 insertions(+), 40 deletions(-

RE: [PATCH v2 3/4] drm/amdgpu: Fix amdgpu_device_reset_sriov retry logic

2024-04-28 Thread Deng, Emily
[AMD Official Use Only - General] Reviewed-by: Emily Deng Emily Deng Best Wishes >-Original Message- >From: Li, Yunxiang (Teddy) >Sent: Saturday, April 27, 2024 2:29 AM >To: amd-gfx@lists.freedesktop.org >Cc: Deucher, Alexander ; Koenig, Christian >; Lazar, Lijo ; Kuehling, >Felix ;

RE: [PATCH v4 2/4] drm/amdgpu: Add reset_context flag for host FLR

2024-04-28 Thread Deng, Emily
[AMD Official Use Only - General] Reviewed-by: Emily Deng Emily Deng Best Wishes >-Original Message- >From: Li, Yunxiang (Teddy) >Sent: Saturday, April 27, 2024 2:27 AM >To: amd-gfx@lists.freedesktop.org >Cc: Deucher, Alexander ; Koenig, Christian >; Lazar, Lijo ; Kuehling, >Felix ;

RE: [PATCH 4/4] drm/amdgpu: Move ras resume into SRIOV function

2024-04-28 Thread Deng, Emily
[AMD Official Use Only - General] Reviewed-by: Emily Deng Emily Deng Best Wishes >-Original Message- >From: Li, Yunxiang (Teddy) >Sent: Friday, April 26, 2024 11:58 AM >To: amd-gfx@lists.freedesktop.org >Cc: Deucher, Alexander ; Koenig, Christian >; Lazar, Lijo ; Kuehling, >Felix ; D

RE: [PATCH] drm/amdgpu: add mutex to protect ras shared memory

2024-04-28 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] -Original Message- From: Chai, Thomas Sent: Sunday, April 28, 2024 3:08 PM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Zhou1, Tao ; Li, Candice ; Wang, Yang(Kevin) ; Yang, Stanley ; Chai, Thomas Subject: [PATCH] drm/amdgpu: add mutex to prot

[PATCH 1/2] drm/amd/pm: fix uninitialized variable warnings for vega10_hwmgr

2024-04-28 Thread Tim Huang
Clear warnings that using uninitialized variable when fails to get the valid value from SMU. Signed-off-by: Tim Huang --- .../drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 46 ++- .../amd/pm/powerplay/smumgr/vega10_smumgr.c | 6 ++- 2 files changed, 39 insertions(+), 13 deletion

[PATCH 2/2] drm/amd/pm: fix uninitialized variable warnings for vangogh_ppt

2024-04-28 Thread Tim Huang
1. Fix a issue that using uninitialized mask to get the ultimate frequency. 2. Check return of smu_cmn_send_smc_msg_with_param to avoid using uninitialized variable residency. Signed-off-by: Tim Huang --- drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 14 ++ 1 file changed, 14 in

RE: [PATCH 1/3] drm/amd/pm: Fix negative array index read warning for pptable->DpmDescriptor

2024-04-28 Thread Huang, Tim
[AMD Official Use Only - General] > -Original Message- > From: Jesse Zhang > Sent: Friday, April 26, 2024 3:28 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Koenig, Christian > ; Huang, Tim ; Zhang, > Jesse(Jie) ; Zhang, Jesse(Jie) > > Subject: [PATCH 1/3] drm/amd/pm:

[PATCH 1/3 V2] drm/amd/pm: Fix negative array index read warning for pptable->DpmDescriptor

2024-04-28 Thread Jesse Zhang
Avoid using the negative values for clk_idex as an index into an array pptable->DpmDescriptor. V2: fix clk_index return check (Tim Huang) Signed-off-by: Jesse Zhang --- .../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 27 ++- 1 file changed, 21 insertions(+), 6 deletions(-) diff

[PATCH 1/2] drm/amdgpu/pm: Fix uninitialized variable agc_btc_response

2024-04-28 Thread Ma Jun
Assign an default value to agc_btc_response in failed case Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/pm/

[PATCH 2/2] drm/amdgpu/pm: Fix uninitialized variable warning

2024-04-28 Thread Ma Jun
Check return value of smum_send_msg_to_smc to fix uninitialized variable varning Signed-off-by: Ma Jun --- .../drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 21 ++- .../drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 8 +-- .../drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c | 6 --

RE: [PATCH 3/3] drm/amd/pm: fix the uninitialized scalar variable warning

2024-04-28 Thread Huang, Tim
[AMD Official Use Only - General] > -Original Message- > From: Jesse Zhang > Sent: Friday, April 26, 2024 3:29 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Koenig, Christian > ; Huang, Tim ; Zhang, > Jesse(Jie) ; Zhang, Jesse(Jie) > > Subject: [PATCH 3/3] drm/amd/pm:

[PATCH] drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()

2024-04-28 Thread Dan Carpenter
The "instance" variable needs to be signed for the error handling to work. Fixes: b34ddc71267a ("drm/amdgpu: add error handle to avoid out-of-bounds") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

[PATCH] drm/amd/display: re-indent dpp401_dscl_program_isharp()

2024-04-28 Thread Dan Carpenter
Smatch complains because some lines are indented more than they should be. I went a bit crazy re-indenting this. ;) The comments were not useful except as a marker of things which are left to implement so I deleted most of them except for the TODO. I introduced a "data" pointer so that I could

Re: [PATCH] drm/amd/display: Add MSF panel to DPCD 0x317 patch list

2024-04-28 Thread Tobias Jakobi
On 3/9/24 02:47, tjak...@math.uni-bielefeld.de wrote: From: Tobias Jakobi This 8.4 inch panel is integrated in the Ayaneo Kun handheld device. The panel resolution is 2560×1600, i.e. it has portrait dimensions. Decoding the EDID shows: Manufacturer: MSF Model: 4099 Display Product Name: 'TV08

Re: [PATCH 2/2] drm/amdgpu/pm: Fix uninitialized variable warning

2024-04-28 Thread Alex Deucher
On Sun, Apr 28, 2024 at 7:12 AM Ma Jun wrote: > > Check return value of smum_send_msg_to_smc to fix > uninitialized variable varning > > Signed-off-by: Ma Jun > --- > .../drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 21 ++- > .../drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 8

Re: [PATCH] drm/amd/display: re-indent dpp401_dscl_program_isharp()

2024-04-28 Thread Aurabindo Pillai
Thanks for the fix! Reviewed-by: Aurabindo Pillai On 4/28/24 8:42 AM, Dan Carpenter wrote: Smatch complains because some lines are indented more than they should be. I went a bit crazy re-indenting this. ;) The comments were not useful except as a marker of things which are left to implemen

Re: [PATCH] drm/amd/display: re-indent dpp401_dscl_program_isharp()

2024-04-28 Thread Aurabindo Pillai
Patch has been merged to amd-staging-drm-next. On 4/28/24 12:09 PM, Aurabindo Pillai wrote: Thanks for the fix! Reviewed-by: Aurabindo Pillai On 4/28/24 8:42 AM, Dan Carpenter wrote: Smatch complains because some lines are indented more than they should be.  I went a bit crazy re-indenting t

RE: [PATCH] drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()

2024-04-28 Thread Zhou, Bob
[Public] Reviewed-by: Bob Zhou Regards, Bob -Original Message- From: Dan Carpenter Sent: 2024年4月28日 20:57 To: Zhou, Bob Cc: Deucher, Alexander ; Koenig, Christian ; Pan, Xinhui ; David Airlie ; Daniel Vetter ; Kuehling, Felix ; Zhang, Hawking ; Guchun Chen ; Ma, Le ; Lazar, Lijo

[PATCH 3/3 V2] drm/amd/pm: fix the uninitialized scalar variable warning

2024-04-28 Thread Jesse Zhang
Fix warning for using uninitialized values sclk_mask, mck_mask and soc_mask. v2: Init the variables in the renoir_get_profiling_clk_mask(Tim Huang) Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/

[PATCH] drm/amd/pm: fix warning using uninitialized value of max_vid_step

2024-04-28 Thread Jesse Zhang
Check the return of pp_atomfwctrl_get_Voltage_table_v4 as it may fail to initialize max_vid_step Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ve

RE: [PATCH 2/2] drm/amdgpu/pm: Fix uninitialized variable warning

2024-04-28 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] Series is. Reviewed-by: Yang Wang Best Regards, Kevin -Original Message- From: Ma, Jun Sent: Sunday, April 28, 2024 5:55 PM To: amd-gfx@lists.freedesktop.org Cc: Feng, Kenneth ; Deucher, Alexander ; Wang, Yang(Kevin) ; Koenig, Christian ; Ma, Jun Su

Recall: [PATCH 2/2] drm/amdgpu/pm: Fix uninitialized variable warning

2024-04-28 Thread Wang, Yang(Kevin)
Wang, Yang(Kevin) would like to recall the message, "[PATCH 2/2] drm/amdgpu/pm: Fix uninitialized variable warning".

Recall: [PATCH 2/2] drm/amdgpu/pm: Fix uninitialized variable warning

2024-04-28 Thread Wang, Yang(Kevin)
Wang, Yang(Kevin) would like to recall the message, "[PATCH 2/2] drm/amdgpu/pm: Fix uninitialized variable warning".

RE: [PATCH] drm/amdgpu: add mutex to protect ras shared memory

2024-04-28 Thread Chai, Thomas
[AMD Official Use Only - General] OK - Best Regards, Thomas -Original Message- From: Wang, Yang(Kevin) Sent: Sunday, April 28, 2024 3:48 PM To: Chai, Thomas ; amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Zhou1, Tao ; Li, Candice ; Yang, Stanley Subject: RE: [PAT

Re: [PATCH 2/2] drm/amdgpu/pm: Fix uninitialized variable warning

2024-04-28 Thread Ma, Jun
On 4/28/2024 10:18 PM, Alex Deucher wrote: > On Sun, Apr 28, 2024 at 7:12 AM Ma Jun wrote: >> >> Check return value of smum_send_msg_to_smc to fix >> uninitialized variable varning >> >> Signed-off-by: Ma Jun >> --- >> .../drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 21 ++- >>

[PATCH v9 2/5] drm/amdgpu: Add mqd support for the fence address

2024-04-28 Thread Arunpravin Paneer Selvam
- Add a field in struct v11_gfx_mqd for userqueue fence address. - Assign fence gpu VA address to the userqueue mqd fence address fields. v2: Remove the mask and replace with lower_32_bits (Christian) Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König --- drivers/gpu/drm

[PATCH v9 1/5] drm/amdgpu: Implement a new userqueue fence driver

2024-04-28 Thread Arunpravin Paneer Selvam
Developed a userqueue fence driver for the userqueue process shared BO synchronization. Create a dma fence having write pointer as the seqno and allocate a seq64 memory for each user queue process and feed this memory address into the firmware/hardware, thus the firmware writes the read pointer in

[PATCH v9 4/5] drm/amdgpu: Implement userqueue signal/wait IOCTL

2024-04-28 Thread 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 wait IOCTL gets an array of drm syncobjs, finds the fence

[PATCH v9 3/5] drm/amdgpu: UAPI headers for userqueue Secure semaphore

2024-04-28 Thread Arunpravin Paneer Selvam
Add UAPI header support for userqueue Secure semaphore v2: Worked on review comments from Christian for the following modifications - Add bo handles, bo flags and padding fields. - Include value/va in a combined array. v3: Worked on review comments from Christian - Add num_fence

[PATCH v9 5/5] drm/amdgpu: Enable userq fence interrupt support

2024-04-28 Thread 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 is triggered. Firmware sends the doorbell offset value an

[PATCH] drm/amdgpu/vpe: fix vpe dpm clk ratio setup failed

2024-04-28 Thread Peyton Lee
Some version of BIOS does not enable all clock levels, resulting in high level clock frequency of 0. The number of valid CLKs must be confirmed in advance. Signed-off-by: Peyton Lee --- drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-)

[PATCH] drm/amd/display: Refactor construct_phy function in dc/link/link_factory.c

2024-04-28 Thread Srinivasan Shanmugam
This commit refactors the construct_phy function. The original function was large and complex. The following functions were created: - initialize_link: Handles the initial setup of the link object. - handle_connector_type: Sets the connector_signal and irq_source_hpd_rx based on the link_id.id.

RE: [PATCH] drm/amd/pm: fix warning using uninitialized value of max_vid_step

2024-04-28 Thread Huang, Tim
[AMD Official Use Only - General] > -Original Message- > From: Jesse Zhang > Sent: Monday, April 29, 2024 10:29 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Koenig, Christian > ; Huang, Tim ; Zhang, > Jesse(Jie) ; Zhang, Jesse(Jie) > Subject: [PATCH] drm/amd/pm: fix