summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2010-08-27 21:11:59 +0200
committerMaarten Maathuis <madman2003@gmail.com>2010-10-02 18:52:48 +0200
commit9a5142fae6e1a0a470352f511427916e6fa01b9c (patch)
treecc95093ce2866b365dbd6a029aaff019cf2aaa25
parentd5a6f103113985c50bbe749ed341de34af1b47a5 (diff)
downloadxorg-driver-xf86-video-nouveau-9a5142fae6e1a0a470352f511427916e6fa01b9c.tar.gz
nv50/exa: Stop using wfb by default, but add an option to enable it.
- Some scenarios, such as those heavy in core font rendering might prefer wfb. - Other (modern) situations are better of with wfb disabled. Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
-rw-r--r--man/nouveau.man3
-rw-r--r--src/drmmode_display.c2
-rw-r--r--src/nouveau_exa.c3
-rw-r--r--src/nv_const.h2
-rw-r--r--src/nv_driver.c5
5 files changed, 13 insertions, 2 deletions
diff --git a/man/nouveau.man b/man/nouveau.man
index cd66e9a..0e4c3a2 100644
--- a/man/nouveau.man
+++ b/man/nouveau.man
@@ -72,6 +72,9 @@ Disable or enable acceleration. Default: acceleration is enabled.
.TP
.BI "Option \*qShadowFB\*q \*q" boolean \*q
Enable or disable use of the shadow framebuffer layer. Default: off.
+.TP
+.BI "Option \*qWrappedFB\*q \*q" boolean \*q
+Enable or disable wfb, only affects nv50+. Useful for some legacy configurations where high rendering latency is perceived. Default: wfb is disabled.
.SH "SEE ALSO"
__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
.SH AUTHORS
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 011f4dd..08c71c0 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1024,7 +1024,7 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
if (scrn->virtualX == width && scrn->virtualY == height)
return TRUE;
- if (pNv->Architecture >= NV_ARCH_50 && pNv->wfb_enabled) {
+ if (pNv->Architecture >= NV_ARCH_50 && pNv->tiled_scanout) {
tile_mode = 4;
tile_flags = (scrn->bitsPerPixel == 16) ? 0x7000 : 0x7a00;
ah = NOUVEAU_ALIGN(height, 1 << (tile_mode + 2));
diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
index 3b2c9be..f2995be 100644
--- a/src/nouveau_exa.c
+++ b/src/nouveau_exa.c
@@ -284,7 +284,10 @@ static Bool
nouveau_exa_prepare_access(PixmapPtr ppix, int index)
{
struct nouveau_bo *bo = nouveau_pixmap_bo(ppix);
+ NVPtr pNv = NVPTR(xf86Screens[ppix->drawable.pScreen->myNum]);
+ if (nv50_style_tiled_pixmap(ppix) && !pNv->wfb_enabled)
+ return FALSE;
if (nouveau_bo_map(bo, NOUVEAU_BO_RDWR))
return FALSE;
ppix->devPrivate.ptr = bo->map;
diff --git a/src/nv_const.h b/src/nv_const.h
index 0df25b6..5e1bc50 100644
--- a/src/nv_const.h
+++ b/src/nv_const.h
@@ -13,6 +13,7 @@ typedef enum {
OPTION_NOACCEL,
OPTION_SHADOW_FB,
OPTION_VIDEO_KEY,
+ OPTION_WFB,
} NVOpts;
@@ -22,6 +23,7 @@ static const OptionInfoRec NVOptions[] = {
{ OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_SHADOW_FB, "ShadowFB", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_VIDEO_KEY, "VideoKey", OPTV_INTEGER, {0}, FALSE },
+ { OPTION_WFB, "WrappedFB", OPTV_BOOLEAN, {0}, FALSE },
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 8fd1fa4..b241ac7 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -775,7 +775,10 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
}
if (!pNv->NoAccel && pNv->Architecture >= NV_ARCH_50) {
- pNv->wfb_enabled = TRUE;
+ if (xf86ReturnOptValBool(pNv->Options, OPTION_WFB, FALSE))
+ pNv->wfb_enabled = TRUE;
+ else
+ pNv->wfb_enabled = FALSE; /* Default: use UTS/DFS all the time */
pNv->tiled_scanout = TRUE;
}