Skip to content

Commit

Permalink
drm/v3d: Drop allocation of object without mountpoint
Browse files Browse the repository at this point in the history
Function drm_gem_shmem_create_with_mnt() creates an object
without using the mountpoint if gemfs is NULL.

Drop the else branch calling drm_gem_shmem_create().

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241029-v3d-v2-1-c0d3dd328d1b@gmail.com
  • Loading branch information
Matthias Brugger authored and Maíra Canal committed Oct 30, 2024
1 parent 71ba1c9 commit d28292a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/gpu/drm/v3d/v3d_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,8 @@ struct v3d_bo *v3d_bo_create(struct drm_device *dev, struct drm_file *file_priv,
struct v3d_bo *bo;
int ret;

/* Let the user opt out of allocating the BOs with THP */
if (v3d->gemfs)
shmem_obj = drm_gem_shmem_create_with_mnt(dev, unaligned_size,
v3d->gemfs);
else
shmem_obj = drm_gem_shmem_create(dev, unaligned_size);

shmem_obj = drm_gem_shmem_create_with_mnt(dev, unaligned_size,
v3d->gemfs);
if (IS_ERR(shmem_obj))
return ERR_CAST(shmem_obj);
bo = to_v3d_bo(&shmem_obj->base);
Expand Down

0 comments on commit d28292a

Please sign in to comment.