Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/pm: Make static table support conditional

Add PMFW version check for static table support on SMU v13.0.6 VFs.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Lijo Lazar and committed by
Alex Deucher
1c2efae2 58364f01

+21 -7
+21 -7
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
··· 402 402 if ((pgm == 7 && fw_ver >= 0x7550E00) || 403 403 (pgm == 0 && fw_ver >= 0x00557E00)) 404 404 smu_v13_0_6_cap_set(smu, SMU_CAP(HST_LIMIT_METRICS)); 405 - if ((pgm == 0 && fw_ver >= 0x00557F01) || 406 - (pgm == 7 && fw_ver >= 0x7551000)) { 407 - smu_v13_0_6_cap_set(smu, SMU_CAP(STATIC_METRICS)); 408 - smu_v13_0_6_cap_set(smu, SMU_CAP(BOARD_VOLTAGE)); 405 + 406 + if (amdgpu_sriov_vf(adev)) { 407 + if ((pgm == 0 && fw_ver >= 0x00558000) || 408 + (pgm == 7 && fw_ver >= 0x7551000)) { 409 + smu_v13_0_6_cap_set(smu, 410 + SMU_CAP(STATIC_METRICS)); 411 + smu_v13_0_6_cap_set(smu, 412 + SMU_CAP(BOARD_VOLTAGE)); 413 + smu_v13_0_6_cap_set(smu, SMU_CAP(PLDM_VERSION)); 414 + } 415 + } else { 416 + if ((pgm == 0 && fw_ver >= 0x00557F01) || 417 + (pgm == 7 && fw_ver >= 0x7551000)) { 418 + smu_v13_0_6_cap_set(smu, 419 + SMU_CAP(STATIC_METRICS)); 420 + smu_v13_0_6_cap_set(smu, 421 + SMU_CAP(BOARD_VOLTAGE)); 422 + } 423 + if ((pgm == 0 && fw_ver >= 0x00558000) || 424 + (pgm == 7 && fw_ver >= 0x7551000)) 425 + smu_v13_0_6_cap_set(smu, SMU_CAP(PLDM_VERSION)); 409 426 } 410 - if ((pgm == 0 && fw_ver >= 0x00558000) || 411 - (pgm == 7 && fw_ver >= 0x7551000)) 412 - smu_v13_0_6_cap_set(smu, SMU_CAP(PLDM_VERSION)); 413 427 } 414 428 if (((pgm == 7) && (fw_ver >= 0x7550700)) || 415 429 ((pgm == 0) && (fw_ver >= 0x00557900)) ||