drm/xe/vf: Don't emit access to Global HWSP if VF
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 5 Apr 2024 13:39:34 +0000 (15:39 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 8 Apr 2024 12:33:13 +0000 (14:33 +0200)
VFs can't access Global HWSP, don't emit questionable MI_FLUSH_DW
while processing a migration job.

Bspec: 52398
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr PiĆ³rkowski <piotr.piorkowski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240405133936.891-2-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_ring_ops.c

index 5b2b37b..d42b3f3 100644 (file)
@@ -17,6 +17,7 @@
 #include "xe_lrc.h"
 #include "xe_macros.h"
 #include "xe_sched_job.h"
+#include "xe_sriov.h"
 #include "xe_vm_types.h"
 #include "xe_vm.h"
 #include "xe_wa.h"
@@ -367,10 +368,12 @@ static void emit_migration_job_gen12(struct xe_sched_job *job,
 
        i = emit_bb_start(job->batch_addr[0], BIT(8), dw, i);
 
-       /* XXX: Do we need this? Leaving for now. */
-       dw[i++] = preparser_disable(true);
-       i = emit_flush_invalidate(0, dw, i);
-       dw[i++] = preparser_disable(false);
+       if (!IS_SRIOV_VF(gt_to_xe(job->q->gt))) {
+               /* XXX: Do we need this? Leaving for now. */
+               dw[i++] = preparser_disable(true);
+               i = emit_flush_invalidate(0, dw, i);
+               dw[i++] = preparser_disable(false);
+       }
 
        i = emit_bb_start(job->batch_addr[1], BIT(8), dw, i);