From cd5369810899b0e3d2399a405ab2aa227b868686 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Thu, 5 May 2016 13:04:52 -0400 Subject: [PATCH] drm/radeon/dpm: force has_display for PX boards Force has_display on PX systems to make sure the smc pulls the clocks out of low when the GPU is busy. bug: https://bugs.freedesktop.org/show_bug.cgi?id=94708 Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/cypress_dpm.c | 7 ++++++- drivers/gpu/drm/radeon/si_dpm.c | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c index a4edd07..ea559c4 100644 --- a/drivers/gpu/drm/radeon/cypress_dpm.c +++ b/drivers/gpu/drm/radeon/cypress_dpm.c @@ -1743,6 +1743,8 @@ static void cypress_program_display_gap(struct radeon_device *rdev) { u32 tmp, pipe; int i; + bool has_display = (rdev->pm.dpm.new_active_crtc_count > 0) ? + true : false; tmp = RREG32(CG_DISPLAY_GAP_CNTL) & ~(DISP1_GAP_MASK | DISP2_GAP_MASK); if (rdev->pm.dpm.new_active_crtc_count > 0) @@ -1777,7 +1779,10 @@ static void cypress_program_display_gap(struct radeon_device *rdev) WREG32(DCCG_DISP_SLOW_SELECT_REG, tmp); } - cypress_notify_smc_display_change(rdev, rdev->pm.dpm.new_active_crtc_count > 0); + /* set has_display for PX */ + if (rdev->flags & RADEON_IS_PX) + has_display = true; + cypress_notify_smc_display_change(rdev, has_display); } void cypress_dpm_setup_asic(struct radeon_device *rdev) diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index af4df81..e145de9 100644 --- a/drivers/gpu/drm/radeon/si_dpm.c +++ b/drivers/gpu/drm/radeon/si_dpm.c @@ -3694,6 +3694,8 @@ static void si_program_display_gap(struct radeon_device *rdev) { u32 tmp, pipe; int i; + bool has_display = (rdev->pm.dpm.new_active_crtc_count > 0) ? + true : false; tmp = RREG32(CG_DISPLAY_GAP_CNTL) & ~(DISP1_GAP_MASK | DISP2_GAP_MASK); if (rdev->pm.dpm.new_active_crtc_count > 0) @@ -3732,7 +3734,10 @@ static void si_program_display_gap(struct radeon_device *rdev) * This can be a problem on PowerXpress systems or if you want to use the card * for offscreen rendering or compute if there are no crtcs enabled. */ - si_notify_smc_display_change(rdev, rdev->pm.dpm.new_active_crtc_count > 0); + /* set has_display for PX */ + if (rdev->flags & RADEON_IS_PX) + has_display = true; + si_notify_smc_display_change(rdev, has_display); } static void si_enable_spread_spectrum(struct radeon_device *rdev, bool enable) -- 2.5.5