]> Gentwo Git Trees - linux/.git/commit
drm/msm: Compute dumb-buffer sizes with drm_mode_size_dumb()
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 21 Aug 2025 08:17:20 +0000 (10:17 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 29 Sep 2025 12:00:57 +0000 (14:00 +0200)
commit538fa012cbdbe71fd920ffabb24a2d47c0c511f4
tree9888aac08fd6c8e8ad45a7b8b14ffa385602b8b7
parent5d03809440c09297dd2ebd53067fecf506f0b14c
drm/msm: Compute dumb-buffer sizes with drm_mode_size_dumb()

Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch
and buffer size. Alignment is specified in bytes, but the hardware
requires the scanline pitch to be a multiple of 32 pixels. Therefore
compute the byte size of 32 pixels in the given color mode and align
the pitch accordingly. This replaces the existing code in the driver's
align_pitch() helper.

v3:
- clarify pitch alignment in commit message (Dmitry)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Sean Paul <sean@poorly.run>
Cc: Marijn Suijten <marijn.suijten@somainline.org>
Link: https://lore.kernel.org/r/20250821081918.79786-14-tzimmermann@suse.de
drivers/gpu/drm/msm/msm_gem.c