diff options
author | Keith Packard <keithp@keithp.com> | 2009-05-14 16:57:11 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-05-14 17:01:54 -0700 |
commit | 04772b6c09a88f0483c2a7efc48029967c77b9bc (patch) | |
tree | 31af57471a9075083d10173b62a85937daba80e7 /src/i830_video.c | |
parent | 128c1c3b7d57b157604788f82bf9fd389839068f (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>
Diffstat (limited to 'src/i830_video.c')
-rw-r--r-- | src/i830_video.c | 42 |
1 files changed, 22 insertions, 20 deletions
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)) { |