diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-03-25 10:46:14 +0000 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2011-05-29 23:34:48 +0100 |
commit | 017bf57534a4b31c880692b416c14d13adff2018 (patch) | |
tree | 72ac101f907662bf7e842878bbaf9e5b1d5ff6f5 | |
parent | 85f8860caf826215a1fce0ee67a79a5569538aa3 (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>
(cherry picked from commit 972569f6fd1e14519f46e9f50d2509faf1d0aa55)
Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
-rw-r--r-- | src/intel_dri.c | 4 | ||||
-rw-r--r-- | src/intel_video.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/intel_dri.c b/src/intel_dri.c index 0a654924..b480445d 100644 --- a/src/intel_dri.c +++ b/src/intel_dri.c @@ -512,10 +512,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 895f66e1..b516a318 100644 --- a/src/intel_video.c +++ b/src/intel_video.c @@ -2251,9 +2251,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(); } |