drm/radeon: disable the GRPH block when we disable the crtc
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Aug 2013 18:44:15 +0000 (14:44 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 30 Aug 2013 20:31:04 +0000 (16:31 -0400)
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: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/atombios_crtc.c

index b9d3b43f19c0ed097f43ab3afef3f4b79d17152a..bf87f6d435f81ed4f482bbc99dfeb220fdc6d8dd 100644 (file)
@@ -1910,6 +1910,12 @@ static void atombios_crtc_disable(struct drm_crtc *crtc)
        int i;
 
        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))
                atombios_powergate_crtc(crtc, ATOM_ENABLE);