[PATCH 11/18] drm/amdgpu: add set_powergating_state_instance

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang Add a new function to allow setting requested powergating state for the given instance. If the instance value doesn't match with the one inside ip_block, then do nothing since this request is for other instances with the same block type. Signed-off-by: Boyuan Zhang --- drive

[PATCH 08/18] drm/amdgpu/vcn: separate idle work by instance

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang Previously idle working handling is for all VCN instances. As a result, when one of the instance finishes its job, the idle work can't be triggered if the other instance is still busy. Now, move the idle_work from amdgpu_vcn to amdgpu_vcn_inst, in order to track work by vcn in

[PATCH 05/18] drm/amd/pm: set vcn enable by instance

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang The new function smu_dpm_set_vcn_enable_instance() will be used to enable or disable vcn engine dynamic power for the given vcn instance only. The original function smu_dpm_set_vcn_enable() will still be used to enable or disable vcn engine dynamic power for all VCN instances

[PATCH 12/18] drm/amdgpu: power vcn 2_5 by instance

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang For vcn 2_5, add ip_block for each vcn instance during discovery stage. And only powering on/off one of the vcn instance using the instance value stored in ip_block, instead of powering on/off all vcn instances. Modify the existing functions to use the instance value in ip_blo

[PATCH 13/18] drm/amdgpu: power vcn 3_0 by instance

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang For vcn 3_0, add ip_block for each vcn instance during discovery stage. And only powering on/off one of the vcn instance using the instance value stored in ip_block, instead of powering on/off all vcn instances. Modify the existing functions to use the instance value in ip_blo

[PATCH 07/18] drm/amdgpu/vcn: separate gating state by instance

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang vcn gating state should now be based on instance. For example, instance 0 can be gated while instance 1 is ungated, or vice versa. Therefore, change the cur_state to be an array, so that it can track the gating status for each vcn instance now. Signed-off-by: Boyuan Zhang --

[PATCH 10/18] drm/amdgpu: add ip block with instance

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang Add instance number to ip block to track which instance the ip block belongs to. Also, add a new function to allow ip block to save the instance number along with other ip block driver information. Signed-off-by: Boyuan Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu.h|

[PATCH 09/18] drm/amdgpu: pass ip_block in set_powergating_state

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang Pass ip_block instead of adev in set_powergating_state callback function. Modify set_powergating_state ip functions for all correspoding ip blocks. Signed-off-by: Boyuan Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_a

[PATCH 18/18] drm/amdgpu: set powergating state by vcn instance

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang Set powergating state by vcn instance in idle_work_handler() and ring_begin_use() functions for vcn with multiple instances. Signed-off-by: Boyuan Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff

[PATCH 15/18] drm/amdgpu: power vcn 4_0_3 by instance

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang For vcn 4_0_3, add ip_block for each vcn instance during discovery stage. And only powering on/off one of the vcn instance using the instance value stored in ip_block, instead of powering on/off all vcn instances. Modify the existing functions to use the instance value in ip_b

[PATCH 16/18] drm/amdgpu: power vcn 4_0_5 by instance

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang For vcn 4_0_5, add ip_block for each vcn instance during discovery stage. And only powering on/off one of the vcn instance using the instance value stored in ip_block, instead of powering on/off all vcn instances. Modify the existing functions to use the instance value in ip_b

[PATCH 17/18] drm/amdgpu: power vcn 5_0_0 by instance

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang For vcn 5_0_0, add ip_block for each vcn instance during discovery stage. And only powering on/off one of the vcn instance using the instance value stored in ip_block, instead of powering on/off all vcn instances. Modify the existing functions to use the instance value in ip_b

[PATCH 14/18] drm/amdgpu: power vcn 4_0 by instance

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang For vcn 4_0, add ip_block for each vcn instance during discovery stage. And only powering on/off one of the vcn instance using the instance value stored in ip_block, instead of powering on/off all vcn instances. Modify the existing functions to use the instance value in ip_blo

