summaryrefslogtreecommitdiff
path: root/src/drmmode_display.h
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-02-29 18:12:43 +0900
committerMichel Dänzer <michel@daenzer.net>2016-03-01 10:26:39 +0900
commita88985f5d1e39caca49ceb65678aaa9cb622a0d2 (patch)
tree5ae9561a456fc78b718a48844547d62967bd27c2 /src/drmmode_display.h
parentf5d968cbba3c9b7ec202161f2157d8d64778c817 (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/drmmode_display.h')
-rw-r--r--src/drmmode_display.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/drmmode_display.h b/src/drmmode_display.h
index 99c6c917..c2957353 100644
--- a/src/drmmode_display.h
+++ b/src/drmmode_display.h
@@ -95,8 +95,12 @@ typedef struct {
uint16_t lut_r[256], lut_g[256], lut_b[256];
int prime_pixmap_x;
- /* Modeset needed for DPMS on */
+ /* Modeset needed (for DPMS on or after a page flip crossing with a
+ * modeset)
+ */
Bool need_modeset;
+ /* A flip is pending for this CRTC */
+ Bool flip_pending;
} drmmode_crtc_private_rec, *drmmode_crtc_private_ptr;
typedef struct {