[Intel-xe] [PATCH] drm/xe: Align size to PAGE_SIZE

Lucas De Marchi lucas.demarchi at intel.com
Mon Sep 25 16:59:22 UTC 2023


On Mon, Sep 25, 2023 at 11:54:58AM -0500, Lucas De Marchi wrote:
>On Thu, Sep 21, 2023 at 03:02:59AM +0530, Pallavi Mishra wrote:
>>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 <pallavi.mishra at intel.com>
>
>
>Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>

and pushed, thanks

Lucas De Marchi

>
>Lucas De Marchi
>
>>---
>>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 c5e4d04c4d58..59c57430918b 100644
>>--- a/drivers/gpu/drm/xe/xe_bo.c
>>+++ b/drivers/gpu/drm/xe/xe_bo.c
>>@@ -1218,6 +1218,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.25.1
>>


More information about the Intel-xe mailing list