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

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

Stop using GT pointers for register access. Although some of the pcode
mailboxes are related to GTs, pcode itself (and the register interface
to access it) are outside the GT and should be accessed through the
tile's MMIO.

Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240910234719.3335472-56-matthew.d.roper@intel.com

+2 -2
+2 -2
drivers/gpu/drm/xe/xe_pcode.c
··· 44 44 [PCODE_ERROR_MASK] = {-EPROTO, "Unknown"}, 45 45 }; 46 46 47 - err = xe_mmio_read32(tile->primary_gt, PCODE_MAILBOX) & PCODE_ERROR_MASK; 47 + err = xe_mmio_read32(&tile->mmio, PCODE_MAILBOX) & PCODE_ERROR_MASK; 48 48 if (err) { 49 49 drm_err(&tile_to_xe(tile)->drm, "PCODE Mailbox failed: %d %s", err, 50 50 err_decode[err].str ?: "Unknown"); ··· 58 58 unsigned int timeout_ms, bool return_data, 59 59 bool atomic) 60 60 { 61 - struct xe_gt *mmio = tile->primary_gt; 61 + struct xe_mmio *mmio = &tile->mmio; 62 62 int err; 63 63 64 64 if (tile_to_xe(tile)->info.skip_pcode)