RE: [PATCH V4 1/5] drm/amdgpu: Add sysfs interface for gc reset mask

2024-10-28 Thread Huang, Tim
[AMD Official Use Only - AMD Internal Distribution Only] Hi Jesse, > -Original Message- > From: jesse.zh...@amd.com > Sent: Tuesday, October 29, 2024 2:42 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Koenig, Christian > ; Huang, Tim ; Zhang, > Jesse(Jie) ; Zhang, Jes

[PATCH V4 1/5] drm/amdgpu: Add sysfs interface for gc reset mask

2024-10-28 Thread jesse.zh...@amd.com
Add two sysfs interfaces for gfx and compute: gfx_reset_mask compute_reset_mask These interfaces are read-only and show the resets supported by the IP. For example, full adapter reset (mode1/mode2/BACO/etc), soft reset, queue reset, and pipe reset. V2: the sysfs node returns a text string instead

Re: [PATCH] drm/amdgpu: Group gfx sysfs functions

2024-10-28 Thread SRINIVASAN SHANMUGAM
On 10/29/2024 12:07 PM, SRINIVASAN SHANMUGAM wrote: On 10/29/2024 10:57 AM, Lijo Lazar wrote: Make amdgpu_gfx_sysfs_init/fini functions as common entry points for all gfx related sysfs nodes. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 37 ++-

[PATCH V4 4/5] drm/amdgpu: Add sysfs interface for vpe reset mask

2024-10-28 Thread jesse.zh...@amd.com
Add the sysfs interface for vpe: vpe_reset_mask The interface is read-only and show the resets supported by the IP. For example, full adapter reset (mode1/mode2/BACO/etc), soft reset, queue reset, and pipe reset. V2: the sysfs node returns a text string instead of some flags (Christian) v3: a

[PATCH V4 3/5] drm/amdgpu: Add sysfs interface for vcn reset mask

2024-10-28 Thread jesse.zh...@amd.com
Add the sysfs interface for vcn: vcn_reset_mask The interface is read-only and show the resets supported by the IP. For example, full adapter reset (mode1/mode2/BACO/etc), soft reset, queue reset, and pipe reset. V2: the sysfs node returns a text string instead of some flags (Christian) V2: the

[PATCH V4 5/5] drm/amdgpu: Add sysfs interface for jpeg reset mask

2024-10-28 Thread jesse.zh...@amd.com
Add the sysfs interface for jpeg: jpeg_reset_mask The interface is read-only and show the resets supported by the IP. For example, full adapter reset (mode1/mode2/BACO/etc), soft reset, queue reset, and pipe reset. V2: the sysfs node returns a text string instead of some flags (Christian) v3: add

[PATCH V4 2/5] drm/amdgpu: Add sysfs interface for sdma reset mask

2024-10-28 Thread jesse.zh...@amd.com
Add the sysfs interface for sdma: sdma_reset_mask The interface is read-only and show the resets supported by the IP. For example, full adapter reset (mode1/mode2/BACO/etc), soft reset, queue reset, and pipe reset. V2: the sysfs node returns a text string instead of some flags (Christian) v3: add

Re: [PATCH] drm/amdgpu: Group gfx sysfs functions

2024-10-28 Thread SRINIVASAN SHANMUGAM
On 10/29/2024 10:57 AM, Lijo Lazar wrote: Make amdgpu_gfx_sysfs_init/fini functions as common entry points for all gfx related sysfs nodes. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 37 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 --

[PATCH] drm/amdgpu: Group gfx sysfs functions

2024-10-28 Thread Lijo Lazar
Make amdgpu_gfx_sysfs_init/fini functions as common entry points for all gfx related sysfs nodes. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 37 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 -- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 5 ++

RE: [PATCH V3 1/5] drm/amdgpu: Add sysfs interface for gc reset mask

