Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/xe/gt_clock: Convert register access to use xe_mmio

Stop using GT pointers for register access.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240910234719.3335472-79-matthew.d.roper@intel.com

+3 -3
+3 -3
drivers/gpu/drm/xe/xe_gt_clock.c
··· 17 17 18 18 static u32 read_reference_ts_freq(struct xe_gt *gt) 19 19 { 20 - u32 ts_override = xe_mmio_read32(gt, TIMESTAMP_OVERRIDE); 20 + u32 ts_override = xe_mmio_read32(&gt->mmio, TIMESTAMP_OVERRIDE); 21 21 u32 base_freq, frac_freq; 22 22 23 23 base_freq = REG_FIELD_GET(TIMESTAMP_OVERRIDE_US_COUNTER_DIVIDER_MASK, ··· 57 57 58 58 int xe_gt_clock_init(struct xe_gt *gt) 59 59 { 60 - u32 ctc_reg = xe_mmio_read32(gt, CTC_MODE); 60 + u32 ctc_reg = xe_mmio_read32(&gt->mmio, CTC_MODE); 61 61 u32 freq = 0; 62 62 63 63 /* Assuming gen11+ so assert this assumption is correct */ ··· 66 66 if (ctc_reg & CTC_SOURCE_DIVIDE_LOGIC) { 67 67 freq = read_reference_ts_freq(gt); 68 68 } else { 69 - u32 c0 = xe_mmio_read32(gt, RPM_CONFIG0); 69 + u32 c0 = xe_mmio_read32(&gt->mmio, RPM_CONFIG0); 70 70 71 71 freq = get_crystal_clock_freq(c0); 72 72