Re: [PATCH v2 2/2] drm/panthor: Remove redundant drm_gem_create_mmap_offset() call from BO_MMAP_OFFSET ioctl
From: Liviu Dudau
Date: Wed Oct 14 2026 - 06:38:07 EST
On Tue, Oct 13, 2026 at 01:54:33PM +0100, Akash Goel wrote:
> This commit removes the call to drm_gem_create_mmap_offset() from
> the BO_MMAP_OFFSET ioctl handler. The call was redundant and didn't
> have any effect as file offset range is allocated unconditionally
> at the BO creation time.
>
> v2:
> - New patch
>
> Suggested-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>
> Signed-off-by: Akash Goel <akash.goel@xxxxxxx>
Reviewed-by: Liviu Dudau <liviu.dudau@xxxxxxx>
Best regards,
Liviu
> ---
> drivers/gpu/drm/panthor/panthor_drv.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c
> index 1ca8aedd83f4..dc8d0191aef4 100644
> --- a/drivers/gpu/drm/panthor/panthor_drv.c
> +++ b/drivers/gpu/drm/panthor/panthor_drv.c
> @@ -1081,7 +1081,7 @@ static int panthor_ioctl_bo_mmap_offset(struct drm_device *ddev, void *data,
> struct drm_panthor_bo_mmap_offset *args = data;
> struct panthor_gem_object *bo;
> struct drm_gem_object *obj;
> - int ret;
> + int ret = 0;
>
> if (args->pad)
> return -EINVAL;
> @@ -1096,10 +1096,6 @@ static int panthor_ioctl_bo_mmap_offset(struct drm_device *ddev, void *data,
> goto out;
> }
>
> - ret = drm_gem_create_mmap_offset(obj);
> - if (ret)
> - goto out;
> -
> args->offset = drm_vma_node_offset_addr(&obj->vma_node);
>
> out:
> --
> 2.25.1
>
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