2024-10-28 Thread Huang, Tim
[Public] Hi Jesse, > -Original Message- > From: amd-gfx On Behalf Of Huang, > Tim > Sent: Tuesday, October 29, 2024 12:21 PM > To: Zhang, Jesse(Jie) ; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Koenig, Christian > ; Zhang, Jesse(Jie) ; > Zhang, Jesse(Jie) > Subject: RE: [P

RE: [PATCH V3 1/5] drm/amdgpu: Add sysfs interface for gc reset mask

2024-10-28 Thread Huang, Tim
[Public] Hi Jesse, > -Original Message- > From: amd-gfx On Behalf Of > jesse.zh...@amd.com > Sent: Thursday, October 24, 2024 3:39 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Koenig, Christian > ; Zhang, Jesse(Jie) ; > Zhang, Jesse(Jie) > Subject: [PATCH V3 1/5] dr

Re: [PATCH v2] drm/amd/pm: correct the workload setting

2024-10-28 Thread Lazar, Lijo
On 10/28/2024 11:42 PM, Alex Deucher wrote: > On Thu, Oct 24, 2024 at 5:18 AM Kenneth Feng wrote: >> >> Correct the workload setting in order not to mix the setting >> with the end user. Update the workload mask accordingly. >> >> v2: changes as below: >> 1. the end user can not erase the workl

Re: [PATCH v2] drm/amdgpu: Fix possible NULL pointer dereference

2024-10-28 Thread Lazar, Lijo
On 10/29/2024 3:48 PM, Li Huafei wrote: > Fix the potential NULL pointer dereference on mem_ranges in > amdgpu_discovery_get_nps_info(). Additionally, assign the output > parameters nps_type and range_cnt after the kvzalloc() call to prevent > modifying the output parameters in case of an error

Re: [PATCH] drm/amdgpu: add ring reset messages

2024-10-28 Thread Lazar, Lijo
On 10/28/2024 10:21 PM, Alex Deucher wrote: > Add messages to make it clear when a per ring reset > happens. This is helpful for debugging and aligns with > other reset methods. > > v2: add ring name in success/fail messages (Lijo) > > Reviewed-by: Kent Russell (v1) > Signed-off-by: Alex Deu

RE: [RFC PATCH] drm/amd/pm: add zero RPM OD setting support for SMU13

2024-10-28 Thread Feng, Kenneth
[AMD Official Use Only - AMD Internal Distribution Only] Hi Wolfgang, It's good to add this interface. However, I think it would be better to add the setting of OverDriveTable.FanZeroRpmStopTemp for this interface. OverDriveTable.FanZeroRpmStopTemp determines if the fan can stop when the tempera

[PATCH] drm/amdkfd: Differentiate logging message for driver oversubscription

2024-10-28 Thread Xiaogang . Chen
From: Xiaogang Chen To allow user better understand the cause triggering runlist oversubscription. No function change. Signed-off-by: Xiaogang Chen xiaogang.c...@amd.com --- .../gpu/drm/amd/amdkfd/kfd_packet_manager.c | 55 ++- 1 file changed, 42 insertions(+), 13 deletions(-)

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

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 10:36 PM wrote: > > 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

[PATCH v3] drm/amdkfd: change kfd process kref count at creation

2024-10-28 Thread Xiaogang . Chen
From: Xiaogang Chen kfd process kref count(process->ref) is initialized to 1 by kref_init. After it is created not need to increase its kref. Instad add kfd process kref at kfd process mmu notifier allocation since we already decrease the kref at free_notifier of mmu_notifier_ops, so pair them.

Re: [RFC PATCH] drm/amd/pm: add zero RPM OD setting support for SMU13

2024-10-28 Thread Alex Deucher
+ Kenneth to help review On Sat, Oct 19, 2024 at 10:43 AM Wolfgang Müller wrote: > > Whilst we have support for setting fan curves there is no support for > disabling the zero RPM feature. Since the relevant bits are already > present in the OverDriveTable, hook them up to a sysctl setting so use

Re: [PATCH v2] drm/amdgpu: add new AMDGPU_INFO subquery for fw objects

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 10:04 AM Shashank Sharma wrote: > > Currently, the shadow FW space size and alignment information is > protected under a flag (adev->gfx.cp_gfx_shadow) which gets set > only in case of SRIOV setups. > if (amdgpu_sriov_vf(adev)) > adev->gfx.cp_gfx_shadow = true; > >

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

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 11:23 PM wrote: > > 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 am

Re: [PATCH 09/29] drm/amdgpu: track instances of the same IP block

2024-10-28 Thread Alex Deucher
On Mon, Oct 28, 2024 at 3:53 PM Boyuan Zhang wrote: > > > On 2024-10-28 15:27, Alex Deucher wrote: > > On Thu, Oct 24, 2024 at 10:48 PM wrote: > >> From: Boyuan Zhang > >> > >> Add a new function to count the number of instance of the same IP block > >> in the current ip_block list, then use the

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

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 11:23 PM wrote: > > 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

Re: [PATCH 09/29] drm/amdgpu: track instances of the same IP block

2024-10-28 Thread Boyuan Zhang
On 2024-10-28 15:27, Alex Deucher wrote: On Thu, Oct 24, 2024 at 10:48 PM wrote: From: Boyuan Zhang Add a new function to count the number of instance of the same IP block in the current ip_block list, then use the returned count value to set the newly defined instance variable in ip_block,

Re: [PATCH 26/29] drm/amdgpu: setup_ucode for each vcn instance

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 10:36 PM wrote: > > From: Boyuan Zhang > > Pass instance parameter to amdgpu_vcn_setup_ucode(), and perform > setup ucode ONLY for the given vcn instance, instead of for all > vcn instances. Modify each vcn generation accordingly. > > Signed-off-by: Boyuan Zhang Reviewed

Re: [PATCH 19/29] drm/amdgpu: set powergating state by vcn instance

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 11:33 PM wrote: > > From: Boyuan Zhang > > Set powergating state by vcn instance in idle_work_handler() and > ring_begin_use() functions for vcn with multiple instances. > > v2: Add instance parameter to amdgpu_device_ip_set_powergating_state(), > instead of creating new f

Re: [PATCH 22/32] drm/amdgpu: sw_fini for each vcn instance

2024-10-28 Thread Alex Deucher
On Thu, Oct 17, 2024 at 11:43 AM wrote: > > From: Boyuan Zhang > > Pass instance parameter to amdgpu_vcn_sw_fini(), and perform > sw fini ONLY for the given vcn instance, instead of for all > vcn instances. Modify each vcn generation accordingly. > > Signed-off-by: Boyuan Zhang Reviewed-by: Ale

Re: [PATCH 23/29] drm/amdgpu: hw_init for each vcn instance

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 10:58 PM wrote: > > From: Boyuan Zhang > > Pass instance parameter to amdgpu_vcn_hw_init(), and perform > hw init ONLY for the given vcn instance, instead of for all > vcn instances. Modify each vcn generation accordingly. > > Signed-off-by: Boyuan Zhang Reviewed-by: Ale

RE: [PATCH 20/29] drm/amdgpu: early_init for each vcn instance

2024-10-28 Thread Deucher, Alexander
[AMD Official Use Only - AMD Internal Distribution Only] > -Original Message- > From: Zhang, Boyuan > Sent: Thursday, October 24, 2024 10:36 PM > To: amd-gfx@lists.freedesktop.org; Liu, Leo ; Koenig, > Christian ; Deucher, Alexander > ; Khatri, Sunil > Cc: Zhang, Boyuan > Subject: [PATC

Re: [PATCH 29/29] drm/amdgpu: set_powergating for each vcn instance

2024-10-28 Thread Alex Deucher
On Fri, Oct 25, 2024 at 1:13 AM wrote: > > From: Boyuan Zhang > > Perform set_powergating_state only for the instance of the current vcn > IP block, instead of perform it for all vcn instances. > > Signed-off-by: Boyuan Zhang > Acked-by: Christian König Reviewed-by: Alex Deucher > --- > dri

Re: [PATCH 28/29] drm/amdgpu: wait_for_idle for each vcn instance

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 10:36 PM wrote: > > From: Boyuan Zhang > > Perform wait_for_idle only for the instance of the current vcn IP block, > instead of perform it for all vcn instances. > > v2: remove unneeded local variable initialization. > > Signed-off-by: Boyuan Zhang Reviewed-by: Alex Deu

Re: [PATCH 27/29] drm/amdgpu: set funcs for each vcn instance

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 11:13 PM wrote: > > From: Boyuan Zhang > > Pass instance parameter to set_dec_ring_funcs(), set_enc_ring_funcs(), > and set_irq_funcs(), and perform function setup ONLY for the given vcn > instance, instead of for all vcn instances. Modify each vcn generation > accordingly

Re: [PATCH 25/29] drm/amdgpu: resume for each vcn instance

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 10:48 PM wrote: > > From: Boyuan Zhang > > Pass instance parameter to amdgpu_vcn_resume(), and perform > resume ONLY for the given vcn instance, instead of for all > vcn instances. Modify each vcn generation accordingly. > > Signed-off-by: Boyuan Zhang Reviewed-by: Alex

Re: [PATCH 24/29] drm/amdgpu: suspend for each vcn instance

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 10:36 PM wrote: > > From: Boyuan Zhang > > Pass instance parameter to amdgpu_vcn_suspend(), and perform > suspend ONLY for the given vcn instance, instead of for all > vcn instances. Modify each vcn generation accordingly. > > v2: add vcn instance to amdgpu_vcn_save_vcpu_b

Re: [PATCH 21/29] drm/amdgpu: sw_init for each vcn instance

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 11:58 PM wrote: > > From: Boyuan Zhang > > Pass instance parameter to amdgpu_vcn_sw_init(), and perform > sw init ONLY for the given vcn instance, instead of for all > vcn instances. Modify each vcn generation accordingly. > > Signed-off-by: Boyuan Zhang Reviewed-by: Ale

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

2024-10-28 Thread Alex Deucher
On Fri, Oct 25, 2024 at 2:23 AM wrote: > > 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 th

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

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 11:03 PM wrote: > > 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 t

Re: [PATCH 01/29] drm/amd/pm: add inst to dpm_set_vcn_enable

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 10:36 PM wrote: > > From: Boyuan Zhang > > Add an instance parameter to the existing function dpm_set_vcn_enable() > for future implementation. Re-write all pptable functions accordingly. > > v2: Remove duplicated dpm_set_vcn_enable() functions in v1. Instead, > adding ins

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

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 10:36 PM wrote: > > 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 t

Re: [PATCH 09/29] drm/amdgpu: track instances of the same IP block

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 10:48 PM wrote: > > From: Boyuan Zhang > > Add a new function to count the number of instance of the same IP block > in the current ip_block list, then use the returned count value to set > the newly defined instance variable in ip_block, to track the instance > number of

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

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 10:36 PM wrote: > > 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

Re: [PATCH 11/29] drm/amdgpu/vcn: separate gating state by instance

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 11:08 PM wrote: > > 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

Re: [PATCH 05/29] drm/amd/pm: add inst to dpm_set_powergating_by_smu

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 10:36 PM wrote: > > From: Boyuan Zhang > > Add an instance parameter to amdgpu_dpm_set_powergating_by_smu() function, > and use the instance to call set_powergating_by_smu(). > > v2: remove duplicated functions. > > remove for-loop in amdgpu_dpm_set_powergating_by_smu(), a

Re: [PATCH 10/29] drm/amdgpu: move per inst variables to amdgpu_vcn_inst

2024-10-28 Thread Alex Deucher
On Fri, Oct 25, 2024 at 12:53 AM wrote: > > From: Boyuan Zhang > > Move all per instance variables from amdgpu_vcn to amdgpu_vcn_inst. > > Move adev->vcn.fw[i] from amdgpu_vcn to amdgpu_vcn_inst. > Move adev->vcn.vcn_config[i] from amdgpu_vcn to amdgpu_vcn_inst. > Move adev->vcn.vcn_codec_disable

Re: [PATCH 07/29] drm/amdgpu: pass ip_block in set_powergating_state

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 11:03 PM wrote: > > 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. > > v2: fix a ip block index error. > > v3: remove type casting > > Signed-off-b

Re: [PATCH 06/29] drm/amdgpu: add inst to amdgpu_dpm_enable_vcn

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 11:13 PM wrote: > > From: Boyuan Zhang > > Add an instance parameter to amdgpu_dpm_enable_vcn() function, and change > all calls from vcn ip functions to add instance argument. vcn generations > with only one instance (v1.0, v2.0) always use 0 as instance number. vcn > gen

Re: [PATCH 04/29] drm/amd/pm: add inst to set_powergating_by_smu

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 11:18 PM wrote: > > From: Boyuan Zhang > > Add an instance parameter to set_powergating_by_smu() function, and > re-write all amd_pm functions accordingly. Then use the instance to > call smu_dpm_set_vcn_enable(). > > v2: remove duplicated functions. > > remove for-loop in

Re: [PATCH 02/29] drm/amd/pm: power up or down vcn by instance

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 10:48 PM wrote: > > From: Boyuan Zhang > > For smu ip with multiple vcn instances (smu 11/13/14), remove all the > for loop in dpm_set_vcn_enable() functions. And use the instance > argument to power up/down vcn for the given instance only, instead > of powering up/down fo

Re: [RFC 1/1] SWDEV476969 - dm: Fail dm_atomic_check if cursor overlay is required at MAX_SURFACES

2024-10-28 Thread Leo Li
On 2024-10-25 22:01, Melissa Wen wrote: On 25/10/2024 16:37, Zaeem Mohamed wrote: [why] Prevent index-out-of-bounds due to requiring cursor overlay when plane_count is MAX_SURFACES. Hi Zaeem, Thanks for working on this fix. [how] Bounds check on plane_count when requiring overlay curs

Re: [PATCH 03/29] drm/amd/pm: add inst to smu_dpm_set_vcn_enable

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 10:36 PM wrote: > > From: Boyuan Zhang > > First, add an instance parameter to smu_dpm_set_vcn_enable() function, > and calling dpm_set_vcn_enable() with this given instance. > > Second, modify vcn_gated to be an array, to track the gating status > for each vcn instance se

Re: [PATCH v2] drm/amd/pm: correct the workload setting

2024-10-28 Thread Alex Deucher
On Thu, Oct 24, 2024 at 5:18 AM Kenneth Feng wrote: > > Correct the workload setting in order not to mix the setting > with the end user. Update the workload mask accordingly. > > v2: changes as below: > 1. the end user can not erase the workload from driver except default > workload. > 2. always

Re: [RFC 4/4] drm/amdgpu: Expose special on chip memory pools in fdinfo

2024-10-28 Thread Christian König
Am 24.10.24 um 11:23 schrieb Tvrtko Ursulin: From: Tvrtko Ursulin In the past these specialized on chip memory pools were reported as system memory (aka 'cpu') which was not correct and misleading. That has since been removed so lets make them visible as their own respective memory regions. Si

Re: [PATCH 1/2] drm/amdkfd: add an interface to query whether is KFD is active

2024-10-28 Thread SRINIVASAN SHANMUGAM
The series is: Acked-by: Srinivasan Shanmugam On 10/28/2024 8:22 PM, Alex Deucher wrote: Add an interface to query whether KFD has any active queues. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 9 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 7 ++

Re: [PATCH] drm/amdkfd: flag per-queue reset support for gfx9

2024-10-28 Thread Harish Kasiviswanathan
Reviewed-by: Harish Kasiviswanathan On 2024-10-22 13:36, Jonathan Kim wrote: > Flag KFD support for per-queue reset on GFX9 devices. > > Signed-off-by: Jonathan Kim > --- > drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 ++ > include/uapi/linux/kfd_sysfs.h| 3 ++- > 2 files changed

[PATCH] drm/amdgpu: add ring reset messages

2024-10-28 Thread Alex Deucher
Add messages to make it clear when a per ring reset happens. This is helpful for debugging and aligns with other reset methods. v2: add ring name in success/fail messages (Lijo) Reviewed-by: Kent Russell (v1) Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 3 +++ 1 f

Re: [PATCH] drm/amdgpu: add ring reset messages

2024-10-28 Thread Alex Deucher
On Mon, Oct 28, 2024 at 11:41 AM Lazar, Lijo wrote: > > > > On 10/28/2024 8:11 PM, Alex Deucher wrote: > > Ping? > > > > On Fri, Oct 18, 2024 at 11:47 AM Alex Deucher wrote: > >> > >> Ping? > >> > >> On Tue, Oct 15, 2024 at 2:28 PM Alex Deucher > >> wrote: > >>> > >>> Add messages to make it cl

Re: [PATCH] drm/amdgpu add "pixel_encoding"

2024-10-28 Thread Matias N. Goldberg
I just realized there is another (probably much better) possibility, which is to go the DXGI_FORMAT route: Offer an enum with all possibilities e.g offer: - BT2020_YCC_AUTO - BT2020_YCC_LIMITED - BT2020_YCC_FULL - BT2020_RGB_LIMITED - BT2020_RGB_FULL - etc. The list would grow huge. This offloa

Re: [PATCH] drm/amdgpu: add ring reset messages

2024-10-28 Thread Lazar, Lijo
On 10/28/2024 8:11 PM, Alex Deucher wrote: > Ping? > > On Fri, Oct 18, 2024 at 11:47 AM Alex Deucher wrote: >> >> Ping? >> >> On Tue, Oct 15, 2024 at 2:28 PM Alex Deucher >> wrote: >>> >>> Add messages to make it clear when a per ring reset >>> happens. This is helpful for debugging and ali

RE: [PATCH v4] drm/amdkfd: Use dynamic allocation for CU occupancy array in 'kfd_get_cu_occupancy()'

2024-10-28 Thread Joshi, Mukul
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Mukul Joshi > -Original Message- > From: SHANMUGAM, SRINIVASAN > Sent: Monday, October 28, 2024 11:12 AM > To: Koenig, Christian ; Deucher, Alexander > ; Joshi, Mukul > Cc: amd-gfx@lists.freedesktop.org; Kasiviswana

Re: [PATCH] drm/amdgpu: Fix possible NULL pointer dereference

2024-10-28 Thread Lazar, Lijo
On 10/29/2024 3:29 AM, Li Huafei wrote: > Fix the potential NULL pointer dereference on mem_ranges in > amdgpu_discovery_get_nps_info(). Additionally, assign the output > parameters nps_type and range_cnt after the kvzalloc() call to prevent > modifying the output parameters in case of an error

Fw: [PATCH] drm/amdgpu add "pixel_encoding"

2024-10-28 Thread Matias N. Goldberg
SENDING AGAIN because it was sent with HTML formatting, which screwed up the email. Hi! This is my first patch ever to DRM/amdgpu (technically I didn't write the patch, I just kept rebasing it over 4 years, and did lots of testing). I'm following the advise from: https://gitlab.freedesktop.or

Re: [PATCH v4] drm/amdkfd: Use dynamic allocation for CU occupancy array in 'kfd_get_cu_occupancy()'

2024-10-28 Thread SRINIVASAN SHANMUGAM
Ping? On 10/25/2024 8:13 AM, Srinivasan Shanmugam wrote: The `kfd_get_cu_occupancy` function previously declared a large `cu_occupancy` array as a local variable, which could lead to stack overflows due to excessive stack usage. This commit replaces the static array allocation with dynamic memor

RE: [PATCH] drm/amdgpu: add ring reset messages

2024-10-28 Thread Russell, Kent
[Public] Seems simple enough to me Reviewed-by: Kent Russell > -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: Monday, October 28, 2024 10:42 AM > To: Deucher, Alexander > Cc: amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH] drm/amdgpu: add ring reset mes

Re: [PATCH v4 3/3] drm/amdgpu/sdma4.4.2: implement ring reset callback for sdma4.4.2

2024-10-28 Thread Alex Deucher
Series is: Reviewed-by: Alex Deucher On Wed, Oct 16, 2024 at 2:28 AM wrote: > > From: Jiadong Zhu > > Implement sdma queue reset callback via SMU interface. > > v2: Leverage inst_stop/start functions in reset sequence. > Use GET_INST for physical SDMA instance. > Disable apu for sdma re

[PATCH] drm/amdgpu add "pixel_encoding"

2024-10-28 Thread Matias N. Goldberg
Hi! This is my first patch ever to DRM/amdgpu (technically I didn't write the patch, I just kept rebasing it over 4 years, and did lots of testing). I'm following the advise from:https://gitlab.freedesktop.org/drm/amd/-/issues/476#note_2628536 Why this patch? Because it fix a practical problem wi

Re: [PATCH] drm/amdgpu: add ring reset messages

2024-10-28 Thread Alex Deucher
Ping? On Fri, Oct 18, 2024 at 11:47 AM Alex Deucher wrote: > > Ping? > > On Tue, Oct 15, 2024 at 2:28 PM Alex Deucher > wrote: > > > > Add messages to make it clear when a per ring reset > > happens. This is helpful for debugging and aligns with > > other reset methods. > > > > Signed-off-by:

[PATCH 2/2] drm/amdgpu: fix fairness in enforce isolation handling

2024-10-28 Thread Alex Deucher
Make sure KFD gets a turn when serializing access to the GC IP. Currently non-KFD jobs can starve KFD if they submit often enough. This patch prevents that by stalling non-KFD if its time period has elapsed. v2: fix units v3: check enablement properly Signed-off-by: Alex Deucher --- drivers/g

[PATCH 1/2] drm/amdkfd: add an interface to query whether is KFD is active

2024-10-28 Thread Alex Deucher
Add an interface to query whether KFD has any active queues. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 9 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 7 ++ drivers/gpu/drm/amd/amdkfd/kfd_device.c| 25 ++ drivers/gpu/drm/a

Re: [PATCH 1/3] drm/amdgpu: Adjust debugfs register access permissions

2024-10-28 Thread Alex Deucher
Ping on this series? Alex On Wed, Oct 23, 2024 at 5:04 PM Alex Deucher wrote: > > Regular users shouldn't have read access. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/d

RE: [PATCH 00/29] Separating vcn power management by instance

2024-10-28 Thread Liu, Leo
[AMD Official Use Only - AMD Internal Distribution Only] The series is: Acked-by: Leo Liu > -Original Message- > From: Zhang, Boyuan > Sent: October 24, 2024 10:35 PM > To: amd-gfx@lists.freedesktop.org; Liu, Leo ; Koenig, > Christian ; Deucher, Alexander > ; Khatri, Sunil > Cc: Zhang,

Re: [PATCH] drm/amd: Use a constant format string for amdgpu_ucode_request

2024-10-28 Thread Borislav Petkov
On Mon, Aug 05, 2024 at 04:12:48PM -0400, Alex Deucher wrote: > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c > > index fbc2852278e1..6162582d0aa2 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c > > +++ b/drivers/gpu/dr

Re: [PATCH] drm/amdgpu: skip amdgpu_device_cache_pci_state under sriov

2024-10-28 Thread Lazar, Lijo
On 10/28/2024 9:34 AM, Victor Zhao wrote: > Under sriov, host driver will save and restore vf pci cfg space during > reset. And during device init, under sriov, pci_restore_state happens after > fullaccess released, and it can have race condition with mmio protection > enable from host side lead

Re: [PATCH] amdgpu/fence: replace call_rcu by kfree_rcu for simple kmem_cache_free callback

2024-10-28 Thread Christian König
Am 25.10.24 um 05:51 schrieb Hongling Zeng: Since SLOB was removed and since commit 6c6c47b063b5 ("mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()"), it is not necessary to use call_rcu when the callback only performs kmem_cache_free. Use kfree_rcu() directly. I would rather pref

Re: [RFC PATCH] drm/amd/pm: add zero RPM OD setting support for SMU13

2024-10-28 Thread Wolfgang Müller
On 2024-10-19 16:37, Wolfgang Müller wrote: > Whilst we have support for setting fan curves there is no support for > disabling the zero RPM feature. Since the relevant bits are already > present in the OverDriveTable, hook them up to a sysctl setting so users > can influence this behaviour. > > C

Re: [PATCH v8 1/4] drm: Introduce device wedged event

2024-10-28 Thread Jani Nikula
On Fri, 25 Oct 2024, Jani Nikula wrote: > On Fri, 25 Oct 2024, Raag Jadav wrote: >> @@ -70,6 +73,16 @@ static struct dentry *drm_debugfs_root; >> >> DEFINE_STATIC_SRCU(drm_unplug_srcu); >> >> +/* >> + * Available recovery methods for wedged device. To be sent along with >> device >> + * wed

RE: [PATCH 1/2] drm/amdgpu: add amdgpu_gfx_sched_mask and amdgpu_compute_sched_mask debugfs

2024-10-28 Thread Huang, Tim
[Public] Hi Jesse, > -Original Message- > From: amd-gfx On Behalf Of > jesse.zh...@amd.com > Sent: Friday, October 18, 2024 10:31 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Koenig, Christian > ; Zhang, Jesse(Jie) > Subject: [PATCH 1/2] drm/amdgpu: add amdgpu_gfx_s

[PATCH linux-next] drm/amdgpu: use string choice helpers

2024-10-28 Thread R Sundar
Use string choice helpers for better readability. Reported-by: kernel test robot Reported-by: Julia Lawall Closes: https://lore.kernel.org/r/202410161814.i6p2nnux-...@intel.com/ Signed-off-by: R Sundar --- reported in linux repository. tree: https://git.kernel.org/pub/scm/linux/kernel/git/to

RE: [PATCH] drm/amd/pm: print pp_dpm_mclk in ascending order on SMU v14.0.0

2024-10-28 Thread Zhang, Yifan
[Public] Reviewed-by: Yifan Zhang -Original Message- From: Huang, Tim Sent: Monday, October 28, 2024 2:36 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Zhang, Yifan ; Ma, Li ; Huang, Tim Subject: [PATCH] drm/amd/pm: print pp_dpm_mclk in ascending order on SMU v14.0.0

RE: [PATCH 1/1] drm/amdgpu: add generic func to check if ta fw is applicable

2024-10-28 Thread Zhang, Hawking
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Le Ma Sent: Monday, October 28, 2024 11:15 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Lazar, Lijo ; Deucher, Alexander ; Ma, Le