xf86-video-intel: 2 commits - src/sna/sna_display.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Jan 23 09:46:31 PST 2013
src/sna/sna_display.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
New commits:
commit 3c3a87a2d4261cbd66602812637328a04787f510
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jan 23 17:35:50 2013 +0000
sna/gen6: Correct the event definition for secondary pipes for MI_WAIT_FOR_EVENT
It helps to wait upon the event we program and enable.
References: https://bugzilla.kernel.org/show_bug.cgi
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 88b6acd..e1c0279 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -2840,6 +2840,7 @@ static bool sna_emit_wait_for_scanline_gen6(struct sna *sna,
bool full_height)
{
uint32_t *b;
+ uint32_t event;
if (!sna->kgem.has_secure_batches)
return false;
@@ -2859,16 +2860,18 @@ static bool sna_emit_wait_for_scanline_gen6(struct sna *sna,
if (y2 == y1)
return false;
+ event = 1 << (3*full_height + pipe*8);
+
b = kgem_get_batch(&sna->kgem);
sna->kgem.nbatch += 10;
b[0] = MI_LOAD_REGISTER_IMM | 1;
b[1] = 0x44050; /* DERRMR */
- b[2] = ~(1 << (3*full_height + pipe*8));
+ b[2] = ~event;
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 | 1 << (3*full_height + pipe*5);
+ b[6] = MI_WAIT_FOR_EVENT | event;
b[7] = MI_LOAD_REGISTER_IMM | 1;
b[8] = 0x44050; /* DERRMR */
b[9] = ~0;
commit 88753c5a8c6c9acf086d81828260adf330eebb1a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jan 23 17:35:50 2013 +0000
sna/gen7: Correct the event definition for secondary pipes for MI_WAIT_FOR_EVENT
It helps to wait upon the event we program and enable.
References: https://bugzilla.kernel.org/show_bug.cgi
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 967b88b..88b6acd 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -2775,6 +2775,7 @@ static bool sna_emit_wait_for_scanline_gen7(struct sna *sna,
bool full_height)
{
uint32_t *b;
+ uint32_t event;
if (!sna->kgem.has_secure_batches)
return false;
@@ -2788,6 +2789,18 @@ static bool sna_emit_wait_for_scanline_gen7(struct sna *sna,
y1 = crtc->bounds.y2;
y2--;
+ switch (pipe) {
+ case 0:
+ event = 1 << (full_height ? 3 : 0);
+ break;
+ case 1:
+ event = 1 << (full_height ? 11 : 8);
+ break;
+ case 2:
+ event = 1 << (full_height ? 21 : 14);
+ break;
+ }
+
b = kgem_get_batch(&sna->kgem);
/* Both the LRI and WAIT_FOR_EVENT must be in the same cacheline */
@@ -2800,14 +2813,14 @@ static bool sna_emit_wait_for_scanline_gen7(struct sna *sna,
b[0] = MI_LOAD_REGISTER_IMM | 1;
b[1] = 0x44050; /* DERRMR */
- b[2] = ~(1 << (3*full_height + pipe*8));
+ b[2] = ~event;
b[3] = MI_LOAD_REGISTER_IMM | 1;
b[4] = 0xa188; /* FORCEWAKE_MT */
b[5] = 2 << 16 | 2;
b[6] = MI_LOAD_REGISTER_IMM | 1;
b[7] = 0x70068 + 0x1000 * pipe;
b[8] = (1 << 31) | (1 << 30) | (y1 << 16) | y2;
- b[9] = MI_WAIT_FOR_EVENT | 1 << (3*full_height + pipe*5);
+ b[9] = MI_WAIT_FOR_EVENT | event;
b[10] = MI_LOAD_REGISTER_IMM | 1;
b[11] = 0xa188; /* FORCEWAKE_MT */
b[12] = 2 << 16;
More information about the xorg-commit
mailing list