All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Jackson <ajax@redhat.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/2] dri2: Fix interlace computation
Date: Mon,  3 Jan 2011 17:52:27 -0500	[thread overview]
Message-ID: <1294095147-21017-2-git-send-email-ajax@redhat.com> (raw)
In-Reply-To: <1294095147-21017-1-git-send-email-ajax@redhat.com>

scrn->currentMode is a hack for xf86vidmode and in general is wrong for
RANDRful drivers.  Use the mode on the associated CRTC instead.

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
 src/intel_dri.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

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;
-- 
1.7.3.4

  reply	other threads:[~2011-01-03 22:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-03 22:52 [PATCH 1/2] xv: Fix interlace computation Adam Jackson
2011-01-03 22:52 ` Adam Jackson [this message]
2011-01-03 23:13   ` [PATCH 2/2] dri2: " Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1294095147-21017-2-git-send-email-ajax@redhat.com \
    --to=ajax@redhat.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.