[PATCH r128] Only enable CRTCs for DPMSModeOn

Alex Deucher alexdeucher at gmail.com
Mon Jul 7 07:45:17 PDT 2014


On Fri, Jul 4, 2014 at 9:45 PM, Connor Behan <connor.behan at gmail.com> wrote:
> This was suggested as a power saving tip.
>
> Signed-off-by: Connor Behan <connor.behan at gmail.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/r128_crtc.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/src/r128_crtc.c b/src/r128_crtc.c
> index 882f01f..9c3d0a9 100644
> --- a/src/r128_crtc.c
> +++ b/src/r128_crtc.c
> @@ -84,6 +84,20 @@ static void r128_crtc_dpms(xf86CrtcPtr crtc, int mode)
>          break;
>      }
>
> +    if (mode != DPMSModeOn) {
> +        if (r128_crtc->crtc_id) {
> +            OUTREGP(R128_CRTC2_GEN_CNTL, 0, ~R128_CRTC2_EN);
> +        } else {
> +            OUTREGP(R128_CRTC_GEN_CNTL, 0, ~R128_CRTC_EN);
> +        }
> +    } else {
> +        if (r128_crtc->crtc_id) {
> +            OUTREGP(R128_CRTC2_GEN_CNTL, R128_CRTC2_EN, ~R128_CRTC2_EN);
> +        } else {
> +            OUTREGP(R128_CRTC_GEN_CNTL, R128_CRTC_EN, ~R128_CRTC_EN);
> +        }
> +    }
> +
>      if (mode != DPMSModeOff)
>          r128_crtc_load_lut(crtc);
>  }
> --
> 2.0.0
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-driver-ati


More information about the xorg-driver-ati mailing list