Module: Mesa Branch: main Commit: 2e336c602de041a5bfd8c787b3c060b0df257947 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2e336c602de041a5bfd8c787b3c060b0df257947
Author: Sagar Ghuge <[email protected]> Date: Thu Sep 9 10:45:33 2021 -0700 intel/fs: Add Wa_14014435656 For any fence greater than local scope, always set flush type to at least invalidate so that fence goes on properly. v2: Fixup condition to trigger workaround (Lionel) v3: Simplify workaround (Curro) v4: Don't drop the existing WA (Curro) Signed-off-by: Sagar Ghuge <[email protected]> Signed-off-by: Lionel Landwerlin <[email protected]> Cc: 22.0 <mesa-stable> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14947> --- src/intel/compiler/brw_eu_emit.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/intel/compiler/brw_eu_emit.c b/src/intel/compiler/brw_eu_emit.c index 09207d9f806..90a08e0802c 100644 --- a/src/intel/compiler/brw_eu_emit.c +++ b/src/intel/compiler/brw_eu_emit.c @@ -3277,6 +3277,23 @@ gfx12_set_memory_fence_message(struct brw_codegen *p, flush_type = LSC_FLUSH_TYPE_EVICT; } + /* Wa_14014435656: + * + * "For any fence greater than local scope, always set flush type to + * at least invalidate so that fence goes on properly." + * + * "The bug is if flush_type is 'None', the scope is always downgraded + * to 'local'." + * + * Here set scope to NONE_6 instead of NONE, which has the same effect + * as NONE but avoids the downgrade to scope LOCAL. + */ + if (intel_device_info_is_dg2(p->devinfo) && + scope > LSC_FENCE_LOCAL && + flush_type == LSC_FLUSH_TYPE_NONE) { + flush_type = LSC_FLUSH_TYPE_NONE_6; + } + brw_set_desc(p, insn, lsc_fence_msg_desc(p->devinfo, scope, flush_type, false) | brw_message_desc(p->devinfo, mlen, rlen, false));
