summaryrefslogtreecommitdiff
path: root/src/radeon_kms.c
diff options
context:
space:
mode:
authorMario Kleiner <mario.kleiner@tuebingen.mpg.de>2010-11-22 04:11:07 +0100
committerAlex Deucher <alexdeucher@gmail.com>2010-12-01 20:30:36 -0500
commit122536ee0aeb1eef1a9d80d5e464dcb423dc2837 (patch)
tree23da02481fa061939261b30f42a8a4f4eb35444f /src/radeon_kms.c
parent0de680730294bd623f6b3e189faa7b88a09d3a2a (diff)
ddx/ati: Add option "SwapbuffersWait" to control vsync of DRI2 swaps.
A new optional kms driver option "SwapbuffersWait" is defined for xorg.conf, which defaults to "on". If "on", DRI2 bufferswaps will be synchronized to vsync, otherwise not. This currently only affects copy-swaps, not pageflipped swaps. It also requires a swap_interval setting of zero by the OpenGL client. Ideally, we'd provide a way for dri2 to pass the current swap interval to the ddx so we could change this dynamically. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Diffstat (limited to 'src/radeon_kms.c')
-rw-r--r--src/radeon_kms.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 38467c07..59f82818 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -71,6 +71,7 @@ const OptionInfoRec RADEONOptions_KMS[] = {
{ OPTION_EXA_PIXMAPS, "EXAPixmaps", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_ZAPHOD_HEADS, "ZaphodHeads", OPTV_STRING, {0}, FALSE },
{ OPTION_PAGE_FLIP, "EnablePageFlip", OPTV_BOOLEAN, {0}, FALSE },
+ { OPTION_SWAPBUFFERS_WAIT,"SwapbuffersWait", OPTV_BOOLEAN, {0}, FALSE },
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};
@@ -628,6 +629,11 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
"KMS Pageflipping: %sabled\n", info->allowPageFlip ? "en" : "dis");
}
+ info->swapBuffersWait = xf86ReturnOptValBool(info->Options,
+ OPTION_SWAPBUFFERS_WAIT, TRUE);
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "SwapBuffers wait for vsync: %sabled\n", info->swapBuffersWait ? "en" : "dis");
+
if (drmmode_pre_init(pScrn, &info->drmmode, pScrn->bitsPerPixel / 8) == FALSE) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Kernel modesetting setup failed\n");
goto fail;