From patchwork Mon Jan 3 22:52:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Jackson X-Patchwork-Id: 449181 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p03MsgAH004667 for ; Mon, 3 Jan 2011 22:55:19 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E2B189EEA1 for ; Mon, 3 Jan 2011 14:54:41 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTP id 80F859EDD7 for ; Mon, 3 Jan 2011 14:52:29 -0800 (PST) Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p03MqSfu031941 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 3 Jan 2011 17:52:29 -0500 Received: from ihatethathostname.lab.bos.redhat.com (ihatethathostname.lab.bos.redhat.com [10.16.43.238]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p03MqRrD003204 for ; Mon, 3 Jan 2011 17:52:28 -0500 From: Adam Jackson To: intel-gfx@lists.freedesktop.org Date: Mon, 3 Jan 2011 17:52:27 -0500 Message-Id: <1294095147-21017-2-git-send-email-ajax@redhat.com> In-Reply-To: <1294095147-21017-1-git-send-email-ajax@redhat.com> References: <1294095147-21017-1-git-send-email-ajax@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Subject: [Intel-gfx] [PATCH 2/2] dri2: Fix interlace computation X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 03 Jan 2011 22:55:59 +0000 (UTC) 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;