Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac4d04d4 authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/radeon: disable the GRPH block when we disable the crtc



Since we aren't using it when the crtc is disabled, turn it off
to save power.  The GRPH block is the part of the display
controller that controls the primary graphics plane (size,
address, etc.).

Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d1e3b556
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -1910,6 +1910,12 @@ 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);
	/* disable the GRPH */
	if (ASIC_IS_DCE4(rdev))
		WREG32(EVERGREEN_GRPH_ENABLE + radeon_crtc->crtc_offset, 0);
	else if (ASIC_IS_AVIVO(rdev))
		WREG32(AVIVO_D1GRPH_ENABLE + radeon_crtc->crtc_offset, 0);

	if (ASIC_IS_DCE6(rdev))
	if (ASIC_IS_DCE6(rdev))
		atombios_powergate_crtc(crtc, ATOM_ENABLE);
		atombios_powergate_crtc(crtc, ATOM_ENABLE);