]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/pm: decouple the watermark table setting from socclk/uclk dpms
authorEvan Quan <evan.quan@amd.com>
Fri, 18 Sep 2020 08:39:13 +0000 (16:39 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 22 Sep 2020 21:37:38 +0000 (17:37 -0400)
As they have no real dependence. And for Navi1x, the socclk/uclk dpms
are enabled after DAL initialization.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

index 3612841d40dc9984931c834cc675e18b23d5661c..7859f1911a7233f9733b186b2f15b4db1fd6c743 100644 (file)
@@ -1818,17 +1818,16 @@ int smu_set_watermarks_for_clock_ranges(struct smu_context *smu,
        if (!smu->pm_enabled || !smu->adev->pm.dpm_enabled)
                return -EOPNOTSUPP;
 
+       if (smu->disable_watermark)
+               return 0;
+
        mutex_lock(&smu->mutex);
 
-       if (!smu->disable_watermark &&
-                       smu_feature_is_enabled(smu, SMU_FEATURE_DPM_DCEFCLK_BIT) &&
-                       smu_feature_is_enabled(smu, SMU_FEATURE_DPM_SOCCLK_BIT)) {
-               ret = smu_set_watermarks_table(smu, clock_ranges);
+       ret = smu_set_watermarks_table(smu, clock_ranges);
 
-               if (!(smu->watermarks_bitmap & WATERMARKS_EXIST)) {
-                       smu->watermarks_bitmap |= WATERMARKS_EXIST;
-                       smu->watermarks_bitmap &= ~WATERMARKS_LOADED;
-               }
+       if (!(smu->watermarks_bitmap & WATERMARKS_EXIST)) {
+               smu->watermarks_bitmap |= WATERMARKS_EXIST;
+               smu->watermarks_bitmap &= ~WATERMARKS_LOADED;
        }
 
        mutex_unlock(&smu->mutex);