summaryrefslogtreecommitdiff
path: root/src/sna/sna_driver.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-10-31 12:10:52 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-10-31 12:31:23 +0000
commit59535d0e1c587cfe9249ab1baf9acf8470b49b8b (patch)
tree6c0d6064fdf5a0441cfe125f07c938ff40d13c6a /src/sna/sna_driver.c
parent9a2e59bfba6748325918f895b3e58351c7eb4baa (diff)
sna: Set the flush interval based on output vrefresh
Rather than a blank 25Hz, use twice the vblank interval to hopefully avoid bad values. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_driver.c')
-rw-r--r--src/sna/sna_driver.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 46ca5ce8..0df7ca0c 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -504,6 +504,9 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags)
if (xf86ReturnOptValBool(sna->Options, OPTION_TILING_FB, FALSE))
sna->tiling &= ~SNA_TILING_FB;
+ /* Default fail-safe value of 25 Hz */
+ sna->flush_interval = 40 * 1000 * 1000;
+
sna->flags = 0;
if (!xf86ReturnOptValBool(sna->Options, OPTION_THROTTLE, TRUE))
sna->flags |= SNA_NO_THROTTLE;