[igt-dev] [PATCH i-g-t v4 01/21] lib/intel_blt: Add blt_ctrl_surf_object() helper

Karolina Stolarek karolina.stolarek at intel.com
Thu Jul 13 06:53:27 UTC 2023


On 12.07.2023 19:12, Zbigniew Kempczyński wrote:
> In the series we start using this more time so it's worth to add
> it as common code.
> 
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>

Reviewed-by: Karolina Stolarek <karolina.stolarek at intel.com>

> ---
>   lib/intel_blt.c | 11 +++++++++++
>   lib/intel_blt.h |  3 +++
>   2 files changed, 14 insertions(+)
> 
> diff --git a/lib/intel_blt.c b/lib/intel_blt.c
> index bc28f15e8d..a3d67f5136 100644
> --- a/lib/intel_blt.c
> +++ b/lib/intel_blt.c
> @@ -1390,6 +1390,17 @@ void blt_set_copy_object(struct blt_copy_object *obj,
>   	memcpy(obj, orig, sizeof(*obj));
>   }
>   
> +void blt_set_ctrl_surf_object(struct blt_ctrl_surf_copy_object *obj,
> +			      uint32_t handle, uint32_t region, uint64_t size,
> +			      uint8_t mocs, enum blt_access_type access_type)
> +{
> +	obj->handle = handle;
> +	obj->region = region;
> +	obj->size = size;
> +	obj->mocs = mocs;
> +	obj->access_type = access_type;
> +}
> +
>   /**
>    * blt_surface_fill_rect:
>    * @fd: drm fd
> diff --git a/lib/intel_blt.h b/lib/intel_blt.h
> index 9c4ddc7a89..2aa1259ae8 100644
> --- a/lib/intel_blt.h
> +++ b/lib/intel_blt.h
> @@ -248,6 +248,9 @@ void blt_set_object_ext(struct blt_block_copy_object_ext *obj,
>   			enum blt_surface_type surface_type);
>   void blt_set_copy_object(struct blt_copy_object *obj,
>   			 const struct blt_copy_object *orig);
> +void blt_set_ctrl_surf_object(struct blt_ctrl_surf_copy_object *obj,
> +			      uint32_t handle, uint32_t region, uint64_t size,
> +			      uint8_t mocs, enum blt_access_type access_type);
>   
>   void blt_surface_info(const char *info,
>   		      const struct blt_copy_object *obj);


More information about the igt-dev mailing list