mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
drm/xe: Refactor emit_clear_link_copy
Implement a function to return the length of the MEM_SET instruction. This is to prepare for future platforms where the length of MEM_SET instruction is expected to change. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patch.msgid.link/20260511123746.616662-7-balasubramani.vivekanandan@intel.com Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
This commit is contained in:
parent
388768fe17
commit
65be72013b
|
|
@ -37,7 +37,6 @@
|
|||
#define MEM_COPY_DST_MOCS_INDEX_MASK GENMASK(6, 3)
|
||||
|
||||
#define PVC_MEM_SET_CMD (2 << 29 | 0x5b << 22)
|
||||
#define PVC_MEM_SET_CMD_LEN_DW 7
|
||||
#define PVC_MEM_SET_MATRIX REG_BIT(17)
|
||||
#define PVC_MEM_SET_DATA_FIELD GENMASK(31, 24)
|
||||
/* Bspec lists field as [6:0], but index alone is from [6:1] */
|
||||
|
|
|
|||
|
|
@ -1461,12 +1461,17 @@ struct dma_fence *xe_migrate_vram_copy_chunk(struct xe_bo *vram_bo, u64 vram_off
|
|||
return fence;
|
||||
}
|
||||
|
||||
static u32 blt_mem_set_cmd_len(struct xe_device *xe)
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
|
||||
static void emit_clear_link_copy(struct xe_gt *gt, struct xe_bb *bb, u64 src_ofs,
|
||||
u32 size, u32 pitch)
|
||||
{
|
||||
struct xe_device *xe = gt_to_xe(gt);
|
||||
u32 *cs = bb->cs + bb->len;
|
||||
u32 len = PVC_MEM_SET_CMD_LEN_DW;
|
||||
u32 len = blt_mem_set_cmd_len(xe);
|
||||
|
||||
*cs++ = PVC_MEM_SET_CMD | PVC_MEM_SET_MATRIX | (len - 2);
|
||||
*cs++ = pitch - 1;
|
||||
|
|
@ -1536,7 +1541,7 @@ static u32 emit_clear_cmd_len(struct xe_gt *gt)
|
|||
struct xe_device *xe = gt_to_xe(gt);
|
||||
|
||||
if (gt->info.has_xe2_blt_instructions)
|
||||
return PVC_MEM_SET_CMD_LEN_DW;
|
||||
return blt_mem_set_cmd_len(xe);
|
||||
else
|
||||
return blt_fast_color_cmd_len(xe);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user