]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/gem-shmem: revert the 8-byte alignment constraint
authorLudovic Desroches <ludovic.desroches@microchip.com>
Wed, 26 Nov 2025 14:44:45 +0000 (15:44 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 3 Dec 2025 09:52:59 +0000 (10:52 +0100)
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()")
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20251126-lcd_pitch_alignment-v1-2-991610a1e369@microchip.com
drivers/gpu/drm/drm_gem_shmem_helper.c

index dc94a27710e5f48839a5d2e9e9ea5152ff22e438..93b9cff89080f94e5d6e4663ef642b4c36e93c71 100644 (file)
@@ -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;