All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] xv: Fix interlace computation
@ 2011-01-03 22:52 Adam Jackson
  2011-01-03 22:52 ` [PATCH 2/2] dri2: " Adam Jackson
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Jackson @ 2011-01-03 22:52 UTC (permalink / raw)
  To: intel-gfx

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_video.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/intel_video.c b/src/intel_video.c
index cdff149..d086cbf 100644
--- a/src/intel_video.c
+++ b/src/intel_video.c
@@ -1348,7 +1348,7 @@ intel_wait_for_scanline(ScrnInfoPtr scrn, PixmapPtr pixmap,
 			event = MI_WAIT_FOR_PIPEB_SVBLANK;
 	}
 
-	if (scrn->currentMode->Flags & V_INTERLACE) {
+	if (crtc->mode && (crtc->mode->Flags & V_INTERLACE)) {
 		/* DSL count field lines */
 		y1 /= 2;
 		y2 /= 2;
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] dri2: Fix interlace computation
  2011-01-03 22:52 [PATCH 1/2] xv: Fix interlace computation Adam Jackson
@ 2011-01-03 22:52 ` Adam Jackson
  2011-01-03 23:13   ` Chris Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Jackson @ 2011-01-03 22:52 UTC (permalink / raw)
  To: intel-gfx

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] dri2: Fix interlace computation
  2011-01-03 22:52 ` [PATCH 2/2] dri2: " Adam Jackson
@ 2011-01-03 23:13   ` Chris Wilson
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2011-01-03 23:13 UTC (permalink / raw)
  To: Adam Jackson, intel-gfx

On Mon,  3 Jan 2011 17:52:27 -0500, Adam Jackson <ajax@redhat.com> wrote:
> scrn->currentMode is a hack for xf86vidmode and in general is wrong for
> RANDRful drivers.  Use the mode on the associated CRTC instead.

Thanks Adam, that looks much saner than scrn->currentMode.
Fixed up the Ptr/Rec confusion and pushed.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-03 23:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-03 22:52 [PATCH 1/2] xv: Fix interlace computation Adam Jackson
2011-01-03 22:52 ` [PATCH 2/2] dri2: " Adam Jackson
2011-01-03 23:13   ` Chris Wilson

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.