[PATCH i-g-t 05/15] lib/intel_cmds_info: rename M to TYPE in blt_memop_type
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Mon May 19 11:17:58 UTC 2025
On Mon, May 19, 2025 at 10:03:59AM +0200, Francois Dugast wrote:
> On Tue, May 13, 2025 at 08:58:00PM +0200, Zbigniew Kempczyński wrote:
> > Documentation separates type and mode in mem-copy so rename prefix
> > to avoid ambiguity.
>
> Which documentation?
BSpec command description.
--
Zbigniew
>
> >
> > Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> > Cc: Francois Dugast <francois.dugast at intel.com>
> > ---
> > lib/intel_blt.c | 2 +-
> > lib/intel_cmds_info.c | 8 ++++----
> > lib/intel_cmds_info.h | 4 ++--
> > tests/intel/xe_copy_basic.c | 6 +++---
> > tests/intel/xe_render_copy.c | 4 ++--
> > tests/intel/xe_spin_batch.c | 4 ++--
> > 6 files changed, 14 insertions(+), 14 deletions(-)
> >
> > diff --git a/lib/intel_blt.c b/lib/intel_blt.c
> > index 7010d3ff7d..33efbf1038 100644
> > --- a/lib/intel_blt.c
> > +++ b/lib/intel_blt.c
> > @@ -1827,7 +1827,7 @@ static void emit_blt_mem_copy(int fd, uint64_t ahnd, const struct blt_mem_data *
> > 0, mem->dst.pat_index);
> >
> > batch = bo_map(fd, mem->bb.handle, mem->bb.size, mem->driver);
> > - optype = mem->src.type == M_MATRIX ? 1 << 17 : 0;
> > + optype = mem->src.type == TYPE_MATRIX ? 1 << 17 : 0;
> >
> > i = 0;
> > batch[i++] = MEM_COPY_CMD | optype;
> > diff --git a/lib/intel_cmds_info.c b/lib/intel_cmds_info.c
> > index d581edb6eb..3bd5eab653 100644
> > --- a/lib/intel_cmds_info.c
> > +++ b/lib/intel_cmds_info.c
> > @@ -74,13 +74,13 @@ static const struct blt_cmd_info
> >
> > static const struct blt_cmd_info
> > pvc_mem_copy = BLT_INFO(MEM_COPY,
> > - BIT(M_LINEAR) |
> > - BIT(M_MATRIX));
> > + BIT(TYPE_LINEAR) |
> > + BIT(TYPE_MATRIX));
> >
> > static const struct blt_cmd_info
> > pvc_mem_set = BLT_INFO(MEM_SET,
> > - BIT(M_LINEAR) |
> > - BIT(M_MATRIX));
> > + BIT(TYPE_LINEAR) |
> > + BIT(TYPE_MATRIX));
> >
> > static const struct blt_cmd_info
> > pre_gen6_xy_color_blt = BLT_INFO(XY_COLOR_BLT, TILE_L_X);
> > diff --git a/lib/intel_cmds_info.h b/lib/intel_cmds_info.h
> > index 7960e0412e..66f63d7e72 100644
> > --- a/lib/intel_cmds_info.h
> > +++ b/lib/intel_cmds_info.h
> > @@ -20,8 +20,8 @@ enum blt_tiling_type {
> > };
> >
> > enum blt_memop_type {
> > - M_LINEAR,
> > - M_MATRIX,
> > + TYPE_LINEAR,
> > + TYPE_MATRIX,
> > };
> >
> > enum blt_cmd_type {
> > diff --git a/tests/intel/xe_copy_basic.c b/tests/intel/xe_copy_basic.c
> > index d4300b85c0..a9e9bd2359 100644
> > --- a/tests/intel/xe_copy_basic.c
> > +++ b/tests/intel/xe_copy_basic.c
> > @@ -58,10 +58,10 @@ mem_copy(int fd, uint32_t src_handle, uint32_t dst_handle, const intel_ctx_t *ct
> >
> > blt_mem_init(fd, &mem);
> > blt_set_mem_object(&mem.src, src_handle, size, width, width, height,
> > - region, src_mocs, DEFAULT_PAT_INDEX, M_LINEAR,
> > + region, src_mocs, DEFAULT_PAT_INDEX, TYPE_LINEAR,
> > COMPRESSION_DISABLED);
> > blt_set_mem_object(&mem.dst, dst_handle, size, width, width, height,
> > - region, dst_mocs, DEFAULT_PAT_INDEX, M_LINEAR,
> > + region, dst_mocs, DEFAULT_PAT_INDEX, TYPE_LINEAR,
> > COMPRESSION_DISABLED);
> > mem.src.ptr = xe_bo_map(fd, src_handle, size);
> > mem.dst.ptr = xe_bo_map(fd, dst_handle, size);
> > @@ -109,7 +109,7 @@ mem_set(int fd, uint32_t dst_handle, const intel_ctx_t *ctx, uint32_t size,
> > bb = xe_bo_create(fd, 0, bb_size, region, 0);
> > blt_mem_init(fd, &mem);
> > blt_set_mem_object(&mem.dst, dst_handle, size, width, width, height, region,
> > - dst_mocs, DEFAULT_PAT_INDEX, M_LINEAR, COMPRESSION_DISABLED);
> > + dst_mocs, DEFAULT_PAT_INDEX, TYPE_LINEAR, COMPRESSION_DISABLED);
> > mem.dst.ptr = xe_bo_map(fd, dst_handle, size);
> > blt_set_batch(&mem.bb, bb, bb_size, region);
> > blt_mem_set(fd, ctx, NULL, ahnd, &mem, fill_data);
> > diff --git a/tests/intel/xe_render_copy.c b/tests/intel/xe_render_copy.c
> > index 9f16537c1e..f0a90e320c 100644
> > --- a/tests/intel/xe_render_copy.c
> > +++ b/tests/intel/xe_render_copy.c
> > @@ -470,10 +470,10 @@ static void mem_copy_busy(int fd, struct drm_xe_engine_class_instance *hwe, uint
> > dst_handle = xe_bo_create(fd, 0, copy_size, region, 0);
> > blt_set_mem_object(mem_copy.src, src_handle, copy_size, width, width, height, region,
> > intel_get_uc_mocs_index(fd), DEFAULT_PAT_INDEX,
> > - M_LINEAR, COMPRESSION_DISABLED);
> > + TYPE_LINEAR, COMPRESSION_DISABLED);
> > blt_set_mem_object(mem_copy.dst, dst_handle, copy_size, width, width, height, region,
> > intel_get_uc_mocs_index(fd), DEFAULT_PAT_INDEX,
> > - M_LINEAR, COMPRESSION_DISABLED);
> > + TYPE_LINEAR, COMPRESSION_DISABLED);
> > mem_copy.src->ptr = xe_bo_map(fd, src_handle, copy_size);
> > mem_copy.dst->ptr = xe_bo_map(fd, dst_handle, copy_size);
> > mem_copy.src_offset = get_offset_pat_index(ahnd, mem_copy.src->handle,
> > diff --git a/tests/intel/xe_spin_batch.c b/tests/intel/xe_spin_batch.c
> > index 4fff34a092..06c5f9d3f9 100644
> > --- a/tests/intel/xe_spin_batch.c
> > +++ b/tests/intel/xe_spin_batch.c
> > @@ -351,10 +351,10 @@ static void xe_spin_mem_copy_region(int fd, struct drm_xe_engine_class_instance
> > dst_handle = xe_bo_create(fd, 0, copy_size, region, 0);
> > blt_set_mem_object(mem_copy.src, src_handle, copy_size, width, width, height, region,
> > intel_get_uc_mocs_index(fd), DEFAULT_PAT_INDEX,
> > - M_LINEAR, COMPRESSION_DISABLED);
> > + TYPE_LINEAR, COMPRESSION_DISABLED);
> > blt_set_mem_object(mem_copy.dst, dst_handle, copy_size, width, width, height, region,
> > intel_get_uc_mocs_index(fd), DEFAULT_PAT_INDEX,
> > - M_LINEAR, COMPRESSION_DISABLED);
> > + TYPE_LINEAR, COMPRESSION_DISABLED);
> > mem_copy.src->ptr = xe_bo_map(fd, src_handle, copy_size);
> > mem_copy.dst->ptr = xe_bo_map(fd, dst_handle, copy_size);
> > mem_copy.src_offset = get_offset_pat_index(ahnd, mem_copy.src->handle,
> > --
> > 2.43.0
> >
More information about the igt-dev
mailing list