diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-31 09:20:54 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-31 09:22:43 +0000 |
commit | 9c399c74adc5e5bc7d425382a74d84315d2cef02 (patch) | |
tree | dec6f527ba4b747f102fedd9113ba02eead4187d /src | |
parent | c8860ce26eaa8f9e876af2354d61c35338076ac8 (diff) |
sna: Add an option to disable the delayed flush
Section "Device"
Option "DelayedFlush" "False"
EndSection
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna.h | 3 | ||||
-rw-r--r-- | src/sna/sna_accel.c | 3 | ||||
-rw-r--r-- | src/sna/sna_driver.c | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/sna/sna.h b/src/sna/sna.h index ae161a2a..4ed3fb88 100644 --- a/src/sna/sna.h +++ b/src/sna/sna.h @@ -192,6 +192,8 @@ enum { OPTION_RELAXED_FENCING, OPTION_VMAP, OPTION_ZAPHOD, + OPTION_DELAYED_FLUSH, + NUM_OPTIONS }; enum { @@ -205,6 +207,7 @@ struct sna { unsigned flags; #define SNA_NO_THROTTLE 0x1 +#define SNA_NO_DELAYED_FLUSH 0x2 int timer[NUM_TIMERS]; int timer_active; diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 0b04db86..f6095b5e 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -5995,6 +5995,9 @@ static Bool sna_accel_do_flush(struct sna *sna) return FALSE; } + if (sna->flags & SNA_NO_DELAYED_FLUSH) + return TRUE; + if (sna->timer[FLUSH_TIMER] == -1) return TRUE; diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index 3e3f65cd..46ca5ce8 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -91,6 +91,7 @@ static OptionInfoRec sna_options[] = { {OPTION_RELAXED_FENCING, "UseRelaxedFencing", OPTV_BOOLEAN, {0}, TRUE}, {OPTION_VMAP, "UseVmap", OPTV_BOOLEAN, {0}, TRUE}, {OPTION_ZAPHOD, "ZaphodHeads", OPTV_STRING, {0}, FALSE}, + {OPTION_DELAYED_FLUSH, "DelayedFlush", OPTV_BOOLEAN, {0}, TRUE}, {-1, NULL, OPTV_NONE, {0}, FALSE} }; @@ -506,6 +507,8 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags) sna->flags = 0; if (!xf86ReturnOptValBool(sna->Options, OPTION_THROTTLE, TRUE)) sna->flags |= SNA_NO_THROTTLE; + if (!xf86ReturnOptValBool(sna->Options, OPTION_DELAYED_FLUSH, TRUE)) + sna->flags |= SNA_NO_DELAYED_FLUSH; xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "Framebuffer %s\n", sna->tiling & SNA_TILING_FB ? "tiled" : "linear"); @@ -515,6 +518,8 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags) sna->tiling & SNA_TILING_3D ? "tiled" : "linear"); xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "Throttling %sabled\n", sna->flags & SNA_NO_THROTTLE ? "dis" : "en"); + xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "Delayed flush %sabled\n", + sna->flags & SNA_NO_DELAYED_FLUSH ? "dis" : "en"); if (!sna_mode_pre_init(scrn, sna)) { PreInitCleanup(scrn); |