[PATCH i-g-t v8 5/6] lib/xe/xe_util: Align obj size before bind/unbind
Akshata Jahagirdar
akshata.jahagirdar at intel.com
Mon Dec 18 21:14:38 UTC 2023
For 512 x 512 x 32pp, the ccs size comes to 2048B.
This size of surf-ctrl-copy smaller than page size
isn't properly handled in the blitter library code.
To address this issue, align the size to 4096 before vm bind/unbind operation.
Signed-off-by: Akshata Jahagirdar <akshata.jahagirdar at intel.com>
Acked-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski 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
More information about the igt-dev
mailing list