drm/amd/swsmu: modify the gfx activity scaling
authorLi Ma <li.ma@amd.com>
Wed, 28 Feb 2024 09:36:28 +0000 (17:36 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Mar 2024 20:43:41 +0000 (15:43 -0500)
Add an if condition for gfx activity because the scaling has been changed after smu fw version 5d4600.
And remove a warning log.

Signed-off-by: Li Ma <li.ma@amd.com>
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 6.7.x
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c

index 4894f7ee737b41dd0e81503b5cb7f3fc1182a6e6..6dae5ad74ff081c4616304ada3a6af302cc21f87 100644 (file)
@@ -229,8 +229,6 @@ int smu_v14_0_check_fw_version(struct smu_context *smu)
                smu->smc_driver_if_version = SMU14_DRIVER_IF_VERSION_SMU_V14_0_2;
                break;
        case IP_VERSION(14, 0, 0):
-               if ((smu->smc_fw_version < 0x5d3a00))
-                       dev_warn(smu->adev->dev, "The PMFW version(%x) is behind in this BIOS!\n", smu->smc_fw_version);
                smu->smc_driver_if_version = SMU14_DRIVER_IF_VERSION_SMU_V14_0_0;
                break;
        default:
index 47fdbae4adfc0207f628c8e2e156703b960e5829..9310c4758e38ce9791ba8d61ce61a2face051fe8 100644 (file)
@@ -261,7 +261,10 @@ static int smu_v14_0_0_get_smu_metrics_data(struct smu_context *smu,
                *value = metrics->MpipuclkFrequency;
                break;
        case METRICS_AVERAGE_GFXACTIVITY:
-               *value = metrics->GfxActivity / 100;
+               if ((smu->smc_fw_version > 0x5d4600))
+                       *value = metrics->GfxActivity;
+               else
+                       *value = metrics->GfxActivity / 100;
                break;
        case METRICS_AVERAGE_VCNACTIVITY:
                *value = metrics->VcnActivity / 100;