[PATCH 2/2] fixup! drm/xe/uapi: Reject bo creation of unaligned size

Francois Dugast francois.dugast at intel.com
Tue Dec 12 14:29:15 UTC 2023


On Tue, Dec 12, 2023 at 03:20:45PM +0100, Maarten Lankhorst wrote:
> From: Maarten Lankhorst <dev at lankhorst.se>
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>

Reviewed-by: Francois Dugast <francois.dugast at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_bo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
> index 7e25c8b7a01a..9cc78986dbd3 100644
> --- a/drivers/gpu/drm/xe/xe_bo.c
> +++ b/drivers/gpu/drm/xe/xe_bo.c
> @@ -1574,7 +1574,7 @@ struct xe_bo *xe_managed_bo_create_pin_map(struct xe_device *xe, struct xe_tile
>  struct xe_bo *xe_managed_bo_create_from_data(struct xe_device *xe, struct xe_tile *tile,
>  					     const void *data, size_t size, u32 flags)
>  {
> -	struct xe_bo *bo = xe_managed_bo_create_pin_map(xe, tile, size, flags);
> +	struct xe_bo *bo = xe_managed_bo_create_pin_map(xe, tile, ALIGN(size, PAGE_SIZE), flags);
>  
>  	if (IS_ERR(bo))
>  		return bo;
> -- 
> 2.40.1
> 


More information about the Intel-xe mailing list