drm/rockchip: Add optional support for CRTC gamma LUT
authorEzequiel Garcia <ezequiel@collabora.com>
Thu, 10 Oct 2019 19:43:50 +0000 (16:43 -0300)
committerSean Paul <seanpaul@chromium.org>
Fri, 11 Oct 2019 13:24:29 +0000 (09:24 -0400)
commitb23ab6ac6d768f9d5b03b5a67bf48a6be6e1dcce
tree50fc2aa65f0077ed778be75a5dd51279c5ff9d5f
parent2804b799c35272031088abc6b0f74238e61f8afd
drm/rockchip: Add optional support for CRTC gamma LUT

Add an optional CRTC gamma LUT support, and enable it on RK3288.
This is currently enabled via a separate address resource,
which needs to be specified in the devicetree.

The address resource is required because on some SoCs, such as
RK3288, the LUT address is after the MMU address, and the latter
is supported by a different driver. This prevents the DRM driver
from requesting an entire register space.

The current implementation works for RGB 10-bit tables, as that
is what seems to work on RK3288.

Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191010194351.17940-3-ezequiel@collabora.com
drivers/gpu/drm/rockchip/rockchip_drm_vop.c
drivers/gpu/drm/rockchip/rockchip_drm_vop.h
drivers/gpu/drm/rockchip/rockchip_vop_reg.c