Re: [PATCH] drm/tidss: dispc: Switch to drm_fb_dma_get_gem_addr() for framebuffer addresses

From: Chen-Yu Tsai

Date: Thu Sep 03 2026 - 08:28:29 EST


On Thu, Sep 3, 2026 at 6:53 PM Tomi Valkeinen
<tomi.valkeinen@xxxxxxxxxxxxxxxx> wrote:
>
> Hi,
>
> On 03/09/2026 09:31, Chen-Yu Tsai wrote:
> > dispc_plane_state_dma_addr() and dispc_plane_state_p_uv_addr() are
> > basically the same as drm_fb_dma_get_addr(), without the support for
>
> drm_fb_dma_get_gem_addr()
>
> > formats with block parameters. Since the driver doesn't support any of
> > those formats, the result is the same.
> >
> > Switch to drm_fb_dma_get_gem_addr() for getting the framebuffer addresses.
> > Drop the const modifier on "struct drm_plane_state *state" for
> > dispc_plane_setup() so that the state can be passed to
> > drm_fb_dma_get_gem_addr().
>
> Or add const modifier to drm_fb_dma_get_gem_addr(). But it's ok either way.

I felt changing it here was the smaller change. Also, returning a DMA
address that one can then do anything to didn't feel completely const to
me.

> > Using the helper also future proofs the driver in case block parameters
> > are added for more formats, especially the common sub-sampled YUV
> > formats.
> >
> > Signed-off-by: Chen-Yu Tsai <wenst@xxxxxxxxxxxx>
> > ---
> > drivers/gpu/drm/tidss/tidss_dispc.c | 38 +++--------------------------
> > drivers/gpu/drm/tidss/tidss_dispc.h | 2 +-
> > 2 files changed, 4 insertions(+), 36 deletions(-)
>
> Looks good to me. I can pick this up and fix the above typo while
> applying, or wait for v2 if you want to do something about the const.
>
> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>
>
> Tomi

Thanks. Please apply and fix the typo.


ChenYu