Skip to content

Commit

Permalink
drm/xe: Extend rpX values extraction for future platforms
Browse files Browse the repository at this point in the history
In existing code flow for future platforms i.e. >1270, the rpX
(rp0,rpn and rpe) fused values are read from gen 6 registers.
Which is not correct. Unless specified gen 1270 regs should be valid
for gen 1270+ platforms as well.

Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
  • Loading branch information
Badal Nilawar authored and Rodrigo Vivi committed Dec 21, 2023
1 parent 83af834 commit 8a93b0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/xe/xe_guc_pc.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ static void pc_update_rp_values(struct xe_guc_pc *pc)
struct xe_gt *gt = pc_to_gt(pc);
struct xe_device *xe = gt_to_xe(gt);

if (xe->info.platform == XE_METEORLAKE)
if (GRAPHICS_VERx100(xe) >= 1270)
mtl_update_rpe_value(pc);
else
tgl_update_rpe_value(pc);
Expand All @@ -365,7 +365,7 @@ static ssize_t freq_act_show(struct device *dev,
xe_device_mem_access_get(gt_to_xe(gt));

/* When in RC6, actual frequency reported will be 0. */
if (xe->info.platform == XE_METEORLAKE) {
if (GRAPHICS_VERx100(xe) >= 1270) {
freq = xe_mmio_read32(gt, MTL_MIRROR_TARGET_WP1);
freq = REG_FIELD_GET(MTL_CAGF_MASK, freq);
} else {
Expand Down Expand Up @@ -680,7 +680,7 @@ static void pc_init_fused_rp_values(struct xe_guc_pc *pc)
struct xe_gt *gt = pc_to_gt(pc);
struct xe_device *xe = gt_to_xe(gt);

if (xe->info.platform == XE_METEORLAKE)
if (GRAPHICS_VERx100(xe) >= 1270)
mtl_init_fused_rp_values(pc);
else
tgl_init_fused_rp_values(pc);
Expand Down

0 comments on commit 8a93b0b

Please sign in to comment.