[Mesa-stable] [PATCH 2/2] i965: Disable compaction for EOT send messages

Matt Turner mattst88 at gmail.com
Mon Jun 8 11:18:35 PDT 2015


From: Ben Widawsky <benjamin.widawsky at intel.com>

AFAICT, there is no real way to make sure a send message with EOT is properly
ignored from compact, nor can I see a way to actually encode EOT while
compacting. Before the single send optimization we'd always bail because we hit
the is_immediate && !is_compactable_immediate case. However, with single send,
is_immediate is not true, and so we end up trying to compact the un-compactible.

Without this, any compacting single send instruction will hang because the EOT
isn't there. I am not sure how I didn't hit this when I originally enabled the
optimization.  I didn't check if some surrounding code changed.

I know Neil and Matt were both looking into this. I did a quick search and
didn't see any patches out there to handle this. Please ignore if this has
already been sent by someone. (Direct me to it and I will review it).

Reported-by: Neil Roberts <neil at linux.intel.com>
Reported-by: Mark Janes <mark.a.janes at intel.com>
Tested-by: Mark Janes <mark.a.janes at intel.com>
Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
(cherry picked from commit b307921c3ff3b36607752f881a180272366a79cf)
---
 src/mesa/drivers/dri/i965/brw_eu_compact.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c
index 26c41ea..2c39e6c 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_compact.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c
@@ -845,6 +845,12 @@ set_3src_source_index(struct brw_context *brw, brw_compact_inst *dst, brw_inst *
 static bool
 has_unmapped_bits(struct brw_context *brw, brw_inst *src)
 {
+   /* EOT can only be mapped on a send if the src1 is an immediate */
+   if ((brw_inst_opcode(brw, src) == BRW_OPCODE_SENDC ||
+        brw_inst_opcode(brw, src) == BRW_OPCODE_SEND) &&
+       brw_inst_eot(brw, src))
+      return true;
+
    /* Check for instruction bits that don't map to any of the fields of the
     * compacted instruction.  The instruction cannot be compacted if any of
     * them are set.  They overlap with:
-- 
2.3.6



More information about the mesa-stable mailing list