diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-12-08 10:07:25 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-12-08 11:09:23 +0000 |
commit | d247cb7d0cdb73736f31612157e47f166af68ba0 (patch) | |
tree | 30508b1511ebb4be248fc1dea4bb6861a8bf075e /src | |
parent | d39dc73a80161d290555877942e5990daf0c0411 (diff) |
sna/gen6: Poke PSMI control around WAIT_FOR_EVENT to prevent idling
The bspec recommends preventing the hardware from going to sleep around
a WAIT_FOR_EVENT, and tells us to use disable sleep bit in PSMI control
to accomplish this.
References: https://bugs.freedesktop.org/show_bug.cgi?id=62373
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_display.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 52dc4382..772c8360 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -6284,7 +6284,7 @@ static bool sna_emit_wait_for_scanline_gen6(struct sna *sna, event = 1 << (3*full_height + pipe*8); b = kgem_get_batch(&sna->kgem); - sna->kgem.nbatch += 10; + sna->kgem.nbatch += 16; b[0] = MI_LOAD_REGISTER_IMM | 1; b[1] = 0x44050; /* DERRMR */ @@ -6292,10 +6292,16 @@ static bool sna_emit_wait_for_scanline_gen6(struct sna *sna, b[3] = MI_LOAD_REGISTER_IMM | 1; b[4] = 0x4f100; /* magic */ b[5] = (1 << 31) | (1 << 30) | pipe << 29 | (y1 << 16) | y2; - b[6] = MI_WAIT_FOR_EVENT | event; - b[7] = MI_LOAD_REGISTER_IMM | 1; - b[8] = 0x44050; /* DERRMR */ - b[9] = ~0; + b[6] = MI_LOAD_REGISTER_IMM | 1; + b[7] = 0x2050; /* PSMI_CTL(rcs) */ + b[8] = 1 << 16 | 1; + b[9] = MI_WAIT_FOR_EVENT | event; + b[10] = MI_LOAD_REGISTER_IMM | 1; + b[11] = 0x2050; /* PSMI_CTL(rcs) */ + b[12] = 1 << 16; + b[13] = MI_LOAD_REGISTER_IMM | 1; + b[14] = 0x44050; /* DERRMR */ + b[15] = ~0; sna->kgem.batch_flags |= I915_EXEC_SECURE; return true; |