diff mbox

[2/2] dri2: Fix interlace computation

Message ID 1294095147-21017-2-git-send-email-ajax@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Adam Jackson Jan. 3, 2011, 10:52 p.m. UTC
None
diff mbox

Patch

diff --git a/src/intel_dri.c b/src/intel_dri.c
index 7096369..0e74b7d 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -433,8 +433,7 @@  I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
 
 	/* Wait for the scanline to be outside the region to be copied */
 	if (pixmap_is_scanout(get_drawable_pixmap(dst)) &&
-	    intel->swapbuffers_wait &&
-	    scrn->currentMode) {
+	    intel->swapbuffers_wait) {
 		BoxPtr box;
 		BoxRec crtcbox;
 		int y1, y2;
@@ -449,7 +448,7 @@  I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
 		 * Make sure the CRTC is valid and this is the real front
 		 * buffer
 		 */
-		if (crtc != NULL && !crtc->rotatedData) {
+		if (crtc != NULL && crtc->mode && !crtc->rotatedData) {
 			pipe = intel_crtc_to_pipe(crtc);
 
 			/*
@@ -485,7 +484,7 @@  I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
 				    event = MI_WAIT_FOR_PIPEB_SVBLANK;
 			}
 
-			if (scrn->currentMode->Flags & V_INTERLACE) {
+			if (crtc->mode->Flags & V_INTERLACE) {
 				/* DSL count field lines */
 				y1 /= 2;
 				y2 /= 2;