[PATCH xf86-video-amdgpu 1/2] Call drmmode_do_crtc_dpms from drmmode_crtc_dpms as well

Leo Li sunpeng.li at amd.com
Thu May 24 13:32:23 UTC 2018



On 2018-05-18 06:33 AM, Michel Dänzer wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
> 
> Leo pointed out that drmmode_do_crtc_dpms wasn't getting called when
> turning off an output with
> 
>   xrandr --output <output> --off
> 
> This meant that the vblank sequence number and timestamp wouldn't be
> saved before turning off the CRTC in this case.
> 
> Reported-by: Leo (Sunpeng) Li <sunpeng.li at amd.com>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Series is
Reviewed-by: Leo (Sunpeng) Li <sunpeng.li at amd.com>

> ---
>   src/drmmode_display.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index 0ee89961a..5d4627810 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -342,8 +342,7 @@ drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode)
>   
>   	/* Disable unused CRTCs and enable/disable active CRTCs */
>   	if (!crtc->enabled || mode != DPMSModeOn) {
> -		drmmode_crtc_wait_pending_event(drmmode_crtc, pAMDGPUEnt->fd,
> -						drmmode_crtc->flip_pending);
> +		drmmode_do_crtc_dpms(crtc, DPMSModeOff);
>   		drmModeSetCrtc(pAMDGPUEnt->fd, drmmode_crtc->mode_crtc->crtc_id,
>   			       0, 0, 0, NULL, 0, NULL);
>   		drmmode_fb_reference(pAMDGPUEnt->fd, &drmmode_crtc->fb, NULL);
> 


More information about the amd-gfx mailing list