[PATCH 06/18] drm/amd/pm: set powergating by smu by instance

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang Add a new function to set powergating_by_smu for the given instance Signed-off-by: Boyuan Zhang --- .../gpu/drm/amd/include/kgd_pp_interface.h| 2 + drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 67 +++ drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h |

[PATCH 04/18] drm/amd/pm: enable vcn by instance for smu 11

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang For sienna_cichlid, set vcn enable or disable by the given instance instead of setting it for all vcn instances. Signed-off-by: Boyuan Zhang --- .../amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 24 --- 1 file changed, 10 insertions(+), 14 deletions(-) diff --

[PATCH 03/18] drm/amd/pm: enable vcn by instance for smu v14

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang For smu v14, set vcn enable or disable by the given instance instead of setting it for all vcn instances. Signed-off-by: Boyuan Zhang --- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h | 5 ++- .../gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c| 40 +-- .../drm/a

[PATCH 01/18] drm/amd/pm: add new vcn enable function pointer

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang The new function dpm_set_vcn_enable_instance() will be used to enable or disable vcn engine dynamic power for the given vcn instance. The original function dpm_set_vcn_enable() will still be used to enable or disable vcn engine dynamic power for all vcn instances as before. S

[PATCH 02/18] drm/amd/pm: enable vcn by instance for smu v13

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang For smu v13, set vcn enable or disable by the given instance instead of setting it for all vcn instances. Signed-off-by: Boyuan Zhang --- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 5 +++-- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c| 21 --- .../drm

[PATCH 00/18] Separating vcn power management by instance

2024-10-01 Thread boyuan.zhang
From: Boyuan Zhang Previously, all vcn instance will be powered on/off at the same time even only one of the instance requests power status change. This patch set enables vcn to ONLY power on/off the instance that requires power status change. Other vcn instances will remain the original power st

[PATCH 2/6] drm/amdgpu/gfx10: Apply Isolation Enforcement to GFX & Compute rings

2024-10-01 Thread Srinivasan Shanmugam
This commit applies isolation enforcement to the GFX and Compute rings in the gfx_v10_0 module. The commit sets `amdgpu_gfx_enforce_isolation_ring_begin_use` and `amdgpu_gfx_enforce_isolation_ring_end_use` as the functions to be called when a ring begins and ends its use, respectively. `amdgpu_gf

[PATCH 3/6] drm/amdgpu/gfx11: Implement cleaner shader support for GFX11 hardware

2024-10-01 Thread Srinivasan Shanmugam
The patch modifies the gfx_v11_0_kiq_set_resources function to write the cleaner shader's memory controller address to the ring buffer. It also adds a new function, gfx_v11_0_ring_emit_cleaner_shader, which emits the PACKET3_RUN_CLEANER_SHADER packet to the ring buffer. This patch adds support for

[PATCH 4/6] drm/amdgpu/gfx11: Apply Isolation Enforcement to GFX & Compute rings

2024-10-01 Thread Srinivasan Shanmugam
This commit applies isolation enforcement to the GFX and Compute rings in the gfx_v11_0 module. The commit sets `amdgpu_gfx_enforce_isolation_ring_begin_use` and `amdgpu_gfx_enforce_isolation_ring_end_use` as the functions to be called when a ring begins and ends its use, respectively. `amdgpu_gf

[PATCH 1/6] drm/amdgpu/gfx10: Implement cleaner shader support for GFX10 hardware

2024-10-01 Thread Srinivasan Shanmugam
The patch modifies the gfx_v10_0_kiq_set_resources function to write the cleaner shader's memory controller address to the ring buffer. It also adds a new function, gfx_v10_0_ring_emit_cleaner_shader, which emits the PACKET3_RUN_CLEANER_SHADER packet to the ring buffer. This patch adds support for

[PATCH 5/6] drm/amdgpu/gfx12: Implement cleaner shader support for GFX12 hardware

