]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/radeon/dpm: implement UVD powergating for CI
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Aug 2013 14:05:24 +0000 (10:05 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 30 Aug 2013 20:30:36 +0000 (16:30 -0400)
Disable the UVD block when not in use to save power.
The block is not actually powergated on CI, but we
switch between UVD DPM (where the uvd clocks are
adjusted on demand) and clocks off.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/ci_dpm.c
drivers/gpu/drm/radeon/radeon_asic.c
drivers/gpu/drm/radeon/radeon_asic.h

index 6e3d387a7388ec8180541ff9a390cc7c43fa859b..e4d9d50ce9085fe7144ecb95a2b4e01a422fa7ca 100644 (file)
@@ -677,7 +677,7 @@ static int ci_power_control_set_level(struct radeon_device *rdev)
        return ret;
 }
 
-static void ci_dpm_powergate_uvd(struct radeon_device *rdev, bool gate)
+void ci_dpm_powergate_uvd(struct radeon_device *rdev, bool gate)
 {
        ci_update_uvd_dpm(rdev, gate);
 }
@@ -4674,11 +4674,6 @@ int ci_dpm_set_power_state(struct radeon_device *rdev)
                return ret;
        }
 #endif
-       ret = ci_update_uvd_dpm(rdev, false);
-       if (ret) {
-               DRM_ERROR("ci_update_uvd_dpm failed\n");
-               return ret;
-       }
        ret = ci_update_sclk_t(rdev);
        if (ret) {
                DRM_ERROR("ci_update_sclk_t failed\n");
index 63b6aae66236b840a53a087310f3557cceed7ac7..61c06449b31a48e29600b88815e8e8b3b34e57a4 100644 (file)
@@ -2470,6 +2470,7 @@ static struct radeon_asic ci_asic = {
                .debugfs_print_current_performance_level = &ci_dpm_debugfs_print_current_performance_level,
                .force_performance_level = &ci_dpm_force_performance_level,
                .vblank_too_short = &ci_dpm_vblank_too_short,
+               .powergate_uvd = &ci_dpm_powergate_uvd,
        },
        .pflip = {
                .pre_page_flip = &evergreen_pre_page_flip,
index 9060757e4dc1008002cd6835215cb1964027f612..5630291c4b06b733e254a653e2ce81453fbd22dd 100644 (file)
@@ -766,6 +766,7 @@ void ci_dpm_debugfs_print_current_performance_level(struct radeon_device *rdev,
 int ci_dpm_force_performance_level(struct radeon_device *rdev,
                                   enum radeon_dpm_forced_level level);
 bool ci_dpm_vblank_too_short(struct radeon_device *rdev);
+void ci_dpm_powergate_uvd(struct radeon_device *rdev, bool gate);
 
 int kv_dpm_init(struct radeon_device *rdev);
 int kv_dpm_enable(struct radeon_device *rdev);