diff options
-rw-r--r-- | src/sna/sna_accel.c | 7 | ||||
-rw-r--r-- | src/sna/sna_display.c | 5 | ||||
-rw-r--r-- | src/sna/sna_driver.c | 3 |
3 files changed, 9 insertions, 6 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 192d8439..0e9f47e5 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -12292,7 +12292,12 @@ sna_accel_flush_callback(CallbackListPtr *list, static struct sna_pixmap *sna_accel_scanout(struct sna *sna) { - struct sna_pixmap *priv = sna_pixmap(sna->front); + struct sna_pixmap *priv; + + if (sna->vblank_interval == 0) + return NULL; + + priv = sna_pixmap(sna->front); return priv && priv->gpu_bo ? priv : NULL; } diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 1c808d1e..9140caf7 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -821,9 +821,10 @@ static void update_flush_interval(struct sna *sna) } if (max_vrefresh == 0) - max_vrefresh = 40; + sna->vblank_interval = 0; + else + sna->vblank_interval = 1000 / max_vrefresh; /* Hz -> ms */ - sna->vblank_interval = 1000 / max_vrefresh; /* Hz -> ms */ DBG(("max_vrefresh=%d, vblank_interval=%d ms\n", max_vrefresh, sna->vblank_interval)); } diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index 484c982e..0bb5c408 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -499,9 +499,6 @@ 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 75 Hz */ - sna->vblank_interval = 1000 * 1000 * 1000 / 75; - sna->flags = 0; if (!xf86ReturnOptValBool(sna->Options, OPTION_THROTTLE, TRUE)) sna->flags |= SNA_NO_THROTTLE; |