summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-03-25 10:46:14 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-04-04 13:58:48 +0100
commit972569f6fd1e14519f46e9f50d2509faf1d0aa55 (patch)
tree10b15de265afb98d417660a927229b3f943ba363 /src
parent537a836dd6db384d53b52eb457a7d257c440217f (diff)
MI_LOAD_SCAN_LINES_INCL are inclusive and range [0, display height-1]
We have seen GPU hangs with: batchbuffer at 0x0f9b4000: 0x0f9b4000: 0x09000000: MI_LOAD_SCAN_LINES_INCL 0x0f9b4004: 0x00000300: dword 1 0x0f9b4008: 0x09000000: MI_LOAD_SCAN_LINES_INCL 0x0f9b400c: 0x00000300: dword 1 0x0f9b4010: 0x01820000: MI_WAIT_FOR_EVENT 0x0f9b4014: HEAD 0x02000006: MI_FLUSH on a 1366x768 display. That according to the specs an invalid command for the pipe. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35576 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/intel_dri.c4
-rw-r--r--src/intel_video.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/intel_dri.c b/src/intel_dri.c
index 16e42f16..720820f3 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -497,10 +497,10 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
*/
OUT_BATCH(MI_LOAD_SCAN_LINES_INCL |
load_scan_lines_pipe);
- OUT_BATCH((y1 << 16) | y2);
+ OUT_BATCH((y1 << 16) | (y2-1));
OUT_BATCH(MI_LOAD_SCAN_LINES_INCL |
load_scan_lines_pipe);
- OUT_BATCH((y1 << 16) | y2);
+ OUT_BATCH((y1 << 16) | (y2-1));
OUT_BATCH(MI_WAIT_FOR_EVENT | event);
ADVANCE_BATCH();
}
diff --git a/src/intel_video.c b/src/intel_video.c
index 5294f733..499614f0 100644
--- a/src/intel_video.c
+++ b/src/intel_video.c
@@ -1358,9 +1358,9 @@ intel_wait_for_scanline(ScrnInfoPtr scrn, PixmapPtr pixmap,
/* 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 | pipe);
- OUT_BATCH((y1 << 16) | y2);
+ OUT_BATCH((y1 << 16) | (y2-1));
OUT_BATCH(MI_LOAD_SCAN_LINES_INCL | pipe);
- OUT_BATCH((y1 << 16) | y2);
+ OUT_BATCH((y1 << 16) | (y2-1));
OUT_BATCH(MI_WAIT_FOR_EVENT | event);
ADVANCE_BATCH();
}