drm/imx/ipuv3: Compute dumb-buffer sizes with drm_mode_size_dumb()
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 21 Aug 2025 08:17:17 +0000 (10:17 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 29 Sep 2025 12:00:57 +0000 (14:00 +0200)
commitb1d0e470f881f25d38d5b51accd6dd30baf069aa
tree10d287a29d3f19f9ec99453fd77576fb7a326b0b
parentecf29357b6268f70d13949f86df9d62e077d4b89
drm/imx/ipuv3: Compute dumb-buffer sizes with drm_mode_size_dumb()

Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and
buffer size. The hardware requires the framebuffer width to be a
multiple of 8. The scanline pitch has to be large enough to support
this. Therefore compute the byte size of 8 pixels in the given color
mode and align the pitch accordingly.

v5:
- fix typo in commit description

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20250821081918.79786-11-tzimmermann@suse.de
drivers/gpu/drm/imx/ipuv3/imx-drm-core.c