diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2023-05-08 15:53:19 -0700 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-19 18:33:49 -0500 |
commit | ce8bf5bd059542431230eac216693a579dc09dba (patch) | |
tree | b6841c93b343466920343f999046fb596aa50e30 /drivers/gpu/drm/xe/xe_ring_ops.c | |
parent | 34f89ac8e66cd5121fb05c765acc3c67ddbef7a0 (diff) |
drm/xe/mmio: Use struct xe_reg
Convert all the callers to deal with xe_mmio_*() using struct xe_reg
instead of plain u32. In a few places there was also a rename
s/reg/reg_val/ when dealing with the value returned so it doesn't get
mixed up with the register address.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20230508225322.2692066-2-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_ring_ops.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_ring_ops.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/xe/xe_ring_ops.c b/drivers/gpu/drm/xe/xe_ring_ops.c index c1b738e033c7..ce829bd48825 100644 --- a/drivers/gpu/drm/xe/xe_ring_ops.c +++ b/drivers/gpu/drm/xe/xe_ring_ops.c @@ -44,10 +44,11 @@ static u32 preparser_disable(bool state) return MI_ARB_CHECK | BIT(8) | state; } -static int emit_aux_table_inv(struct xe_gt *gt, u32 addr, u32 *dw, int i) +static int emit_aux_table_inv(struct xe_gt *gt, struct xe_reg reg, + u32 *dw, int i) { dw[i++] = MI_LOAD_REGISTER_IMM(1) | MI_LRI_MMIO_REMAP_EN; - dw[i++] = addr + gt->mmio.adj_offset; + dw[i++] = reg.reg + gt->mmio.adj_offset; dw[i++] = AUX_INV; dw[i++] = MI_NOOP; @@ -203,9 +204,9 @@ static void __emit_job_gen12_video(struct xe_sched_job *job, struct xe_lrc *lrc, /* hsdes: 1809175790 */ if (!xe->info.has_flat_ccs) { if (decode) - i = emit_aux_table_inv(gt, VD0_AUX_INV.reg, dw, i); + i = emit_aux_table_inv(gt, VD0_AUX_INV, dw, i); else - i = emit_aux_table_inv(gt, VE0_AUX_INV.reg, dw, i); + i = emit_aux_table_inv(gt, VE0_AUX_INV, dw, i); } dw[i++] = preparser_disable(false); @@ -248,7 +249,7 @@ static void __emit_job_gen12_render_compute(struct xe_sched_job *job, /* hsdes: 1809175790 */ if (!xe->info.has_flat_ccs) - i = emit_aux_table_inv(gt, CCS_AUX_INV.reg, dw, i); + i = emit_aux_table_inv(gt, CCS_AUX_INV, dw, i); dw[i++] = preparser_disable(false); |