drm/rockchip: support gamma control on RK3399
authorHugh Cole-Baker <sigmaris@gmail.com>
Tue, 19 Oct 2021 21:58:42 +0000 (22:58 +0100)
committerHeiko Stuebner <heiko@sntech.de>
Thu, 15 Sep 2022 13:09:11 +0000 (15:09 +0200)
commit7ae7a6211fe7251543796d5af971acb8c9e2da9e
tree4847f2e30c1cb6791b5c4e5a1e9ac051d92d097e
parent3ba000d6ae999b99f29afd64814877a5c4406786
drm/rockchip: support gamma control on RK3399

The RK3399 has a 1024-entry gamma LUT with 10 bits per component on its
"big" VOP and a 256-entry, 8 bit per component LUT on the "little" VOP.
Compared to the RK3288, it no longer requires disabling gamma while
updating the LUT. On the RK3399, the LUT can be updated at any time as
the hardware has two LUT buffers, one can be written while the other is
in use. A swap of the buffers is triggered by writing 1 to the
update_gamma_lut register.

Signed-off-by: Hugh Cole-Baker <sigmaris@gmail.com>
Tested-by: "Milan P. Stanić" <mps@arvanta.net>
Tested-by: Linus Heckemann <git@sphalerite.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20211019215843.42718-3-sigmaris@gmail.com
drivers/gpu/drm/rockchip/rockchip_drm_vop.c