Skip to contentSkip to conversation

drm/v3d: Drop allocation of object without mountpoint

PATCH Applied [email protected] 2 participants 2 messages Oct 29, 2024 – Oct 30, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/v3d: Drop allocation of object without mountpoint

From: Matthias Brugger <[email protected]>

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().

---
Changes in v2:
- Fix indentation
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 drivers/gpu/drm/v3d/v3d_bo.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/v3d/v3d_bo.c +2 -7
index 7055f7c7bcfe5700aee10b09ecc0005197323b01..73ab7dd31b17b249b7688dcc9833fd161211b6d9 100644
@@ -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);

---
base-commit: dec9255a128e19c5fcc3bdb18175d78094cc624d
change-id: 20241028-v3d-1d2546ed92d7

Best regards,

Signature · 1 line
Matthias Brugger <[email protected]>
maintainer Applied
#1 lore raw

Hi Matthias,

Quoted 8 lines · On 29/10/24 08:24, [email protected] wrote:

From: Matthias Brugger <[email protected]>

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().

Applied to misc/kernel.git (drm-misc-next).

Best Regards,
- Maíra

Quoted 34 lines

---
Changes in v2:
- Fix indentation
- Link to v1: https://lore.kernel.org/r/[email protected]

---
  drivers/gpu/drm/v3d/v3d_bo.c | 9 ++-------
  1 file changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/v3d/v3d_bo.c +2 -8
index 7055f7c7bcfe5700aee10b09ecc0005197323b01..73ab7dd31b17b249b7688dcc9833fd161211b6d9 100644
@@ -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);
 
---

base-commit: dec9255a128e19c5fcc3bdb18175d78094cc624d
change-id: 20241028-v3d-1d2546ed92d7

Best regards,