summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2009-04-06 11:31:20 -0700
committerCarl Worth <cworth@cworth.org>2009-04-06 11:38:38 -0700
commit3b29eb99259ea7b84bd41bff623b027dbe28ffba (patch)
tree0874c3cbdc228d4036c9aa6566b71f5b4b0ed960
parent5dd2777ce836bdf55b53ed763728705d4d686673 (diff)
Remove support for 'auto'(-1) value of XV_SYNC_TO_VBLANK
We previously had a heurstic here where we would only sync to vblank for windows that covered more than 25% of the screen. We don't need this anymore since the new approach to sync, (WAIT_FOR_SCANLINE_WINDOW), is not excessively costly for small windows. (cherry picked from commit 3d4ee3cac1d63dfdf7b54c8ba577f3b77637499f)
-rw-r--r--man/intel.man9
-rw-r--r--src/i830_video.c19
2 files changed, 6 insertions, 22 deletions
diff --git a/man/intel.man b/man/intel.man
index ffe69a12..6ccacda1 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -451,10 +451,11 @@ You can use the "xvattr" tool to query/set those attributes at runtime.
.SS "XV_SYNC_TO_VBLANK"
XV_SYNC_TO_VBLANK is used to control whether textured adapter synchronizes
-the screen update to the vblank to eliminate tearing. It has three
-values 'auto'(-1), 'off'(0) and 'on(1). 'off' means never sync, 'on' means
-always sync, no matter what size, and 'auto' means sync if the Xv image is
-more than quarter of the pixels on the screen. The default is 'auto'(-1).
+the screen update to the vblank to eliminate tearing. It is a Boolean
+attribute with values of 0 (never sync) or 1 (always sync). An historic
+value of -1 (sync for large windows only) will now be interpreted as 1,
+(since the current approach for sync is not costly even with small
+video windows).
.SS "XV_BRIGHTNESS"
diff --git a/src/i830_video.c b/src/i830_video.c
index 3dde5b4d..3331dd30 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -1019,7 +1019,7 @@ I830SetupImageVideoTextured(ScreenPtr pScreen)
pPriv->doubleBuffer = 0;
pPriv->rotation = RR_Rotate_0;
- pPriv->SyncToVblank = -1;
+ pPriv->SyncToVblank = 1;
/* gotta uninit this someplace, XXX: shouldn't be necessary for textured */
REGION_NULL(pScreen, &pPriv->clip);
@@ -2513,23 +2513,6 @@ I830PutImage(ScrnInfoPtr pScrn,
sync = FALSE;
} else if (pPriv->SyncToVblank == 0) {
sync = FALSE;
- } else if (pPriv->SyncToVblank == -1) {
- BoxRec crtc_box;
- BoxPtr pbox;
- int nbox, crtc_area, coverage = 0;
-
- i830_crtc_box(crtc, &crtc_box);
- crtc_area = i830_box_area(&crtc_box);
- pbox = REGION_RECTS(clipBoxes);
- nbox = REGION_NUM_RECTS(clipBoxes);
-
- while (nbox--) {
- coverage += i830_box_area(pbox);
- pbox++;
- }
-
- if ((coverage << 2) < crtc_area)
- sync = FALSE;
}
if (sync) {