[PATCH v2 4/6] drm/amd/pm: Add metrics support for smuv13.0.12

2025-01-22 Thread Asad Kamal
Add metrics table support for smuv13.0.12 to fetch data from metrics version v2 v2: Update get metric field and get metric size macro (Lijo) Signed-off-by: Asad Kamal --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 186 ++ .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.h | 8

[PATCH v2 2/6] drm/amd/pm: Add metrics table header for smu_v13_0_12

2025-01-22 Thread Asad Kamal
Add metrics table header for smu_v13_0_12 as metrics version V2 Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- .../pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 109 ++ 1 file changed, 109 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if

[PATCH v2 6/6] drm/amd/pm: Update pm attr for gc_9_5_0

2025-01-22 Thread Asad Kamal
Update power management & clk attributes for gc_v_9_5_0 Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers

[PATCH v2 5/6] drm/amd/pm: Skip showing MCLK_OD level

2025-01-22 Thread Asad Kamal
Skip showing MCLK_OD level if setting UCLK MAX is not supported Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu

[PATCH v2 3/6] drm/amd/pm: Add SMUv13.0.12 PPT interface

2025-01-22 Thread Asad Kamal
Add SMUv13.0.12 PPT interface to fetch dpm features Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- .../pm/swsmu/inc/pmfw_if/smu_v13_0_12_pmfw.h | 138 ++ drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 + drivers/gpu/drm/amd/pm/swsmu/smu13/Makefile | 2

[PATCH v2 1/6] drm/amd/pm: Update metrics tbl struct for smu_v_13.0.6

2025-01-22 Thread Asad Kamal
Update metrics table struct name for smu_v_13.0.6 and keep it as version Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- .../pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 6 +- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 56 +-- 2 files changed, 32 insertions(+), 30

[PATCH v2] drm/amd/pm: Fill ip version for SMU v13.0.12

2025-01-10 Thread Asad Kamal
Fill ip version in pm_metrics for SMU v13.0.12 v2: Remove ip version check(Lijo) Signed-off-by: Asad Kamal Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu

[PATCH v3 2/2] drm/amd/pm: Fill max mem bw & total app clk counter

2024-12-26 Thread Asad Kamal
Fill max memory bandwidth and total app clock counter to metrics v1_7 v2: Remove unnecessary check v3: Add app clock counter support for apu Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 23 +++ 1 file changed, 23

