drm/amd/powerplay: suppress nonsupport profile mode overrun message
authorPrike Liang <Prike.Liang@amd.com>
Thu, 19 Dec 2019 06:17:47 +0000 (14:17 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Feb 2020 16:51:22 +0000 (11:51 -0500)
SMU12 not support WORKLOAD_DEFAULT_BIT and WORKLOAD_PPLIB_POWER_SAVING_BIT.

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/renoir_ppt.c

index 861e6410363bc764b68d6f62721854b78436f25f..810994017f499ed368c3e64d41a60475c73d81b0 100644 (file)
@@ -672,14 +672,18 @@ static int renoir_set_power_profile_mode(struct smu_context *smu, long *input, u
        /* conv PP_SMC_POWER_PROFILE* to WORKLOAD_PPLIB_*_BIT */
        workload_type = smu_workload_get_type(smu, smu->power_profile_mode);
        if (workload_type < 0) {
-               pr_err("Unsupported power profile mode %d on RENOIR\n",smu->power_profile_mode);
+               /*
+                * TODO: If some case need switch to powersave/default power mode
+                * then can consider enter WORKLOAD_COMPUTE/WORKLOAD_CUSTOM for power saving.
+                */
+               pr_err_once("Unsupported power profile mode %d on RENOIR\n",smu->power_profile_mode);
                return -EINVAL;
        }
 
        ret = smu_send_smc_msg_with_param(smu, SMU_MSG_SetWorkloadMask,
                                    1 << workload_type);
        if (ret) {
-               pr_err("Fail to set workload type %d\n", workload_type);
+               pr_err_once("Fail to set workload type %d\n", workload_type);
                return ret;
        }