mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-07 02:19:54 +00:00
drm/radeon/dce6: fix display powergating
commit 0e3d50bfcb upstream.
Only enable it when we disable the display rather than
at DPMS time since enabling it requires a full modeset
to restore the display state. Fixes blank screens in
certain cases.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4cd669a497
commit
f0a3cdd0db
@@ -252,8 +252,6 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode)
|
|||||||
radeon_crtc->enabled = true;
|
radeon_crtc->enabled = true;
|
||||||
/* adjust pm to dpms changes BEFORE enabling crtcs */
|
/* adjust pm to dpms changes BEFORE enabling crtcs */
|
||||||
radeon_pm_compute_clocks(rdev);
|
radeon_pm_compute_clocks(rdev);
|
||||||
if (ASIC_IS_DCE6(rdev) && !radeon_crtc->in_mode_set)
|
|
||||||
atombios_powergate_crtc(crtc, ATOM_DISABLE);
|
|
||||||
atombios_enable_crtc(crtc, ATOM_ENABLE);
|
atombios_enable_crtc(crtc, ATOM_ENABLE);
|
||||||
if (ASIC_IS_DCE3(rdev) && !ASIC_IS_DCE6(rdev))
|
if (ASIC_IS_DCE3(rdev) && !ASIC_IS_DCE6(rdev))
|
||||||
atombios_enable_crtc_memreq(crtc, ATOM_ENABLE);
|
atombios_enable_crtc_memreq(crtc, ATOM_ENABLE);
|
||||||
@@ -271,8 +269,6 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode)
|
|||||||
atombios_enable_crtc_memreq(crtc, ATOM_DISABLE);
|
atombios_enable_crtc_memreq(crtc, ATOM_DISABLE);
|
||||||
atombios_enable_crtc(crtc, ATOM_DISABLE);
|
atombios_enable_crtc(crtc, ATOM_DISABLE);
|
||||||
radeon_crtc->enabled = false;
|
radeon_crtc->enabled = false;
|
||||||
if (ASIC_IS_DCE6(rdev) && !radeon_crtc->in_mode_set)
|
|
||||||
atombios_powergate_crtc(crtc, ATOM_ENABLE);
|
|
||||||
/* adjust pm to dpms changes AFTER disabling crtcs */
|
/* adjust pm to dpms changes AFTER disabling crtcs */
|
||||||
radeon_pm_compute_clocks(rdev);
|
radeon_pm_compute_clocks(rdev);
|
||||||
break;
|
break;
|
||||||
@@ -1844,6 +1840,8 @@ static void atombios_crtc_disable(struct drm_crtc *crtc)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
|
atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
|
||||||
|
if (ASIC_IS_DCE6(rdev))
|
||||||
|
atombios_powergate_crtc(crtc, ATOM_ENABLE);
|
||||||
|
|
||||||
for (i = 0; i < rdev->num_crtc; i++) {
|
for (i = 0; i < rdev->num_crtc; i++) {
|
||||||
if (rdev->mode_info.crtcs[i] &&
|
if (rdev->mode_info.crtcs[i] &&
|
||||||
|
|||||||
Reference in New Issue
Block a user