* [PATCH 1/3] drm/gem-dma: revert the 8-byte alignment constraint
2025-11-26 14:44 [PATCH 0/3] revert the 8-byte pitch-alignment constraint for memory managers Ludovic Desroches
@ 2025-11-26 14:44 ` Ludovic Desroches
2025-12-02 17:02 ` Thomas Zimmermann
2025-11-26 14:44 ` [PATCH 2/3] drm/gem-shmem: " Ludovic Desroches
2025-11-26 14:44 ` [PATCH 3/3] drm/gem-vram: " Ludovic Desroches
2 siblings, 1 reply; 7+ messages in thread
From: Ludovic Desroches @ 2025-11-26 14:44 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter
Cc: dri-devel, linux-kernel, Ludovic Desroches
Using drm_mode_size_dumb() to compute the size of dumb buffers introduced
an 8-byte alignment constraint on the pitch that wasn’t present before.
Let’s remove this constraint, which isn’t necessarily required and may
cause buffers to be allocated larger than needed.
Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
---
drivers/gpu/drm/drm_gem_dma_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_gem_dma_helper.c b/drivers/gpu/drm/drm_gem_dma_helper.c
index 12d8307997a0a90a9b5c0469bd742130fa6722d5..eb56ba2347966040a3c7fd27e09c8b81bc797daa 100644
--- a/drivers/gpu/drm/drm_gem_dma_helper.c
+++ b/drivers/gpu/drm/drm_gem_dma_helper.c
@@ -308,7 +308,7 @@ int drm_gem_dma_dumb_create(struct drm_file *file_priv,
struct drm_gem_dma_object *dma_obj;
int ret;
- ret = drm_mode_size_dumb(drm, args, SZ_8, 0);
+ ret = drm_mode_size_dumb(drm, args, 0, 0);
if (ret)
return ret;
--
2.51.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] drm/gem-dma: revert the 8-byte alignment constraint
2025-11-26 14:44 ` [PATCH 1/3] drm/gem-dma: revert the 8-byte alignment constraint Ludovic Desroches
@ 2025-12-02 17:02 ` Thomas Zimmermann
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Zimmermann @ 2025-12-02 17:02 UTC (permalink / raw)
To: Ludovic Desroches, Maarten Lankhorst, Maxime Ripard,
David Airlie, Simona Vetter
Cc: dri-devel, linux-kernel
Am 26.11.25 um 15:44 schrieb Ludovic Desroches:
> Using drm_mode_size_dumb() to compute the size of dumb buffers introduced
> an 8-byte alignment constraint on the pitch that wasn’t present before.
> Let’s remove this constraint, which isn’t necessarily required and may
> cause buffers to be allocated larger than needed.
>
> Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: dcacfcd35cef ("drm/gem-dma: Compute dumb-buffer sizes with
drm_mode_size_dumb()")
> ---
> drivers/gpu/drm/drm_gem_dma_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_gem_dma_helper.c b/drivers/gpu/drm/drm_gem_dma_helper.c
> index 12d8307997a0a90a9b5c0469bd742130fa6722d5..eb56ba2347966040a3c7fd27e09c8b81bc797daa 100644
> --- a/drivers/gpu/drm/drm_gem_dma_helper.c
> +++ b/drivers/gpu/drm/drm_gem_dma_helper.c
> @@ -308,7 +308,7 @@ int drm_gem_dma_dumb_create(struct drm_file *file_priv,
> struct drm_gem_dma_object *dma_obj;
> int ret;
>
> - ret = drm_mode_size_dumb(drm, args, SZ_8, 0);
> + ret = drm_mode_size_dumb(drm, args, 0, 0);
> if (ret)
> return ret;
>
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] drm/gem-shmem: revert the 8-byte alignment constraint
2025-11-26 14:44 [PATCH 0/3] revert the 8-byte pitch-alignment constraint for memory managers Ludovic Desroches
2025-11-26 14:44 ` [PATCH 1/3] drm/gem-dma: revert the 8-byte alignment constraint Ludovic Desroches
@ 2025-11-26 14:44 ` Ludovic Desroches
2025-12-02 17:03 ` Thomas Zimmermann
2025-11-26 14:44 ` [PATCH 3/3] drm/gem-vram: " Ludovic Desroches
2 siblings, 1 reply; 7+ messages in thread
From: Ludovic Desroches @ 2025-11-26 14:44 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter
Cc: dri-devel, linux-kernel, Ludovic Desroches
Using drm_mode_size_dumb() to compute the size of dumb buffers introduced
an 8-byte alignment constraint on the pitch that wasn’t present before.
Let’s remove this constraint, which isn’t necessarily required and may
cause buffers to be allocated larger than needed.
Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
index dc94a27710e5f48839a5d2e9e9ea5152ff22e438..93b9cff89080f94e5d6e4663ef642b4c36e93c71 100644
--- a/drivers/gpu/drm/drm_gem_shmem_helper.c
+++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
@@ -559,7 +559,7 @@ int drm_gem_shmem_dumb_create(struct drm_file *file, struct drm_device *dev,
{
int ret;
- ret = drm_mode_size_dumb(dev, args, SZ_8, 0);
+ ret = drm_mode_size_dumb(dev, args, 0, 0);
if (ret)
return ret;
--
2.51.0
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 2/3] drm/gem-shmem: revert the 8-byte alignment constraint
2025-11-26 14:44 ` [PATCH 2/3] drm/gem-shmem: " Ludovic Desroches
@ 2025-12-02 17:03 ` Thomas Zimmermann
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Zimmermann @ 2025-12-02 17:03 UTC (permalink / raw)
To: Ludovic Desroches, Maarten Lankhorst, Maxime Ripard,
David Airlie, Simona Vetter
Cc: dri-devel, linux-kernel
Am 26.11.25 um 15:44 schrieb Ludovic Desroches:
> Using drm_mode_size_dumb() to compute the size of dumb buffers introduced
> an 8-byte alignment constraint on the pitch that wasn’t present before.
> Let’s remove this constraint, which isn’t necessarily required and may
> cause buffers to be allocated larger than needed.
>
> Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 4977dcecb931 ("drm/gem-shmem: Compute dumb-buffer sizes with
drm_mode_size_dumb()")
> ---
> drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
> index dc94a27710e5f48839a5d2e9e9ea5152ff22e438..93b9cff89080f94e5d6e4663ef642b4c36e93c71 100644
> --- a/drivers/gpu/drm/drm_gem_shmem_helper.c
> +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
> @@ -559,7 +559,7 @@ int drm_gem_shmem_dumb_create(struct drm_file *file, struct drm_device *dev,
> {
> int ret;
>
> - ret = drm_mode_size_dumb(dev, args, SZ_8, 0);
> + ret = drm_mode_size_dumb(dev, args, 0, 0);
> if (ret)
> return ret;
>
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] drm/gem-vram: revert the 8-byte alignment constraint
2025-11-26 14:44 [PATCH 0/3] revert the 8-byte pitch-alignment constraint for memory managers Ludovic Desroches
2025-11-26 14:44 ` [PATCH 1/3] drm/gem-dma: revert the 8-byte alignment constraint Ludovic Desroches
2025-11-26 14:44 ` [PATCH 2/3] drm/gem-shmem: " Ludovic Desroches
@ 2025-11-26 14:44 ` Ludovic Desroches
2025-12-02 17:09 ` Thomas Zimmermann
2 siblings, 1 reply; 7+ messages in thread
From: Ludovic Desroches @ 2025-11-26 14:44 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter
Cc: dri-devel, linux-kernel, Ludovic Desroches
Using drm_mode_size_dumb() to compute the size of dumb buffers introduced
an 8-byte alignment constraint on the pitch that wasn’t present before.
Let’s remove this constraint, which isn’t necessarily required and may
cause buffers to be allocated larger than needed.
Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
---
drivers/gpu/drm/drm_gem_vram_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
index f40f6e167f126681201b13d60be9c508f25d481f..3ab91965ec6f8fa275b9556079dfb335a02664bb 100644
--- a/drivers/gpu/drm/drm_gem_vram_helper.c
+++ b/drivers/gpu/drm/drm_gem_vram_helper.c
@@ -553,7 +553,7 @@ int drm_gem_vram_driver_dumb_create(struct drm_file *file,
if (WARN_ONCE(!dev->vram_mm, "VRAM MM not initialized"))
return -EINVAL;
- ret = drm_mode_size_dumb(dev, args, SZ_8, 0);
+ ret = drm_mode_size_dumb(dev, args, 0, 0);
if (ret)
return ret;
--
2.51.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] drm/gem-vram: revert the 8-byte alignment constraint
2025-11-26 14:44 ` [PATCH 3/3] drm/gem-vram: " Ludovic Desroches
@ 2025-12-02 17:09 ` Thomas Zimmermann
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Zimmermann @ 2025-12-02 17:09 UTC (permalink / raw)
To: Ludovic Desroches, Maarten Lankhorst, Maxime Ripard,
David Airlie, Simona Vetter
Cc: dri-devel, linux-kernel
Hi
Am 26.11.25 um 15:44 schrieb Ludovic Desroches:
> Using drm_mode_size_dumb() to compute the size of dumb buffers introduced
> an 8-byte alignment constraint on the pitch that wasn’t present before.
> Let’s remove this constraint, which isn’t necessarily required and may
> cause buffers to be allocated larger than needed.
>
> Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
> ---
> drivers/gpu/drm/drm_gem_vram_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> index f40f6e167f126681201b13d60be9c508f25d481f..3ab91965ec6f8fa275b9556079dfb335a02664bb 100644
> --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> @@ -553,7 +553,7 @@ int drm_gem_vram_driver_dumb_create(struct drm_file *file,
> if (WARN_ONCE(!dev->vram_mm, "VRAM MM not initialized"))
> return -EINVAL;
>
> - ret = drm_mode_size_dumb(dev, args, SZ_8, 0);
> + ret = drm_mode_size_dumb(dev, args, 0, 0);
> if (ret)
> return ret;
This code has not been merged yet AFAICT. I'll add the fix to the
patch's next update.
Best regards
Thomas
>
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 7+ messages in thread