Re: [PATCH] drm/amdkfd: Confirm list is non-empty before utilizing list_first_entry in kfd_topology.c

2023-12-22 Thread Lazar, Lijo
On 12/22/2023 9:44 AM, Srinivasan Shanmugam wrote: Before using list_first_entry, make sure to check that list is not empty. Fixes the below: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1347 kfd_create_indirect_link_prop() warn: can 'gpu_link' even be NULL? drivers/gpu/drm/amd/amdgpu/..

Re: [PATCH v2] drm/amdgpu: Release 'adev->pm.fw' before return in 'amdgpu_device_need_post()'

2023-12-22 Thread Lazar, Lijo
On 12/21/2023 9:13 PM, Srinivasan Shanmugam wrote: In function 'amdgpu_device_need_post(struct amdgpu_device *adev)' - 'adev->pm.fw' may not be released before return. Using the function release_firmware() to release adev->pm.fw. Thus fixing the below: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Re: [PATCH Review V3 1/1] drm/amdgpu: Fix ecc irq enable/disable unpaired

2023-12-22 Thread Lazar, Lijo
On 12/21/2023 11:35 AM, Stanley.Yang wrote: The ecc_irq is disabled while GPU mode2 reset suspending process, but not be enabled during GPU mode2 reset resume process. Changed from V1: only do sdma/gfx ras_late_init in aldebaran_mode2_restore_ip delete amdgpu_ras_late_resume func

[PATCH] drm/amdgpu: Fix missing error code in 'gmc_v6/7/8/9/10 _0_hw_init()' function

2023-12-22 Thread Srinivasan Shanmugam
The gmc_v6/7/8/9/10 _0_hw_init() function in emulation checks whether all of the memory range of shared system memory could be accessed by GPU, from this aspect, -EIO is returned for error scenarios. Fixes the below: drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c:919 gmc_v6_0_hw_init() warn: missing error

[PATCH v2] drm/amdkfd: Confirm list is non-empty before utilizing list_first_entry in kfd_topology.c

2023-12-22 Thread Srinivasan Shanmugam
Before using list_first_entry, make sure to check that list is not empty, if list is empty return -ENODATA. Fixes the below: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1347 kfd_create_indirect_link_prop() warn: can 'gpu_link' even be NULL? drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topolog

[PATCH v3] drm/amdgpu: Release 'adev->pm.fw' before return in 'amdgpu_device_need_post()'

2023-12-22 Thread Srinivasan Shanmugam
In function 'amdgpu_device_need_post(struct amdgpu_device *adev)' - 'adev->pm.fw' may not be released before return. Using the function release_firmware() to release adev->pm.fw. Thus fixing the below: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1571 amdgpu_device_need_post() warn: 'adev->pm.fw'

[PATCH 1/4] drm/amd/pm: Use separate metric table for APU

2023-12-22 Thread Asad Kamal
Use separate metric table for APU and Non APU systems for smu_v_13_0_6 to get metric data Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- .../pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 90 - .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 124 ++ 2 files chan

[PATCH 2/4] drm/amd/pm: Update metric table for jpeg/vcn data

2023-12-22 Thread Asad Kamal
Update pmfw metric table to include vcn & jpeg activity for smu_v_13_0_6 Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- .../drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h| 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pm

[PATCH 3/4] drm/amd/pm: Add gpu_metrics_v1_5

2023-12-22 Thread Asad Kamal
Add new gpu_metrics_v1_5 to acquire vcn/jpeg activity & pcie nak error counters Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- .../gpu/drm/amd/include/kgd_pp_interface.h| 80 +++ drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c| 3 + 2 files changed, 83 insertions(+)

[PATCH 4/4] drm/amd/pm: Use gpu_metrics_v1_5 for SMUv13.0.6

2023-12-22 Thread Asad Kamal
Use gpu_metrics_v1_5 for SMUv13.0.6 to fill gpu metric info Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 29 +++ 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6

[PATCH] drm/amd/pm: Add mem_busy_percent for GCv9.4.3 apu

2023-12-22 Thread Asad Kamal
Expose sysfs entry mem_busy_percent for GC version 9.4.3 APU system Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c index 2cd995b0ceba.