diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-12-19 13:59:46 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-12-24 17:56:19 -0500 |
commit | 902084278b96a8ac6b541152130f5d7a4cd307b5 (patch) | |
tree | 12b62d9c575f4019bd5ce4db0576108e2c51deca /drivers/gpu/drm/radeon/ci_dpm.c | |
parent | 963c115dae332b7c1c030a13f472143f8983dffc (diff) |
drm/radeon/dpm: add late_enable for CI
Make sure interrupts are enabled
before we enable thermal interrupts.
Also, don't powergate uvd until after
the ring tests.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/ci_dpm.c')
-rw-r--r-- | drivers/gpu/drm/radeon/ci_dpm.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c index f891fc05e11..13ee5af3437 100644 --- a/drivers/gpu/drm/radeon/ci_dpm.c +++ b/drivers/gpu/drm/radeon/ci_dpm.c @@ -4685,6 +4685,35 @@ int ci_dpm_enable(struct radeon_device *rdev) return 0; } +int ci_dpm_late_enable(struct radeon_device *rdev) +{ + int ret; + + if (rdev->irq.installed && + r600_is_internal_thermal_sensor(rdev->pm.int_thermal_type)) { +#if 0 + PPSMC_Result result; +#endif + ret = ci_set_thermal_temperature_range(rdev, R600_TEMP_RANGE_MIN, R600_TEMP_RANGE_MAX); + if (ret) { + DRM_ERROR("ci_set_thermal_temperature_range failed\n"); + return ret; + } + rdev->irq.dpm_thermal = true; + radeon_irq_set(rdev); +#if 0 + result = ci_send_msg_to_smc(rdev, PPSMC_MSG_EnableThermalInterrupt); + + if (result != PPSMC_Result_OK) + DRM_DEBUG_KMS("Could not enable thermal interrupts.\n"); +#endif + } + + ci_dpm_powergate_uvd(rdev, true); + + return 0; +} + void ci_dpm_disable(struct radeon_device *rdev) { struct ci_power_info *pi = ci_get_pi(rdev); |