[PATCH] Do not try to enable already enabled CRTCs in DPMS hook

Michel Dänzer michel at daenzer.net
Mon Jul 6 19:22:43 PDT 2015


On 07.07.2015 02:57, Piotr Redlewski wrote:
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91227
> 
> Signed-off-by: Piotr Redlewski <predlewski at gmail.com>
> ---
>  src/drmmode_display.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index 4291f4d..8483909 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -346,14 +346,12 @@ drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode)
>  	drmmode_ptr drmmode = drmmode_crtc->drmmode;
>  
>  	/* Disable unused CRTCs */
> -	if (!crtc->enabled || mode != DPMSModeOn) {
> +	if (!crtc->enabled || mode != DPMSModeOn)
>  		drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
>  			       0, 0, 0, NULL, 0, NULL);
> -		return;
> -	}
> -
> -	crtc->funcs->set_mode_major(crtc, &crtc->mode, crtc->rotation,
> -				    crtc->x, crtc->y);
> +	else if (drmmode_crtc->dpms_mode != DPMSModeOn)
> +		crtc->funcs->set_mode_major(crtc, &crtc->mode, crtc->rotation,
> +					    crtc->x, crtc->y);
>  }
>  
>  static PixmapPtr
> 

Reviewed and pushed. Thank you for taking responsibility for your code!


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-driver-ati mailing list