diff options
author | Carl Worth <cworth@cworth.org> | 2009-04-06 11:16:40 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-04-06 11:16:53 -0700 |
commit | bc3312fd7c03d09a231dfebfe390fe668ad15d1e (patch) | |
tree | 3414e7a30924df53de509c8734e03783e6599ca3 /src/i810_reg.h | |
parent | 6cd914ef315036ce8e91c7b6492994353e8ed2d8 (diff) |
Use WAIT_FOR_SCAN_LINE instead of WAIT_FOR_VBLANK
Either way, the goal is tear-free video playing. But waiting for
a scan-line window not only has the advantage of being cheaper
for small windows, but also avoids hanging the GPU in the case
of the pipe getting turned off, (by screensaver, for example),
while a batch is waiting for a VBLANK that will never occur.
This fixes that GPU hang.
Diffstat (limited to 'src/i810_reg.h')
-rw-r--r-- | src/i810_reg.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/i810_reg.h b/src/i810_reg.h index bc462fae..102097cd 100644 --- a/src/i810_reg.h +++ b/src/i810_reg.h @@ -2436,12 +2436,19 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define MI_OVERLAY_FLIP_OFF (2<<21) /* Wait for Events */ -#define MI_WAIT_FOR_EVENT (0x03<<23) -#define MI_WAIT_FOR_PIPEB_SVBLANK (1<<18) -#define MI_WAIT_FOR_PIPEA_SVBLANK (1<<17) -#define MI_WAIT_FOR_OVERLAY_FLIP (1<<16) -#define MI_WAIT_FOR_PIPEB_VBLANK (1<<7) -#define MI_WAIT_FOR_PIPEA_VBLANK (1<<3) +#define MI_WAIT_FOR_EVENT (0x03<<23) +#define MI_WAIT_FOR_PIPEB_SVBLANK (1<<18) +#define MI_WAIT_FOR_PIPEA_SVBLANK (1<<17) +#define MI_WAIT_FOR_OVERLAY_FLIP (1<<16) +#define MI_WAIT_FOR_PIPEB_VBLANK (1<<7) +#define MI_WAIT_FOR_PIPEB_SCAN_LINE_WINDOW (1<<5) +#define MI_WAIT_FOR_PIPEA_VBLANK (1<<3) +#define MI_WAIT_FOR_PIPEA_SCAN_LINE_WINDOW (1<<2) + +/* Set the scan line for MI_WAIT_FOR_PIPE?_SCAN_LINE_WINDOW */ +#define MI_LOAD_SCAN_LINES_INCL (0x12<<23) +#define MI_LOAD_SCAN_LINES_DISPLAY_PIPEA (0) +#define MI_LOAD_SCAN_LINES_DISPLAY_PIPEB (0x1<<20) /* Flush */ #define MI_FLUSH (0x04<<23) |