From: Damon Ding <damon.ding@rock-chips.com>
To: aiyengar1990@gmail.com, "Sandy Huang" <hjc@rock-chips.com>,
"Heiko Stübner" <heiko@sntech.de>, "Andy Yan" <andyshrk@163.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Sascha Hauer" <s.hauer@pengutronix.de>
Cc: Piotr Zalewski <pZ010001011111@proton.me>,
Chaoyi Chen <chaoyi.chen@rock-chips.com>,
dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 4/8] drm/rockchip: vop2: Fix the HDMI sync polarity bit order on RK3588
Date: Wed, 18 Nov 2026 17:48:23 +0800 [thread overview]
Message-ID: <abc2d0e2-521c-4ae8-8a8b-e41c8f2bc482@rock-chips.com> (raw)
In-Reply-To: <20261113-vop2-fixes-v3-4-08ae37e83b5c@gmail.com>
Hi Arun,
On 11/14/2026 12:39 AM, Arun Iyengar via B4 Relay wrote:
> From: Arun Iyengar <aiyengar1990@gmail.com>
>
> In GRF_VO1_CON0 the HDMI vsync polarity bit comes before the hsync one
> (bits 5 and 6 for HDMI0, 7 and 8 for HDMI1), but rk3588_get_hdmi_pol()
> puts hsync first. Modes with mixed sync polarities go out with both
> syncs inverted: the HDMI controller sees 1920x1080@144 +HSync -VSync
> as -HSync +VSync in VIDEO_INTERFACE_STATUS0.
>
> Fixes: 5a028e8f062f ("drm/rockchip: vop2: Add support for rk3588")
> Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
> ---
> drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
> index 3e654cb99ddf..6d08988d7007 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
> @@ -1683,13 +1683,13 @@ static u32 rk3588_get_mipi_port_mux(int vp_id)
> return 0;
> }
>
> -/* The sync polarity bits in GRF_VO1_CON0 are set for a negative sync */
> +/* GRF_VO1_CON0: vsync bit below the hsync bit, each set for a negative sync */
> static u32 rk3588_get_hdmi_pol(u32 polflags)
> {
> u32 val;
>
> - val = (polflags & BIT(HSYNC_POSITIVE)) ? 0 : BIT(HSYNC_POSITIVE);
> - val |= (polflags & BIT(VSYNC_POSITIVE)) ? 0 : BIT(VSYNC_POSITIVE);
> + val = (polflags & BIT(VSYNC_POSITIVE)) ? 0 : BIT(0);
> + val |= (polflags & BIT(HSYNC_POSITIVE)) ? 0 : BIT(1);
>
> return val;
> }
>
Oh, this is a good catch. I verified the RK3588 HDMI sync polarity bits
are arranged differently from other interfaces.
Would it make sense to add two macros for these bits under
RK3588_GRF_VO1_CON0 in rockchip_drm_vop2.h:
#define RK3588_HDMI_VSYNC_INVERT BIT(0)
#define RK3588_HDMI_HSYNC_INVERT BIT(1)
rather than using raw BIT(0) and BIT(1)?
Best regards,
Damon
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2026-11-18 9:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 16:39 [PATCH v3 0/8] drm/rockchip: vop2: RK3588 clocking, sync polarity and window fixes Arun Iyengar via B4 Relay
2026-11-13 16:39 ` [PATCH v3 1/8] drm/rockchip: vop2: Take the UV plane address from the second GEM object Arun Iyengar via B4 Relay
2026-11-18 6:21 ` Damon Ding
2026-11-13 16:39 ` [PATCH v3 2/8] drm/rockchip: vop2: Don't use uninitialised dividers on RK3588 Arun Iyengar via B4 Relay
2026-11-18 7:55 ` Damon Ding
2026-11-13 16:39 ` [PATCH v3 3/8] drm/rockchip: vop2: Fix the HDMI sync polarity " Arun Iyengar via B4 Relay
2026-11-13 16:39 ` [PATCH v3 4/8] drm/rockchip: vop2: Fix the HDMI sync polarity bit order " Arun Iyengar via B4 Relay
2026-11-18 9:48 ` Damon Ding [this message]
2026-11-13 16:39 ` [PATCH v3 5/8] drm/rockchip: vop2: Only accept AFBC YTR for 8 bit RGB " Arun Iyengar via B4 Relay
2026-11-13 16:39 ` [PATCH v3 6/8] drm/rockchip: vop2: Find the first mixer of a video port with Esmart3 too Arun Iyengar via B4 Relay
2026-11-13 16:39 ` [PATCH v3 7/8] drm/rockchip: vop2: Keep the other LUT_PORT_SEL fields on gamma LUT updates Arun Iyengar via B4 Relay
2026-11-13 16:39 ` [PATCH v3 8/8] drm/rockchip: vop2: Fix the AFBC offsets of a source that starts inside a superblock Arun Iyengar via B4 Relay
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=abc2d0e2-521c-4ae8-8a8b-e41c8f2bc482@rock-chips.com \
--to=damon.ding@rock-chips.com \
--cc=airlied@gmail.com \
--cc=aiyengar1990@gmail.com \
--cc=andyshrk@163.com \
--cc=chaoyi.chen@rock-chips.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=pZ010001011111@proton.me \
--cc=s.hauer@pengutronix.de \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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