Skip to content

Commit

Permalink
drm/xe/vf: Don't program PAT if VF
Browse files Browse the repository at this point in the history
PAT programming can only be done by the PF driver.
Besides VF drivers don't have access to control registers.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240213154355.1221-8-michal.wajdeczko@intel.com
  • Loading branch information
Michal Wajdeczko committed Feb 13, 2024
1 parent 602f9eb commit 96eb895
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/xe/xe_pat.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "xe_gt.h"
#include "xe_gt_mcr.h"
#include "xe_mmio.h"
#include "xe_sriov.h"

#define _PAT_ATS 0x47fc
#define _PAT_INDEX(index) _PICK_EVEN_2RANGES(index, 8, \
Expand Down Expand Up @@ -433,6 +434,10 @@ void xe_pat_init_early(struct xe_device *xe)
drm_err(&xe->drm, "Missing PAT table for platform with graphics version %d.%02d!\n",
GRAPHICS_VER(xe), GRAPHICS_VERx100(xe) % 100);
}

/* VFs can't program nor dump PAT settings */
if (IS_SRIOV_VF(xe))
xe->pat.ops = NULL;
}

void xe_pat_init(struct xe_gt *gt)
Expand Down

0 comments on commit 96eb895

Please sign in to comment.