drm/mediatek: gamma: Enable the Gamma LUT table only after programming
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Thu, 12 Oct 2023 09:57:25 +0000 (11:57 +0200)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Mon, 16 Oct 2023 14:59:14 +0000 (14:59 +0000)
commit0d4caaaf61ce0556843e2fa9d41ec65962b51c14
tree26dd2aa82f7b5734b8f363abfb03ce3144db9960
parentc18119dee1919ce60565efd85f63707ceae38420
drm/mediatek: gamma: Enable the Gamma LUT table only after programming

Move the write to DISP_GAMMA_CFG to enable the Gamma LUT to after
programming the actual table to avoid potential visual glitches during
table modification.

Note:
GAMMA should get enabled in between vblanks, but this requires many
efforts in order to make this happen, as that requires migrating all
of the writes to make use of CMDQ instead of cpu writes and that's
not trivial. For this reason, this patch only moves the LUT enable.
The CMDQ rework will come at a later time.

Reviewed-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20231012095736.100784-6-angelogioacchino.delregno@collabora.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_disp_gamma.c