[PATCH xf86-video-amdgpu] Set drmmode_crtc->scanout_id = 0 when TearFree is disabled
Alex Deucher
alexdeucher at gmail.com
Tue Apr 24 18:26:31 UTC 2018
On Tue, Apr 24, 2018 at 12:58 PM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> When disabling TearFree, drmmode_crtc->scanout_id could remain as 1,
> but drmmode_set_mode_major would destroy drmmode_crtc->scanout[1], so
> scanout_do_update() would keep bailing, and the scanout buffer would
> stop being updated.
>
> Fixes freeze after disabling TearFree on a CRTC with active RandR
> rotation or other transform.
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> src/drmmode_display.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index 536890d18..793027d50 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -846,6 +846,8 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
> drmmode_crtc_update_tear_free(crtc);
> if (drmmode_crtc->tear_free)
> scanout_id = drmmode_crtc->scanout_id;
> + else
> + drmmode_crtc->scanout_id = 0;
>
> /* gamma is disabled in kernel driver for deep color */
> if (pScrn->depth != 30)
> --
> 2.17.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list