Re: [PATCH v2 4/6] drm/msm: fbdev: Calculate buffer geometry with format helpers

Dmitry Baryshkov <[email protected]>
Newsgroups org.kernel.vger.linux-arm-msm,dev.linux.lists.sashiko-reviews,org.freedesktop.lists.dri-devel
Message-ID <zufng4s4refvweovvogyq62zxl726npmzqh2sf474qmje2uwlt@qaavrkvos55m>
On Thu, Jun 18, 2026 at 04:11:35PM +0200, Thomas Zimmermann wrote:
> Replace the geometry and size calculation in msm's fbdev emulation
> with DRM format helpers. This consists of a 4CC lookup from the fbdev
> parameters, format lookup, pitch calculation and size calculation.
> Then allocate the GEM buffer object for the framebuffer memory from
> the calculated size.
> 
> Explicitly align the size of the allocated GEM buffer object to full
> pages. The contained memory is the framebuffer memory as seen by fbdev.
> The page alignment is required for mmap.
> 
> v2:
> - clarify the page alignment of the buffer size (Dmitry)
> 
> Signed-off-by: Thomas Zimmermann <[email protected]>
> ---
>  drivers/gpu/drm/msm/msm_drv.h   |  7 -------
>  drivers/gpu/drm/msm/msm_fbdev.c | 26 ++++++++++++--------------
>  2 files changed, 12 insertions(+), 21 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <[email protected]>


-- 
With best wishes
Dmitry
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.