panfrost/drm-shim: Use align_uintptr instead of ALIGN for size_t input
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38365>
This commit is contained in:
@@ -110,7 +110,7 @@ panfrost_ioctl_create_bo(int fd, unsigned long request, void *arg)
|
||||
|
||||
struct shim_fd *shim_fd = drm_shim_fd_lookup(fd);
|
||||
struct shim_bo *bo = calloc(1, sizeof(*bo));
|
||||
size_t size = ALIGN(create->size, 4096);
|
||||
size_t size = align_uintptr(create->size, 4096);
|
||||
|
||||
drm_shim_bo_init(bo, size);
|
||||
|
||||
@@ -237,7 +237,7 @@ panthor_ioctl_bo_create(int fd, unsigned long request, void *arg)
|
||||
|
||||
struct shim_fd *shim_fd = drm_shim_fd_lookup(fd);
|
||||
struct shim_bo *bo = calloc(1, sizeof(*bo));
|
||||
size_t size = ALIGN(bo_create->size, 4096);
|
||||
size_t size = align_uintptr(bo_create->size, 4096);
|
||||
|
||||
drm_shim_bo_init(bo, size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user