summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-05-14 16:57:11 -0700
committerKeith Packard <keithp@keithp.com>2009-05-14 17:01:54 -0700
commit04772b6c09a88f0483c2a7efc48029967c77b9bc (patch)
tree31af57471a9075083d10173b62a85937daba80e7
parent128c1c3b7d57b157604788f82bf9fd389839068f (diff)
If DRM can't figure out which pipe to sync on, then don't sync at all.
Syncing to the wrong pipe can wedge the hardware if the exclusion area is larger than the vtotal Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--configure.ac2
-rw-r--r--src/i830_video.c42
2 files changed, 23 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac
index 8aef4cfe..028d17d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -130,7 +130,7 @@ if test "x$GCC" = "xyes"; then
-Wnested-externs -fno-strict-aliasing"
fi
-PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.6])
+PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.11])
AM_CONDITIONAL(DRI, test x$DRI = xyes)
if test "$DRI" = yes; then
PKG_CHECK_MODULES(DRI, [xf86driproto glproto])
diff --git a/src/i830_video.c b/src/i830_video.c
index 64cea040..1c3a5b7c 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -2504,27 +2504,29 @@ I830PutImage(ScrnInfoPtr pScrn,
pipe = intel_crtc->pipe;
}
- if (pipe == 0) {
- event = MI_WAIT_FOR_PIPEA_SCAN_LINE_WINDOW;
- load_scan_lines_pipe = MI_LOAD_SCAN_LINES_DISPLAY_PIPEA;
- } else {
- event = MI_WAIT_FOR_PIPEB_SCAN_LINE_WINDOW;
- load_scan_lines_pipe = MI_LOAD_SCAN_LINES_DISPLAY_PIPEB;
- }
+ if (pipe >= 0) {
+ if (pipe == 0) {
+ event = MI_WAIT_FOR_PIPEA_SCAN_LINE_WINDOW;
+ load_scan_lines_pipe = MI_LOAD_SCAN_LINES_DISPLAY_PIPEA;
+ } else {
+ event = MI_WAIT_FOR_PIPEB_SCAN_LINE_WINDOW;
+ load_scan_lines_pipe = MI_LOAD_SCAN_LINES_DISPLAY_PIPEB;
+ }
- box = REGION_EXTENTS(unused, clipBoxes);
- y1 = box->y1 - crtc->y;
- y2 = box->y2 - crtc->y;
-
- BEGIN_BATCH(5);
- /* The documentation says that the LOAD_SCAN_LINES command
- * always comes in pairs. Don't ask me why. */
- OUT_BATCH(MI_LOAD_SCAN_LINES_INCL | load_scan_lines_pipe);
- OUT_BATCH((y1 << 16) | y2);
- OUT_BATCH(MI_LOAD_SCAN_LINES_INCL | load_scan_lines_pipe);
- OUT_BATCH((y1 << 16) | y2);
- OUT_BATCH(MI_WAIT_FOR_EVENT | event);
- ADVANCE_BATCH();
+ box = REGION_EXTENTS(unused, clipBoxes);
+ y1 = box->y1 - crtc->y;
+ y2 = box->y2 - crtc->y;
+
+ BEGIN_BATCH(5);
+ /* The documentation says that the LOAD_SCAN_LINES command
+ * always comes in pairs. Don't ask me why. */
+ OUT_BATCH(MI_LOAD_SCAN_LINES_INCL | load_scan_lines_pipe);
+ OUT_BATCH((y1 << 16) | y2);
+ OUT_BATCH(MI_LOAD_SCAN_LINES_INCL | load_scan_lines_pipe);
+ OUT_BATCH((y1 << 16) | y2);
+ OUT_BATCH(MI_WAIT_FOR_EVENT | event);
+ ADVANCE_BATCH();
+ }
}
if (IS_I965G(pI830)) {