drm/amdgpu: check min clock set by DAL before set ps.
authorRex Zhu <Rex.Zhu@amd.com>
Wed, 12 Oct 2016 12:05:03 +0000 (20:05 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Oct 2016 18:38:49 +0000 (14:38 -0400)
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/ci_dpm.c

index 885f08c3f496fde3a3bf1e0ce76b38477b3f342b..68fe70eda5ada2d96355bef15250723f0da6eb6b 100644 (file)
@@ -960,6 +960,12 @@ static void ci_apply_state_adjust_rules(struct amdgpu_device *adev,
                sclk = ps->performance_levels[0].sclk;
        }
 
+       if (adev->pm.pm_display_cfg.min_core_set_clock > sclk)
+               sclk = adev->pm.pm_display_cfg.min_core_set_clock;
+
+       if (adev->pm.pm_display_cfg.min_mem_set_clock > mclk)
+               mclk = adev->pm.pm_display_cfg.min_mem_set_clock;
+
        if (rps->vce_active) {
                if (sclk < adev->pm.dpm.vce_states[adev->pm.dpm.vce_level].sclk)
                        sclk = adev->pm.dpm.vce_states[adev->pm.dpm.vce_level].sclk;