From bae30856f2cb3884387ef347327af6ff00b75854 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Fri, 5 Dec 2008 08:15:59 +0100 Subject: Make VSync for EXA and Xv configurable --- src/radeon_exa_funcs.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/radeon_exa_funcs.c') diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c index fe487016..55710ff5 100644 --- a/src/radeon_exa_funcs.c +++ b/src/radeon_exa_funcs.c @@ -129,7 +129,7 @@ FUNC_NAME(RADEONSolid)(PixmapPtr pPix, int x1, int y1, int x2, int y2) TRACE; - FUNC_NAME(RADEONWaitForVLine)(pScrn, pPix, RADEONBiggerCrtcArea(pPix), y1, y2); + FUNC_NAME(RADEONWaitForVLine)(pScrn, pPix, RADEONBiggerCrtcArea(pPix), y1, y2, info->accel_state->vsync); BEGIN_ACCEL(2); OUT_ACCEL_REG(RADEON_DST_Y_X, (y1 << 16) | x1); @@ -230,7 +230,7 @@ FUNC_NAME(RADEONCopy)(PixmapPtr pDst, dstY += h - 1; } - FUNC_NAME(RADEONWaitForVLine)(pScrn, pDst, RADEONBiggerCrtcArea(pDst), dstY, dstY + h); + FUNC_NAME(RADEONWaitForVLine)(pScrn, pDst, RADEONBiggerCrtcArea(pDst), dstY, dstY + h, info->accel_state->vsync); BEGIN_ACCEL(3); @@ -289,7 +289,7 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, int x, int y, int w, int h, RADEON_SWITCH_TO_2D(); - FUNC_NAME(RADEONWaitForVLine)(pScrn, pDst, RADEONBiggerCrtcArea(pDst), y, y + h); + FUNC_NAME(RADEONWaitForVLine)(pScrn, pDst, RADEONBiggerCrtcArea(pDst), y, y + h, info->accel_state->vsync); while ((buf = RADEONHostDataBlit(pScrn, cpp, w, dst_pitch_off, &buf_pitch, @@ -612,6 +612,12 @@ Bool FUNC_NAME(RADEONDrawInit)(ScreenPtr pScreen) #endif info->accel_state->exa->maxY = 8192; + if (xf86ReturnOptValBool(info->Options, OPTION_EXA_VSYNC, FALSE)) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "EXA VSync enabled\n"); + info->accel_state->vsync = TRUE; + } else + info->accel_state->vsync = FALSE; + RADEONEngineInit(pScrn); if (!exaDriverInit(pScreen, info->accel_state->exa)) { -- cgit v1.2.3