drm/xe/vf: Don't try to program MOCS if VF
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 5 Apr 2024 13:39:35 +0000 (15:39 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 8 Apr 2024 12:33:14 +0000 (14:33 +0200)
VFs drivers don't have access to MOCS registers. It is a PF driver
responsibility to program MOCS according to the HW team guidelines.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240405133936.891-3-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_mocs.c

index bff659d20062660bff59343cb09d372d6cae25b2..d16fa64da88135005c52edb34c3074969319eeec 100644 (file)
@@ -568,6 +568,9 @@ void xe_mocs_init(struct xe_gt *gt)
        flags = get_mocs_settings(gt_to_xe(gt), &table);
        mocs_dbg(gt, "flag:0x%x\n", flags);
 
+       if (IS_SRIOV_VF(gt_to_xe(gt)))
+               return;
+
        if (flags & HAS_GLOBAL_MOCS)
                __init_mocs_table(gt, &table);
        if (flags & HAS_LNCF_MOCS)