From 02cadbb5d123204ce193672007868d18db762172 Mon Sep 17 00:00:00 2001 From: Pallavi Mishra Date: Thu, 21 Sep 2023 03:02:59 +0530 Subject: [PATCH] drm/xe: Align size to PAGE_SIZE Ensure alignment with PAGE_SIZE for the size parameter passed to __xe_bo_create_locked() v2: move size alignment under else condition (Lucas) Signed-off-by: Pallavi Mishra Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230920213259.3458968-1-pallavi.mishra@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/xe/xe_bo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c index eb08a89547422..1a10d9324a07e 100644 --- a/drivers/gpu/drm/xe/xe_bo.c +++ b/drivers/gpu/drm/xe/xe_bo.c @@ -1227,6 +1227,7 @@ struct xe_bo *__xe_bo_create_locked(struct xe_device *xe, struct xe_bo *bo, flags |= XE_BO_INTERNAL_64K; alignment = SZ_64K >> PAGE_SHIFT; } else { + size = ALIGN(size, PAGE_SIZE); alignment = SZ_4K >> PAGE_SHIFT; } -- 2.30.2