[PATCH v2 26/43] drm/xe/mocs: Convert register access to use xe_mmio
Rodrigo Vivi
rodrigo.vivi at intel.com
Tue Sep 10 18:41:45 UTC 2024
On Fri, Sep 06, 2024 at 05:08:15PM -0700, Matt Roper wrote:
> Stop using GT pointers for register access.
>
> Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> ---
> drivers/gpu/drm/xe/tests/xe_mocs.c | 4 ++--
> drivers/gpu/drm/xe/xe_mocs.c | 16 ++++++++--------
> 2 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/tests/xe_mocs.c b/drivers/gpu/drm/xe/tests/xe_mocs.c
> index 79be73b4a02b..ea932c051cc7 100644
> --- a/drivers/gpu/drm/xe/tests/xe_mocs.c
> +++ b/drivers/gpu/drm/xe/tests/xe_mocs.c
> @@ -55,7 +55,7 @@ static void read_l3cc_table(struct xe_gt *gt,
> if (regs_are_mcr(gt))
> reg_val = xe_gt_mcr_unicast_read_any(gt, XEHP_LNCFCMOCS(i >> 1));
> else
> - reg_val = xe_mmio_read32(gt, XELP_LNCFCMOCS(i >> 1));
> + reg_val = xe_mmio_read32(>->mmio, XELP_LNCFCMOCS(i >> 1));
>
> mocs_dbg(gt, "reg_val=0x%x\n", reg_val);
> } else {
> @@ -94,7 +94,7 @@ static void read_mocs_table(struct xe_gt *gt,
> if (regs_are_mcr(gt))
> reg_val = xe_gt_mcr_unicast_read_any(gt, XEHP_GLOBAL_MOCS(i));
> else
> - reg_val = xe_mmio_read32(gt, XELP_GLOBAL_MOCS(i));
> + reg_val = xe_mmio_read32(>->mmio, XELP_GLOBAL_MOCS(i));
>
> mocs_expected = get_entry_control(info, i);
> mocs = reg_val;
> diff --git a/drivers/gpu/drm/xe/xe_mocs.c b/drivers/gpu/drm/xe/xe_mocs.c
> index 7ff0ac5b799a..8df41cd12d51 100644
> --- a/drivers/gpu/drm/xe/xe_mocs.c
> +++ b/drivers/gpu/drm/xe/xe_mocs.c
> @@ -278,7 +278,7 @@ static void xelp_lncf_dump(struct xe_mocs_info *info, struct xe_gt *gt, struct d
> if (regs_are_mcr(gt))
> reg_val = xe_gt_mcr_unicast_read_any(gt, XEHP_LNCFCMOCS(i));
> else
> - reg_val = xe_mmio_read32(gt, XELP_LNCFCMOCS(i));
> + reg_val = xe_mmio_read32(>->mmio, XELP_LNCFCMOCS(i));
>
> drm_printf(p, "LNCFCMOCS[%2d] = [%u, %u, %u] (%#8x)\n",
> j++,
> @@ -310,7 +310,7 @@ static void xelp_mocs_dump(struct xe_mocs_info *info, unsigned int flags,
> if (regs_are_mcr(gt))
> reg_val = xe_gt_mcr_unicast_read_any(gt, XEHP_GLOBAL_MOCS(i));
> else
> - reg_val = xe_mmio_read32(gt, XELP_GLOBAL_MOCS(i));
> + reg_val = xe_mmio_read32(>->mmio, XELP_GLOBAL_MOCS(i));
>
> drm_printf(p, "GLOB_MOCS[%2d] = [%u, %u, %u, %u, %u, %u, %u, %u, %u, %u ] (%#8x)\n",
> i,
> @@ -383,7 +383,7 @@ static void xehp_lncf_dump(struct xe_mocs_info *info, unsigned int flags,
> if (regs_are_mcr(gt))
> reg_val = xe_gt_mcr_unicast_read_any(gt, XEHP_LNCFCMOCS(i));
> else
> - reg_val = xe_mmio_read32(gt, XELP_LNCFCMOCS(i));
> + reg_val = xe_mmio_read32(>->mmio, XELP_LNCFCMOCS(i));
>
> drm_printf(p, "LNCFCMOCS[%2d] = [%u, %u, %u] (%#8x)\n",
> j++,
> @@ -428,7 +428,7 @@ static void pvc_mocs_dump(struct xe_mocs_info *info, unsigned int flags, struct
> if (regs_are_mcr(gt))
> reg_val = xe_gt_mcr_unicast_read_any(gt, XEHP_LNCFCMOCS(i));
> else
> - reg_val = xe_mmio_read32(gt, XELP_LNCFCMOCS(i));
> + reg_val = xe_mmio_read32(>->mmio, XELP_LNCFCMOCS(i));
>
> drm_printf(p, "LNCFCMOCS[%2d] = [ %u ] (%#8x)\n",
> j++,
> @@ -510,7 +510,7 @@ static void mtl_mocs_dump(struct xe_mocs_info *info, unsigned int flags,
> if (regs_are_mcr(gt))
> reg_val = xe_gt_mcr_unicast_read_any(gt, XEHP_GLOBAL_MOCS(i));
> else
> - reg_val = xe_mmio_read32(gt, XELP_GLOBAL_MOCS(i));
> + reg_val = xe_mmio_read32(>->mmio, XELP_GLOBAL_MOCS(i));
>
> drm_printf(p, "GLOB_MOCS[%2d] = [%u, %u] (%#8x)\n",
> i,
> @@ -553,7 +553,7 @@ static void xe2_mocs_dump(struct xe_mocs_info *info, unsigned int flags,
> if (regs_are_mcr(gt))
> reg_val = xe_gt_mcr_unicast_read_any(gt, XEHP_GLOBAL_MOCS(i));
> else
> - reg_val = xe_mmio_read32(gt, XELP_GLOBAL_MOCS(i));
> + reg_val = xe_mmio_read32(>->mmio, XELP_GLOBAL_MOCS(i));
>
> drm_printf(p, "GLOB_MOCS[%2d] = [%u, %u, %u] (%#8x)\n",
> i,
> @@ -690,7 +690,7 @@ static void __init_mocs_table(struct xe_gt *gt,
> if (regs_are_mcr(gt))
> xe_gt_mcr_multicast_write(gt, XEHP_GLOBAL_MOCS(i), mocs);
> else
> - xe_mmio_write32(gt, XELP_GLOBAL_MOCS(i), mocs);
> + xe_mmio_write32(>->mmio, XELP_GLOBAL_MOCS(i), mocs);
> }
> }
>
> @@ -730,7 +730,7 @@ static void init_l3cc_table(struct xe_gt *gt,
> if (regs_are_mcr(gt))
> xe_gt_mcr_multicast_write(gt, XEHP_LNCFCMOCS(i), l3cc);
> else
> - xe_mmio_write32(gt, XELP_LNCFCMOCS(i), l3cc);
> + xe_mmio_write32(>->mmio, XELP_LNCFCMOCS(i), l3cc);
> }
> }
>
> --
> 2.45.2
>
More information about the Intel-xe
mailing list