Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/gem-dma: revert the 8-byte alignment constraint

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()")
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20251126-lcd_pitch_alignment-v1-1-991610a1e369@microchip.com

authored by

Ludovic Desroches and committed by
Thomas Zimmermann
56715b45 eec7e23d

+1 -1
+1 -1
drivers/gpu/drm/drm_gem_dma_helper.c
··· 308 308 struct drm_gem_dma_object *dma_obj; 309 309 int ret; 310 310 311 - ret = drm_mode_size_dumb(drm, args, SZ_8, 0); 311 + ret = drm_mode_size_dumb(drm, args, 0, 0); 312 312 if (ret) 313 313 return ret; 314 314