2024-10-01 Thread Srinivasan Shanmugam
This patch adds support for the PACKET3_RUN_CLEANER_SHADER packet in the gfx_v12_0 module. This packet is used to emit the cleaner shader, which is used to clear GPU memory before it's reused, helping to prevent data leakage between different processes. Finally, the patch updates the ring function

[PATCH 6/6] drm/amdgpu/gfx12: Apply Isolation Enforcement to GFX & Compute rings

2024-10-01 Thread Srinivasan Shanmugam
This commit applies isolation enforcement to the GFX and Compute rings in the gfx_v12_0 module. The commit sets `amdgpu_gfx_enforce_isolation_ring_begin_use` and `amdgpu_gfx_enforce_isolation_ring_end_use` as the functions to be called when a ring begins and ends its use, respectively. `amdgpu_gf

[PATCH] drm/amdkfd: Add kfd driver function to support hot plug/unplug amdgpu devices

2024-10-01 Thread Xiaogang . Chen
From: Xiaogang Chen This patch allows kfd driver function correctly when AMD gpu devices got plug/unplug at run time. When an AMD gpu device got unplug kfd driver gracefully terminates existing kfd processes after stops all queues, sends SIGTERM to user process. After that user space can use rem

Re: [PATCH v4] docs/gpu: ci: update flake tests requirements

2024-10-01 Thread Vignesh Raman
Hi amdgpu Maintainers, On 30/09/24 15:22, Vignesh Raman wrote: Update the documentation to specify linking to a relevant GitLab issue or email report for each new flake entry. Added specific GitLab issue urls for amdgpu, i915, msm and xe driver. Acked-by: Maxime Ripard Acked-by: Rodrigo Vivi

Re: [PATCH v2] drm/amdgpu: add dce6 drm_panic support

2024-10-01 Thread Jocelyn Falempe
On 25/09/2024 10:33, Jocelyn Falempe wrote: On 24/09/2024 16:02, Alex Deucher wrote: On Fri, Sep 20, 2024 at 11:36 AM Jocelyn Falempe wrote: On 17/09/2024 15:21, Alex Deucher wrote: On Mon, Aug 12, 2024 at 2:10 AM Lu Yao wrote: Add support for the drm_panic module, which displays a pretty

Re: [PATCH] drm/amdgpu/gfx9: Add Cleaner Shader Deinitialization in gfx_v9_0 Module

2024-10-01 Thread Christian König
Am 01.10.24 um 09:00 schrieb Srinivasan Shanmugam: This commit addresses an omission in the previous patch related to the cleaner shader support for GFX9 hardware. Specifically, it adds the necessary deinitialization code for the cleaner shader in the gfx_v9_0_sw_fini function. The added line am

[REGRESSION][BISECTED] 58a261bfc967: choppy GPU performance

2024-10-01 Thread John Rowley
Hi, Since 58a261bfc967, I'm experiencing choppy display performance on my Framework 13 laptop. I ran a git bisect and narrowed it down to: commit 58a261bfc96763a851cb48b203ed57da37e157b8 Author: Hamza Mahfooz Date:   Thu Aug 22 11:58:22 2024 -0400     drm/amd/display: use a mor

Re: [PATCH] Revert "drm/radeon: use GEM references instead of TTMs"

2024-10-01 Thread Mingcong Bai
Hi Huacai, 在 2024-09-29 15:50,Huacai Chen 写道: This reverts commit fd69ef05029f9beb7b031ef96e7a36970806a670. The original patch causes NULL pointer references: [ 21.620856] CPU 3 Unable to handle kernel paging request at virtual address , era == 94bf61d8, ra == 9

Re: [PATCH] drm/amd/pm: check return value of amdgpu_irq_add_id()

2024-10-01 Thread Christian König
Am 01.10.24 um 12:57 schrieb Igor Artemiev: amdgpu_irq_ad_id() may fail and the irq handlers will not be registered. This patch adds error code check. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Signed-off-by: Igor Artemiev --- .../drm/amd/pm/powerp

Re: AMD drm patch workflow is broken for stable trees

2024-10-01 Thread Greg KH
On Mon, Sep 30, 2024 at 10:10:25AM -0400, Alex Deucher wrote: > Resending now that rc1 is out. These should be ignored for stable. > > 8151a6c13111 drm/amd/display: Skip Recompute DSC Params if no Stream on Link > fbfb5f034225 drm/amdgpu: fix contiguous handling for IB parsing v2 > ec0d7abbb0d4 d

Re: [PATCH] drm/amdgpu/gfx9: Add Cleaner Shader Deinitialization in gfx_v9_0 Module

2024-10-01 Thread Alex Deucher
On Tue, Oct 1, 2024 at 3:01 AM Srinivasan Shanmugam wrote: > > This commit addresses an omission in the previous patch related to the > cleaner shader support for GFX9 hardware. Specifically, it adds the > necessary deinitialization code for the cleaner shader in the > gfx_v9_0_sw_fini function. >

Re: [PATCH] drm/amd/powerplay: Delete unused function and maths library

2024-10-01 Thread Dr. David Alan Gilbert
* Alex Deucher (alexdeuc...@gmail.com) wrote: > On Sun, Sep 29, 2024 at 5:28 PM wrote: > > > > From: "Dr. David Alan Gilbert" > > > > We start with the function 'atomctrl_calculate_voltage_evv_on_sclk' > > which has been unused since 2016's commit > > e805ed83ba1c ("drm/amd/powerplay: delete usel

[PATCH] drm/amdgpu/gfx9: Add Cleaner Shader Deinitialization in gfx_v9_0 Module

2024-10-01 Thread Srinivasan Shanmugam
This commit addresses an omission in the previous patch related to the cleaner shader support for GFX9 hardware. Specifically, it adds the necessary deinitialization code for the cleaner shader in the gfx_v9_0_sw_fini function. The added line amdgpu_gfx_cleaner_shader_sw_fini(adev); ensures that a

[PATCH] drm/amd/pm: check return value of amdgpu_irq_add_id()

2024-10-01 Thread Igor Artemiev
amdgpu_irq_ad_id() may fail and the irq handlers will not be registered. This patch adds error code check. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Signed-off-by: Igor Artemiev --- .../drm/amd/pm/powerplay/hwmgr/smu_helper.c | 19 -

Re: AMD drm patch workflow is broken for stable trees

2024-10-01 Thread Alex Deucher
On Tue, Oct 1, 2024 at 6:04 AM Greg KH wrote: > > On Mon, Sep 30, 2024 at 10:10:25AM -0400, Alex Deucher wrote: > > Resending now that rc1 is out. These should be ignored for stable. > > > > 8151a6c13111 drm/amd/display: Skip Recompute DSC Params if no Stream on Link > > fbfb5f034225 drm/amdgpu:

NULL pointer dereference with kernel 6.12.0-rc1 and ARUBA GPU

2024-10-01 Thread Arthur Marsh
[ 13.069630] [drm] radeon kernel modesetting enabled. [ 13.069681] radeon :00:01.0: vgaarb: deactivate vga console [ 13.070435] Console: switching to colour dummy device 80x25 [ 13.070632] [drm] initializing kernel modesetting (ARUBA 0x1002:0x990C 0x1002:0x0123 0x00). [ 13.070718] AT

Re: [PATCH 06/28] drm/hyperv-drm: Use video aperture helpers

2024-10-01 Thread Deepak Rawat
On Mon, Sep 30, 2024 at 6:09 AM Thomas Zimmermann wrote: > > DRM's aperture functions have long been implemented as helpers > under drivers/video/ for use with fbdev. Avoid the DRM wrappers by > calling the video functions directly. > > Signed-off-by: Thomas Zimmermann > Cc: Deepak Rawat > --- >

Re: [REGRESSION][BISECTED] 58a261bfc967: choppy GPU performance

2024-10-01 Thread John Rowley
Oops, forgot to mention that I'm using the AMD variant of the Framework 13 laptop, which uses AMD Ryzen 7 7840U w/ Radeon 780M Graphics. Thanks. #regzbot introduced: 58a261bfc967 On 30/09/2024 19:10, John Rowley wrote: > Hi, > > Since 58a261bfc967, I'm experiencing choppy display performance on

Re: [REGRESSION][BISECTED] 58a261bfc967: choppy GPU performance

2024-10-01 Thread Mario Limonciello
On 9/30/2024 13:42, John Rowley wrote: Oops, forgot to mention that I'm using the AMD variant of the Framework 13 laptop, which uses AMD Ryzen 7 7840U w/ Radeon 780M Graphics. Thanks. #regzbot introduced: 58a261bfc967 Just to make sure we're looking at a pure kernel bug: 1) What version of

Re: [REGRESSION][BISECTED] 58a261bfc967: choppy GPU performance

2024-10-01 Thread Leo Li
On 2024-10-01 15:10, Mario Limonciello wrote: On 10/1/2024 14:09, John Rowley wrote: I was using power-profiles-daemon version 0.23 in balanced mode. I also tested TLP, and vanilla kernel without any power daemons running. Without any daemons I use the following: energy_performance_

RE: [REGRESSION][BISECTED] 58a261bfc967: choppy GPU performance

2024-10-01 Thread Deucher, Alexander
[Public] > -Original Message- > From: amd-gfx On Behalf Of Leo Li > Sent: Tuesday, October 1, 2024 4:07 PM > To: Limonciello, Mario ; John Rowley > ; Mahfooz, Hamza > Cc: Wentland, Harry ; Siqueira, Rodrigo > ; amd-gfx@lists.freedesktop.org; > regressi...@lists.linux.dev > Subject: Re: [

Re: [REGRESSION][BISECTED] 58a261bfc967: choppy GPU performance

2024-10-01 Thread Mario Limonciello
On 10/1/2024 15:07, Leo Li wrote: On 2024-10-01 15:10, Mario Limonciello wrote: On 10/1/2024 14:09, John Rowley wrote: I was using power-profiles-daemon version 0.23 in balanced mode. I also tested TLP, and vanilla kernel without any power daemons running. Without any daemons I use the fol

Re: [REGRESSION][BISECTED] 58a261bfc967: choppy GPU performance

2024-10-01 Thread Mario Limonciello
On 10/1/2024 14:09, John Rowley wrote: I was using power-profiles-daemon version 0.23 in balanced mode. I also tested TLP, and vanilla kernel without any power daemons running. Without any daemons I use the following: energy_performance_preference: balance_power scaling_driver: amd-

Re: [PATCH v1 5/9] drm/amd/pm: use pm_runtime_get_if_active for debugfs getters

2024-10-01 Thread Bjorn Helgaas
On Fri, Sep 27, 2024 at 09:57:20AM +, Feng, Kenneth wrote: > [AMD Official Use Only - AMD Internal Distribution Only] I don't know what I can do with this. 1) The "AMD Official Use Only - AMD Internal Distribution Only" above suggests to me that I can't act on it. Is there any way you can ge

Re: [REGRESSION][BISECTED] 58a261bfc967: choppy GPU performance

2024-10-01 Thread Mario Limonciello
On 10/1/2024 16:14, John Rowley wrote: Disabling PSR as per Leo's reply seems to have done the trick! Stock 6.12-rc1 (without revert): BROKEN /sys/kernel/debug/dri/:c1:00.0/eDP-1/psr_state: 6 /sys/kernel/debug/dri/:c1:00.0/eDP-1/psr_capability: Sink support: yes [0x

Re: [PATCH] Revert "drm/radeon: use GEM references instead of TTMs"

2024-10-01 Thread Christian König
Yes that is a known issue with the driver at the moment. It needs a three line change to init the GEM functions earlier than before. I'm currently working on this fix. Regards, Christian. Am 01.10.24 um 15:50 schrieb Mingcong Bai: Hi Huacai, 在 2024-09-29 15:50,Huacai Chen 写道: This reverts