* [PATCH] drm/v3d: Drop allocation of object without mountpoint
@ 2024-10-28 14:27 matthias.bgg
2024-10-29 0:41 ` Maíra Canal
0 siblings, 1 reply; 4+ messages in thread
From: matthias.bgg @ 2024-10-28 14:27 UTC (permalink / raw)
To: Melissa Wen, Maíra Canal, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, linux-kernel, Matthias Brugger
From: Matthias Brugger <matthias.bgg@gmail.com>
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>
---
drivers/gpu/drm/v3d/v3d_bo.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/v3d/v3d_bo.c b/drivers/gpu/drm/v3d/v3d_bo.c
index 7055f7c7bcfe5700aee10b09ecc0005197323b01..f6df9e0947b6ee06043cdbb42c4f98a71bdeba4d 100644
--- a/drivers/gpu/drm/v3d/v3d_bo.c
+++ b/drivers/gpu/drm/v3d/v3d_bo.c
@@ -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,
+ shmem_obj = drm_gem_shmem_create_with_mnt(dev, unaligned_size,
v3d->gemfs);
- else
- shmem_obj = drm_gem_shmem_create(dev, unaligned_size);
-
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,
--
Matthias Brugger <matthias.bgg@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/v3d: Drop allocation of object without mountpoint
2024-10-28 14:27 [PATCH] drm/v3d: Drop allocation of object without mountpoint matthias.bgg
@ 2024-10-29 0:41 ` Maíra Canal
2024-10-29 8:43 ` Matthias Brugger
0 siblings, 1 reply; 4+ messages in thread
From: Maíra Canal @ 2024-10-29 0:41 UTC (permalink / raw)
To: matthias.bgg, Melissa Wen, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, linux-kernel, Matthias Brugger
Hi Matthias,
Thanks for your patch!
On 28/10/24 11:27, matthias.bgg@kernel.org wrote:
> From: Matthias Brugger <matthias.bgg@gmail.com>
>
> 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>
> ---
> drivers/gpu/drm/v3d/v3d_bo.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/v3d/v3d_bo.c b/drivers/gpu/drm/v3d/v3d_bo.c
> index 7055f7c7bcfe5700aee10b09ecc0005197323b01..f6df9e0947b6ee06043cdbb42c4f98a71bdeba4d 100644
> --- a/drivers/gpu/drm/v3d/v3d_bo.c
> +++ b/drivers/gpu/drm/v3d/v3d_bo.c
> @@ -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,
> + shmem_obj = drm_gem_shmem_create_with_mnt(dev, unaligned_size,
> v3d->gemfs);
Please, run scripts/checkpatch.pl before sending the patch.
Best Regards,
- Maíra
> - else
> - shmem_obj = drm_gem_shmem_create(dev, unaligned_size);
> -
> 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,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/v3d: Drop allocation of object without mountpoint
2024-10-29 0:41 ` Maíra Canal
@ 2024-10-29 8:43 ` Matthias Brugger
2024-10-29 10:53 ` Maíra Canal
0 siblings, 1 reply; 4+ messages in thread
From: Matthias Brugger @ 2024-10-29 8:43 UTC (permalink / raw)
To: Maíra Canal, matthias.bgg, Melissa Wen, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, linux-kernel, Matthias Brugger
Hi Maria,
On 29/10/2024 01:41, Maíra Canal wrote:
> Hi Matthias,
>
> Thanks for your patch!
>
> On 28/10/24 11:27, matthias.bgg@kernel.org wrote:
>> From: Matthias Brugger <matthias.bgg@gmail.com>
>>
>> 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>
>> ---
>> drivers/gpu/drm/v3d/v3d_bo.c | 7 +------
>> 1 file changed, 1 insertion(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/v3d/v3d_bo.c b/drivers/gpu/drm/v3d/v3d_bo.c
>> index
>> 7055f7c7bcfe5700aee10b09ecc0005197323b01..f6df9e0947b6ee06043cdbb42c4f98a71bdeba4d 100644
>> --- a/drivers/gpu/drm/v3d/v3d_bo.c
>> +++ b/drivers/gpu/drm/v3d/v3d_bo.c
>> @@ -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,
>> + shmem_obj = drm_gem_shmem_create_with_mnt(dev, unaligned_size,
>> v3d->gemfs);
>
> Please, run scripts/checkpatch.pl before sending the patch.
>
I did with b4 prep --check which gave no errors, just double checked with:
$ ./scripts/checkpatch.pl
0001-drm-v3d-Drop-allocation-of-object-without-mountpoint.patch
total: 0 errors, 0 warnings, 14 lines checked
0001-drm-v3d-Drop-allocation-of-object-without-mountpoint.patch has no obvious
style problems and is ready for submission.
I suppose you want line "v3d->gemfs" to get an extra tab, correct?
Regards,
Matthias
> Best Regards,
> - Maíra
>
>> - else
>> - shmem_obj = drm_gem_shmem_create(dev, unaligned_size);
>> -
>> 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,
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/v3d: Drop allocation of object without mountpoint
2024-10-29 8:43 ` Matthias Brugger
@ 2024-10-29 10:53 ` Maíra Canal
0 siblings, 0 replies; 4+ messages in thread
From: Maíra Canal @ 2024-10-29 10:53 UTC (permalink / raw)
To: Matthias Brugger, matthias.bgg, Melissa Wen, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, linux-kernel, Matthias Brugger
Hi Matthias,
On 29/10/24 05:43, Matthias Brugger wrote:
> Hi Maria,
>
> On 29/10/2024 01:41, Maíra Canal wrote:
>> Hi Matthias,
>>
>> Thanks for your patch!
>>
>> On 28/10/24 11:27, matthias.bgg@kernel.org wrote:
>>> From: Matthias Brugger <matthias.bgg@gmail.com>
>>>
>>> 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>
>>> ---
>>> drivers/gpu/drm/v3d/v3d_bo.c | 7 +------
>>> 1 file changed, 1 insertion(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/v3d/v3d_bo.c b/drivers/gpu/drm/v3d/v3d_bo.c
>>> index
>>> 7055f7c7bcfe5700aee10b09ecc0005197323b01..f6df9e0947b6ee06043cdbb42c4f98a71bdeba4d 100644
>>> --- a/drivers/gpu/drm/v3d/v3d_bo.c
>>> +++ b/drivers/gpu/drm/v3d/v3d_bo.c
>>> @@ -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,
>>> + shmem_obj = drm_gem_shmem_create_with_mnt(dev, unaligned_size,
>>> v3d->gemfs);
>>
>> Please, run scripts/checkpatch.pl before sending the patch.
>>
>
> I did with b4 prep --check which gave no errors, just double checked with:
> $ ./scripts/checkpatch.pl 0001-drm-v3d-Drop-allocation-of-object-
> without-mountpoint.patch
> total: 0 errors, 0 warnings, 14 lines checked
>
> 0001-drm-v3d-Drop-allocation-of-object-without-mountpoint.patch has no
> obvious style problems and is ready for submission.
>
> I suppose you want line "v3d->gemfs" to get an extra tab, correct?
Yes. A tip is running checkpatch.pl with the flag --strict.
$ ./scripts/checkpatch.pl --strict -g HEAD
CHECK: Alignment should match open parenthesis
#28: FILE: drivers/gpu/drm/v3d/v3d_bo.c:161:
+ shmem_obj = drm_gem_shmem_create_with_mnt(dev, unaligned_size,
v3d->gemfs);
total: 0 errors, 0 warnings, 1 checks, 14 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or
--fix-inplace.
Commit d2ba234a691f ("drm/v3d: Drop allocation of object without
mountpoint") has style problems, please review.
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
Best Regards,
- Maíra
>
> Regards,
> Matthias
>
>> Best Regards,
>> - Maíra
>>
>>> - else
>>> - shmem_obj = drm_gem_shmem_create(dev, unaligned_size);
>>> -
>>> 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,
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-29 10:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-28 14:27 [PATCH] drm/v3d: Drop allocation of object without mountpoint matthias.bgg
2024-10-29 0:41 ` Maíra Canal
2024-10-29 8:43 ` Matthias Brugger
2024-10-29 10:53 ` Maíra Canal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®