[PATCH i-g-t v7 5/6] lib/xe/xe_util: Align obj size before bind/unbind
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Mon Dec 18 07:00:10 UTC 2023
On Fri, Dec 15, 2023 at 01:09:46PM -0800, Akshata Jahagirdar wrote:
> Alter the range to default_alignment before vm bind/unbind operation to
> align the buffer object size with page size.
>
> Signed-off-by: Akshata Jahagirdar <akshata.jahagirdar at intel.com>
> ---
> lib/xe/xe_util.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/xe/xe_util.c b/lib/xe/xe_util.c
> index ba8eece71..6321a5729 100644
> --- a/lib/xe/xe_util.c
> +++ b/lib/xe/xe_util.c
> @@ -148,7 +148,7 @@ static struct drm_xe_vm_bind_op *xe_alloc_bind_ops(int xe,
> ops->flags = flags;
> ops->obj_offset = 0;
> ops->addr = obj->offset;
> - ops->range = obj->size;
> + ops->range = ALIGN(obj->size, 4096);
> ops->prefetch_mem_region_instance = 0;
> if (obj->pat_index == DEFAULT_PAT_INDEX)
> ops->pat_index = intel_get_pat_idx_wb(xe);
> --
> 2.34.1
>
LGTM, but please extend commit message why aligning to page
size is necessary. With this:
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
--
Zbigniew
More information about the igt-dev
mailing list