diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-02-29 18:12:43 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-03-01 10:26:39 +0900 |
commit | a88985f5d1e39caca49ceb65678aaa9cb622a0d2 (patch) | |
tree | 5ae9561a456fc78b718a48844547d62967bd27c2 /src/radeon_kms.c | |
parent | f5d968cbba3c9b7ec202161f2157d8d64778c817 (diff) |
Deal with modesets and page flips crossing on a CRTC
If we set a mode while a flip is pending, the kernel driver may program
the flip to the hardware after the modeset. If that happens, the hardware
will display the BO from the flip, whereas we will assume it displays the
BO from the modeset. In other words, the display will most likely freeze,
at least until another modeset.
Prevent this condition by waiting for a pending flip to finish before
setting a mode.
Fixes display freezing when setting rotation or a transform with
TearFree enabled.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_kms.c')
-rw-r--r-- | src/radeon_kms.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 37689837..44fe71e1 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -483,6 +483,7 @@ radeon_scanout_flip_abort(xf86CrtcPtr crtc, void *event_data) drmmode_crtc_private_ptr drmmode_crtc = event_data; drmmode_crtc->scanout_update_pending = FALSE; + drmmode_crtc->flip_pending = FALSE; } static void @@ -523,6 +524,7 @@ radeon_scanout_flip(ScreenPtr pScreen, RADEONInfoPtr info, drmmode_crtc->scanout_id = scanout_id; drmmode_crtc->scanout_update_pending = TRUE; + drmmode_crtc->flip_pending = TRUE; } static void RADEONBlockHandler_KMS(BLOCKHANDLER_ARGS_DECL) |