diff options
author | Pallavi Mishra <[email protected]> | 2023-09-21 03:02:59 +0530 |
---|---|---|
committer | Rodrigo Vivi <[email protected]> | 2023-12-21 11:41:16 -0500 |
commit | 02cadbb5d123204ce193672007868d18db762172 (patch) | |
tree | 473087e6912e7a23a9c640736a2340c02830879c | |
parent | babba646785d6855cba64fb0480beb8d3421cc52 (diff) |
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 <[email protected]>
Reviewed-by: Lucas De Marchi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Lucas De Marchi <[email protected]>
Signed-off-by: Rodrigo Vivi <[email protected]>
-rw-r--r-- | drivers/gpu/drm/xe/xe_bo.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c index eb08a8954742..1a10d9324a07 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; } |