gpu: ipu-v3: pre: add dynamic buffer layout reconfiguration
authorLucas Stach <l.stach@pengutronix.de>
Fri, 17 May 2024 10:45:48 +0000 (12:45 +0200)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 26 Jun 2024 15:43:54 +0000 (17:43 +0200)
commit4dbc7d5d61d5212bcfef794f47562ace58ac390b
treef30b30231156ccdc226169d9b3907394ad2eac6f
parentee7ff5e26b9d915667db75a2c79b04590afe3b80
gpu: ipu-v3: pre: add dynamic buffer layout reconfiguration

imx-drm doesn't mandate a modeset when the framebuffer modifier changes,
but currently the tile prefetch and resolve (TPR) configuration of the
PRE is only set up on the initial modeset.

As the TPR configuration is double buffered, same as all the other PRE
states, we can support dynamic reconfiguration of the buffer layout from
one frame to another. As switching between (super-)tiled and linear
prefetch needs to touch the CTRL register make sure to do the
reconfiguration inside the safe window.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20240517104549.3648939-2-l.stach@pengutronix.de
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517104549.3648939-2-l.stach@pengutronix.de
drivers/gpu/ipu-v3/ipu-pre.c
drivers/gpu/ipu-v3/ipu-prg.c
drivers/gpu/ipu-v3/ipu-prv.h