From: Hugh Cole-Baker <sigmaris@gmail.com>
To: heiko@sntech.de, hjc@rock-chips.com
Cc: dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, ezequiel@collabora.com,
Hugh Cole-Baker <sigmaris@gmail.com>
Subject: [PATCH v2 0/3] drm/rockchip: support gamma control on RK3399
Date: Tue, 19 Oct 2021 22:58:40 +0100 [thread overview]
Message-ID: <20211019215843.42718-1-sigmaris@gmail.com> (raw)
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.
Changes from v1: Moved the vop_crtc_gamma_set call to the end of
vop_crtc_atomic_enable after the clocks and CRTC are enabled; otherwise VOP
regs are written to before the VOP's clocks are enabled which is a no-no and
can cause a hang if re-enabling the CRTC after gamma has been set.
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 | 105 +++++++++++++-------
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, 98 insertions(+), 38 deletions(-)
--
2.24.3 (Apple Git-128)
next reply other threads:[~2021-10-19 21:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-19 21:58 Hugh Cole-Baker [this message]
2021-10-19 21:58 ` [PATCH v2 1/3] drm/rockchip: define gamma registers for RK3399 Hugh Cole-Baker
2022-08-07 12:38 ` Milan P. Stanić
2022-09-13 12:58 ` Linus Heckemann
2021-10-19 21:58 ` [PATCH v2 2/3] drm/rockchip: support gamma control on RK3399 Hugh Cole-Baker
2021-10-19 21:58 ` [PATCH v2 3/3] arm64: dts: rockchip: enable " Hugh Cole-Baker
2022-09-15 14:40 ` Robin Murphy
2022-09-15 16:53 ` Hugh Cole-Baker
2022-09-15 17:11 ` Robin Murphy
2022-09-15 13:40 ` (subset) [PATCH v2 0/3] drm/rockchip: support " Heiko Stuebner
2022-09-15 13:49 ` Heiko Stuebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211019215843.42718-1-sigmaris@gmail.com \
--to=sigmaris@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ezequiel@collabora.com \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).