mbox series

[0/3] drm/rockchip: support gamma control on RK3399

Message ID cover.1634378097.git.sigmaris@gmail.com (mailing list archive)
Headers show
Series drm/rockchip: support gamma control on RK3399 | expand

Message

Hugh Cole-Baker Oct. 16, 2021, 10:18 a.m. UTC
This extends the Rockchip VOP driver to support setting the gamma LUT on the
RK3399 SoC. Previously, the driver supported gamma control for the RK3288
only. On the RK3399 the method for updating the LUT is slightly different.
This implementation was based on the code and description from the vendor
kernel [1].

The RK3399 also has the address resources for the VOP general registers and
the gamma LUT located adjacent to each other, not on either side of the IOMMU
address as on the RK3288, but for simplicity this series follows the existing
DT binding which requires the gamma LUT as a second address resource.

This should enable gamma control and "night mode" on all RK3399-based devices
such as the Pinebook Pro, it has been tested using the "redshift" app and
GNOME's "Night Light" feature on a RockPro64 SBC. The changes should not
affect RK3288 gamma support using the existing code path, testing on RK3288
would be welcome.

[1]: https://github.com/rockchip-linux/kernel/commit/4a361fa5d433dabe64b0fae49b49c0fcd16982fa

Hugh Cole-Baker (3):
  drm/rockchip: define gamma registers for RK3399
  drm/rockchip: support gamma control on RK3399
  arm64: dts: rockchip: enable gamma control on RK3399

 arch/arm64/boot/dts/rockchip/rk3399.dtsi    |  4 +-
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 89 +++++++++++++++------
 drivers/gpu/drm/rockchip/rockchip_drm_vop.h |  2 +
 drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 24 +++++-
 drivers/gpu/drm/rockchip/rockchip_vop_reg.h |  1 +
 5 files changed, 90 insertions(+), 30 deletions(-)