[PATCH v3 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers

2024-12-26 Thread Asad Kamal
Update pmfw headers for smuv13.0.6 to pmfw version 85.121 Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- .../amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h| 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if

[PATCH 2/2] drm/amd/pm: Fill max mem bw & total app clk counter

2024-11-25 Thread Asad Kamal
Fill max memory bandwidth and total app clock counter to metrics v1_7 Signed-off-by: Asad Kamal --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 34 +++ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b

[PATCH 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers

2024-11-25 Thread Asad Kamal
Update pmfw headers for smuv13.0.6 to pmfw version 85.121 Signed-off-by: Asad Kamal --- .../amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h| 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h b/drivers

[PATCH] drm/amd/pm: Update data types used for uapi i/f

2024-11-13 Thread Asad Kamal
Update member's data type in amdgpu_xcp_metrics from linux specific to the ones compatible to uapi interface Fixes: 155fa7ced39b ("drm/amd/pm: Add gpu_metrics_v1_6") Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 8 1 file changed, 4 i

[PATCH v2 1/2] drm/amd/pm: Add gpu_metrics_v1_7

2024-11-13 Thread Asad Kamal
Add new gpu_metrics_v1_7 to acquire xgmi link status, application counter and max vram bandwidth v2: Use gpu_metrics_v1_7 for SMU_v_13_0_6 (Lijo) Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- .../gpu/drm/amd/include/kgd_pp_interface.h| 110 ++ .../drm/amd/pm/swsmu

[PATCH v2 2/2] drm/amd/pm: Get xgmi link status for XGMI_v_6_4_0

2024-11-13 Thread Asad Kamal
Get XGMI_v_6_4_0 link status and populate it to metrics v1_7 for SMU_v_13_0_6 v2: Get link status register value for each soc from separate function (Lijo) Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 41 +++ drivers/gpu

[PATCH v3] drm/amdgpu: Add supported NPS modes node

2024-11-05 Thread Asad Kamal
Add sysfs node to show supported NPS mode for the partition configuration selected using xcp_config v2: Hide node if dynamic nps switch not supported v3: Fix removal of files in case of error Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 48

[PATCH v2] drm/amdgpu: Add supported NPS modes node

2024-11-05 Thread Asad Kamal
Add sysfs node to show supported NPS mode for the partition configuration selected using xcp_config v2: Hide node if dynamic nps switch not supported Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 41 + 1 file changed

[PATCH] drm/amdgpu: Add supported NPS modes node

2024-11-04 Thread Asad Kamal
Add sysfs node to show supported NPS mode Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 34 + 1 file changed, 34 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c index 83a16918ea76

[PATCH v2 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers

2024-10-09 Thread Asad Kamal
Update pmfw headers for smuv13.0.6 to version 0xE Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h b/drivers/gpu/drm/amd

[PATCH v2 2/2] drm/amd/pm: Fill pcie recov cntr to metrics 1.6

2024-10-09 Thread Asad Kamal
Fill pcie other end recovery counter to metrics 1.6 v2: Add separate function to check recovery counter support Signed-off-by: Asad Kamal --- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu

[PATCH 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers

2024-10-04 Thread Asad Kamal
Update pmfw headers for smuv13.0.6 to version 0xE Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h b/drivers/gpu/drm/amd

[PATCH 2/2] drm/amd/pm: Fill pcie recov cntr to metrics 1.6

2024-10-04 Thread Asad Kamal
Fill pcie other end recovery counter to metrics 1.6 Signed-off-by: Asad Kamal --- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c| 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm

[PATCH v2 4/4] drm/amdgpu: Add supported partition mode node

2024-09-24 Thread Asad Kamal
Add sysfs node to show supoorted partition modes across all NPS modes Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 48 +++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c b/drivers/gpu/drm

[PATCH v2 3/4] drm/amdgpu: Add sysfs nodes to get xcp details

2024-09-24 Thread Asad Kamal
//num_shared v2: Update node name as per spec Signed-off-by: Lijo Lazar Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c| 201 + drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h| 5 + 3 files changed, 208

[PATCH v2 2/4] drm/amdgpu: Add callback get xcp resource info

2024-09-24 Thread Asad Kamal
From: Lijo Lazar Add a callback interface to get the resource information of a partition mode. Presently the information has number of resources and number of entities sharing the resource. Add the implementation for aquavanjaram SOCs. Signed-off-by: Lijo Lazar Signed-off-by: Asad Kamal

[PATCH v2 1/4] drm/amd: Add helper to get partition config modes

2024-09-24 Thread Asad Kamal
From: Lijo Lazar Add helper to get supported/available partition config modes Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c| 40 drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h| 2 + drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 54 +

[PATCH v2 5/5] drm/amd/pm: Use metrics 1_6

2024-09-12 Thread Asad Kamal
Use metrics 1_6 to report activities per partition v2: Use separate per instance for different platforms, shared vcn handled by other fix Signed-off-by: Asad Kamal --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 78 ++- 1 file changed, 60 insertions(+), 18 deletions

[PATCH v2 2/5] drm/amd/pm: Use same metric table for APU

2024-09-12 Thread Asad Kamal
Use same metric table for APU and Non APU systems for smu_v_13_0_6 to get metric data based on newer pmfw versions v2: Use inline func to check for ubified metrics support Signed-off-by: Asad Kamal --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 102 ++ 1 file changed, 55

[PATCH v2 4/5] drm/amdgpu: Fix get each xcp macro

2024-09-12 Thread Asad Kamal
Fix get each xcp macro to loop over each partition correctly Fixes: 4bdca2057933 ("drm/amdgpu: Add utility functions for xcp") Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH v2 3/5] drm/amd/pm: Add gpu_metrics_v1_6

2024-09-12 Thread Asad Kamal
Add new gpu_metrics_v1_6 with activities per partition Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- .../gpu/drm/amd/include/kgd_pp_interface.h| 103 +- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c| 3 + 2 files changed, 105 insertions(+), 1 deletion(-) diff

[PATCH v2 1/5] drm/amd/pm: Update SMUv13.0.6 PMFW headers

2024-09-12 Thread Asad Kamal
Update PMFW interface headers for updated metrics table with gfx activity per xcd Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm

[PATCH] drm/amd/amdgpu: Add helper to get ip block valid

2024-09-11 Thread Asad Kamal
Add helper function to check if ip block is enabled Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 22 ++ 2 files changed, 24 insertions(+) diff --git a/drivers/gpu/drm

[PATCH] drm/amdgpu: Add flags to distinguish vf/pf/pt mode

2024-05-27 Thread Asad Kamal
Add extra flag definition for ids_flag field to distinguish between vf/pf/pt modes v2: Updated kms driver minor version & removed pf check as default is 0 Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- drivers/gpu/drm/amd/am

[PATCH 2/2] Revert "drm/amd/pm: Add gpu_metrics_v1_6"

2024-05-19 Thread Asad Kamal
Remove gpu_metrics_v1_6 temporarily until tool support is ready This reverts commit d24c43b1e3193415e28c4b1f3b2908ff88b28eb3. Signed-off-by: Asad Kamal --- .../gpu/drm/amd/include/kgd_pp_interface.h| 89 --- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c| 3 - 2 files

[PATCH 1/2] Revert "drm/amd/pm: Use gpu_metrics_v1_6 for SMUv13.0.6"

2024-05-19 Thread Asad Kamal
Remove gpu_metrics_v1_6 usage for SMUv13.0.6 temporarily and use gpu_metrics_v1_5 until tool support is ready for it. This reverts commit e6efb71ae640eada28f44cc97aa79e8ae4901e63. Signed-off-by: Asad Kamal --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 18 -- 1 file

[PATCH 2/2] drm/amd/pm: Use gpu_metrics_v1_6 for SMUv13.0.6

2024-05-13 Thread Asad Kamal
Use gpu_metrics_v1_6 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 | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13

[PATCH 1/2] drm/amd/pm: Add gpu_metrics_v1_6

2024-05-13 Thread Asad Kamal
Add new gpu_metrics_v1_6 to acquire accumulated throttler residencies Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- .../gpu/drm/amd/include/kgd_pp_interface.h| 89 +++ drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c| 3 + 2 files changed, 92 insertions(+) diff

[PATCH] drm/amd/amdgpu: Check tbo resource pointer

2024-05-02 Thread Asad Kamal
Validate tbo resource pointer, skip if NULL Signed-off-by: Asad Kamal Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 2/2] drm/amd/pm: Update uclk/sclk limit report format

2024-04-02 Thread Asad Kamal
Update max set uclk and sclk reporting format for smu_v_13_0_0 Signed-off-by: Asad Kamal --- .../gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu

[PATCH 1/2] drm/amd/pm: Report uclk and sclk limit

2024-04-02 Thread Asad Kamal
Report max set uclk and sclk for smu_v_13_0_6 Signed-off-by: Asad Kamal --- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu

[PATCH] drm/amd/pm: Report uclk and sclk limit

2024-04-02 Thread Asad Kamal
Report max set uclk and sclk for smu_v_13_0_6 Signed-off-by: Asad Kamal --- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu

[PATCH v2 2/2] drm/amd/pm: Use metric table for pcie speed/width

2024-03-15 Thread Asad Kamal
Report pcie link speed/width using metric table in case of one vf & if pmfw support is available, else report directly from registers in case of pf. Skip reporting it for other cases. v2: Skip multi-vf check(Lijo) Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/s

[PATCH v2 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers

2024-03-15 Thread Asad Kamal
Update PMFW interface headers for updated metrics table with pcie link speed and pcie link width Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc

[PATCH 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers

2024-03-14 Thread Asad Kamal
Update PMFW interface headers for updated metrics table with pcie link speed and pcie link width Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc

[PATCH 2/2] drm/amd/pm: Use metric table for pcie speed/width

2024-03-14 Thread Asad Kamal
Report pcie link speed/width using metric table in case of one vf & if pmfw support is available, else report directly from registers in case of pf. Skip reporting it for other cases. Signed-off-by: Asad Kamal --- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 14 +- 1

[PATCH] drm/amd/pm: Fix esm reg mask use to get pcie speed

2024-02-27 Thread Asad Kamal
werplay: add Arcturus support for gpu metrics export") Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c| 4 ++-- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 4 ++-- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_

[PATCH] drm/amd/pm: Skip reporting pcie width/speed on vfs

2024-02-27 Thread Asad Kamal
Skip reporting pcie link width/speed on vfs for smu_v13_0_6 & smu_v13_0_2 Signed-off-by: Asad Kamal Reviewed-by: Yang Wang --- .../gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 10 ++ .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 18 ++ 2 files changed, 16 insert

[PATCH 3/3] drm/amdgpu: Remove pcie bw sys entry

2024-02-16 Thread Asad Kamal
Remove pcie bw sys entry for asics not supporting such function Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/soc15.c | 1 - drivers/gpu/drm/amd/pm/amdgpu_pm.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 2/3] Revert "drm/amdgpu: Add pcie usage callback to nbio"

2024-02-16 Thread Asad Kamal
pcie usage is now handled by fw This reverts commit 8d759dc6644df4141a151293cb0e77fd8ca379ed. Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.h | 3 --- 2 files changed, 11 deletions(-) diff

[PATCH 1/3] Revert "drm/amdgpu: Add pci usage to nbio v7.9"

2024-02-16 Thread Asad Kamal
Remove implementation to get pcie usage for nbio v7.9 as pcie usage is handled by fw This reverts commit 59070fd9ccea58c3363d39f69c25fa98c71eb02f. Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c| 63 --- drivers/gpu/drm/amd

[PATCH] Revert "drm/amdgpu: Update irq disable flow during unload"

2024-01-08 Thread Asad Kamal
Re-evaluate the original workaround: commit f5c7e7797060 ("drm/amdgpu: Adjust removal control flow for smu v13_0_2") This reverts commit 2e8e792e6a51e8cb7f5f96148146b6525dbb9cef. Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 12 ++-- drivers/gpu/drm/

[PATCH] drm/amdgpu: Update irq disable flow during unload

2024-01-05 Thread Asad Kamal
In certain special cases, e.g device reset before module unload, irq gets disabled as part of reset sequence and won't get enabled back. Add special check to cover such scenarios Signed-off-by: Asad Kamal Suggested-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

[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

[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

[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 insert

[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

[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

[PATCH 2/2] drm/amd/pm: Fill pcie error counters for gpu v1_4

2023-11-14 Thread Asad Kamal
Fill PCIE error counters & instantaneous bandwidth in gpu metrics v1_4 for smu v_13_0_6 Signed-off-by: Asad Kamal Reviewed-by: Le Ma --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/s

[PATCH 1/2] drm/amd/pm: Update metric table for smu v13_0_6

2023-11-14 Thread Asad Kamal
Update pmfw metric table to include pcie instantaneous bandwidth & pcie error counters Signed-off-by: Asad Kamal Reviewed-by: Le Ma --- .../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/am

[PATCH 1/2] drm/amdgpu : Add hive ras recovery check

2023-10-16 Thread Asad Kamal
Add hive ras recovery check and propagate fatal error to aids of all sockets in the hive Signed-off-by: Asad Kamal Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 9 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h | 1 + drivers/gpu/drm

[PATCH 2/2] drm/amdgpu: update retry times for psp BL wait

2023-10-16 Thread Asad Kamal
Increase retry time for PSP BL wait, to compensate for longer time to set c2pmsg 35 ready bit during mode1 with RAS Signed-off-by: Asad Kamal Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH v2] drm/amdgpu: Expose ras version & schema info

2023-10-11 Thread Asad Kamal
Expose ras table version & schema info to sysfs v2: Updated schema to get poison support info from ras context, removed asic specific checks Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 51 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 3 +

[PATCH v3 2/3] drm/amd/pm: Add gpu_metrics_v1_4

2023-10-09 Thread Asad Kamal
Add new gpu_metrics_v1_4 to acquire XGMI data transfer, pcie bandwidth & Clock lock status v2: Add pcie error counter to gpu metric table v1_4 Signed-off-by: Asad Kamal --- .../gpu/drm/amd/include/kgd_pp_interface.h| 76 +++ drivers/gpu/drm/amd/pm/swsmu/smu_c

[PATCH v3 3/3] drm/amd/pm: Use gpu_metrics_v1_4 for SMUv13.0.6

2023-10-09 Thread Asad Kamal
Use gpu_metrics_v1_4 for SMUv13.0.6 to fill gpu metric info v3: Removed filling gpu metric instantaneous pcie bw Signed-off-by: Asad Kamal --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 65 --- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v3 1/3] drm/amd/pm: Update metric table for smu v13_0_6

2023-10-09 Thread Asad Kamal
Update pmfw metric table to include xgmi transfer data and pci instantaneous bandwidth for smu v13_0_6 v2: Updated metric table version v3: Removed inst pcie bw with alignment to metrics table version 8 Signed-off-by: Asad Kamal --- .../gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h

[PATCH] drm/amdgpu: Expose ras version & schema info

2023-10-06 Thread Asad Kamal
Expose ras table version & schema info to sysfs Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 58 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 11 + 2 files changed, 66 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/am

[PATCH v2 3/3] drm/amd/pm: Use gpu_metrics_v1_4 for SMUv13.0.6

2023-10-06 Thread Asad Kamal
Use gpu_metrics_v1_4 for SMUv13.0.6 to fill gpu metric info Signed-off-by: Asad Kamal --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 67 --- 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu

[PATCH v2 2/3] drm/amd/pm: Add gpu_metrics_v1_4

2023-10-06 Thread Asad Kamal
Add new gpu_metrics_v1_4 to acquire XGMI data transfer, pcie bandwidth & Clock lock status v2: Add pcie error counter to gpu metric table v1_4 Signed-off-by: Asad Kamal --- .../gpu/drm/amd/include/kgd_pp_interface.h| 76 +++ drivers/gpu/drm/amd/pm/swsmu/smu_c

[PATCH v2 1/3] drm/amd/pm: Update metric table for smu v13_0_6

2023-10-06 Thread Asad Kamal
Update pmfw metric table to include xgmi transfer data and pci instantaneous bandwidth for smu v13_0_6 v2: Updated metric table version Signed-off-by: Asad Kamal --- .../gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff

[PATCH] drm/amd/pm: Remove set df cstate for SMUv13.0.6

2023-09-28 Thread Asad Kamal
Remove set df cstate as disallow df state is not required for SMUv13.0.6 Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b

[PATCH v2] drm/amdkfd: Replace pr_err with dev_err

2023-08-26 Thread Asad Kamal
Replace pr_err with dev_err to show the bus-id of failing device with kfd queue errors Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 116 +++--- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- 2 files changed, 71

[PATCH] drm/amdkfd: Replace pr_err with dev_err

2023-08-25 Thread Asad Kamal
Replace pr_err with dev_err to show the bus-id of failing device with kfd queue errors Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 116 +++--- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- 2 files changed, 71

[PATCH v2] drm/amd/pm: Fix critical temp unit of SMU v13.0.6

2023-08-18 Thread Asad Kamal
Critical Temperature needs to be reported in millidegree Celsius. Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu

[PATCH] drm/amd/pm: Fix critical temp unit of SMU v13.0.6

2023-08-18 Thread Asad Kamal
Critical Temperature needs to be reported in millidegree Celsius. Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu

[PATCH v2 2/2] drm/amd/pm: Add critical temp for GC v9.4.3

2023-08-16 Thread Asad Kamal
Add critical temperature message support func for smu v13.0.6 and expose critical temperature as part of hw mon attributes for GC v9.4.3 v2: Added comment for pmfw version requirement & move the check to get_thermal_temperature_range function Signed-off-by: Asad Kamal Reviewed-by: Lijo L

[PATCH v2 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers

2023-08-16 Thread Asad Kamal
Update PMFW interface headers for updated metrics table and critical temperature message Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- .../amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 4 ++-- .../amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_ppsmc.h | 16 +++- 2 files changed, 17

[PATCH v3 2/2] drm/amd/pm: Update pci link speed for smu v13.0.6

2023-08-14 Thread Asad Kamal
Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v11_0.h | 1 - drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 1 - .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 7 ++- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 16 ++-- .../gpu/drm/amd/

[PATCH v3 1/2] drm/amd/pm: Update pci link width for smu v13.0.6

2023-08-14 Thread Asad Kamal
Update addresses of PCIE link width registers, & link width format used to populate gpu metrics table for smu v13.0.6 v2: Removed ESM register update v3: Updated patch subject and message Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 10 -

[PATCH v2 1/2] drm/amd/pm: Update pci link width format & correct address for pcie registers

2023-08-12 Thread Asad Kamal
1)Update addresses of PCIE link width registers for smu v13.0.6 2)Update PCIE link width format used to populate gpu metrics table for smu v13.0.6 v2: Removed ESM register update Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 10 -- 1 file changed

[PATCH v2 2/2] drm/amd/pm: Update pci link speed and speed format

2023-08-12 Thread Asad Kamal
1) Update pcie link speed for smu v13_0_6 from correct register 2) Populate gpu metric table with pcie link speed rather than gen for smu v13_0_0, smu v13_0_6 & smu v13_0_7 v2: Update ESM register address Used macro to convert pcie gen to speed Signed-off-by: Asad Kamal --- drivers/gpu

[PATCH] drm/amd/pm: Add vclk and dclk sysnode for GC 9.4.3

2023-08-09 Thread Asad Kamal
Expose sysfs vclck and dclk entries for GC version 9.4.3 Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c

[PATCH 2/2] drm/amdgpu: Add pci usage to nbio v7.9

2023-08-09 Thread Asad Kamal
Add implementation to get pcie usage for nbio v7.9. Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Shiwu Zhang --- drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c| 63 +++ drivers/gpu/drm/amd/amdgpu/soc15.c| 2 +- .../asic_reg/nbio

[PATCH 1/2] drm/amdgpu: Add pcie usage callback to nbio

2023-08-09 Thread Asad Kamal
Add a callback in nbio to get pcie usage Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Shiwu Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/drivers/gpu/drm/amd

[PATCH 3/3] drm/amd/pm: Fix SMUv13.0.6 throttle status report

2023-06-01 Thread Asad Kamal
From: Lijo Lazar Instead of accumulated counters, PMFW will pass the throttle reason along with throttle interrupt. Use that context information to report the exact reason for throttling. v2: Removed Dummy definition Signed-off-by: Asad Kamal Signed-off-by: Lijo Lazar Reviewed-by: Hawking

[PATCH 2/3] drm/amd/pm: Add throttle status in power context

2023-06-01 Thread Asad Kamal
From: Lijo Lazar Keep throttle status indicator in SMUv13 power context Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h b/drivers/gpu/drm/amd

[PATCH 1/3] drm/amd/pm: Update SMUv13.0.6 PMFW headers

2023-06-01 Thread Asad Kamal
From: Lijo Lazar Update PMFW interface headers to for new metrics table format and throttling information. v2: Added dummy definition for compilation error Signed-off-by: Lijo Lazar Signed-off-by: Asad Kamal Reviewed-by: Hawking Zhang --- .../inc/pmfw_if/smu13_driver_if_v13_0_6.h | 31

[PATCH] drm/amd/pm: add unique serial number support for smu_v13_0_6

2023-05-31 Thread Asad Kamal
From: Yang Wang add unique serial number support for smu_v13_0_6. (use aid0 serial number by default) Signed-off-by: Yang Wang Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 20 --- 1 file changed, 8 insertions(+), 12

[PATCH 3/3] drm/amd/pm: Add throttle status in power context

2023-05-31 Thread Asad Kamal
From: Lijo Lazar Keep throttle status indicator in SMUv13 power context Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h b/drivers/gpu/drm/amd

[PATCH 2/3] drm/amd/pm: Fix SMUv13.0.6 throttle status report

2023-05-31 Thread Asad Kamal
From: Lijo Lazar Instead of accumulated counters, PMFW will pass the throttle reason along with throttle interrupt. Use that context information to report the exact reason for throttling. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c |

[PATCH 1/3] drm/amd/pm: Update SMUv13.0.6 PMFW headers

2023-05-31 Thread Asad Kamal
From: Lijo Lazar Update PMFW interface headers to for new metrics table format and throttling information. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- .../inc/pmfw_if/smu13_driver_if_v13_0_6.h | 31 ++- .../pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 13 +-