From: Arun Iyengar via B4 Relay <devnull+aiyengar1990.gmail.com@kernel.org>
To: "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>,
Damon Ding <damon.ding@rock-chips.com>,
dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Arun Iyengar <aiyengar1990@gmail.com>
Subject: [PATCH v4 5/8] drm/rockchip: vop2: Only accept AFBC YTR for 8 bit RGB on RK3588
Date: Thu, 19 Nov 2026 05:21:46 +0000 [thread overview]
Message-ID: <20261119-vop2-fixes-v4-5-4b8f5e7148c9@gmail.com> (raw)
In-Reply-To: <20261119-vop2-fixes-v4-0-4b8f5e7148c9@gmail.com>
From: Arun Iyengar <aiyengar1990@gmail.com>
According to the TRM, the AFBC decoder of the RK3588 Cluster windows
supports the lossless colour transform (YTR) only for the 8 bit RGB
formats. An RGB565 buffer with YTR gives a black picture and
POST_BUF_EMPTY, while the same buffer without YTR displays fine.
Don't accept YTR for any other format on RK3588.
Fixes: 5a028e8f062f ("drm/rockchip: vop2: Add support for rk3588")
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
index e8ef83d6924b..1408b539c311 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
@@ -396,6 +396,15 @@ static bool rockchip_vop2_mod_supported(struct drm_plane *plane, u32 format,
return false;
}
+ /* AFBC YTR on 3588 is for 8bpc RGB only */
+ if (vop2->version == VOP_VERSION_RK3588 && drm_is_afbc(modifier) &&
+ (modifier & AFBC_FORMAT_MOD_YTR) &&
+ vop2_convert_afbc_format(format) != VOP2_AFBC_FMT_ARGB8888 &&
+ vop2_convert_afbc_format(format) != VOP2_AFBC_FMT_RGB888) {
+ drm_dbg_kms(vop2->drm, "Only support YTR with 8bpc RGB formats\n");
+ return false;
+ }
+
/* Linear is otherwise supported everywhere */
if (modifier == DRM_FORMAT_MOD_LINEAR)
return true;
--
2.55.0
next prev parent reply other threads:[~2026-11-19 5:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 5:21 [PATCH v4 0/8] drm/rockchip: vop2: RK3588 clocking, sync polarity and window fixes Arun Iyengar via B4 Relay
2026-11-19 5:21 ` [PATCH v4 1/8] drm/rockchip: vop2: Take the UV plane address from the second GEM object Arun Iyengar via B4 Relay
2026-11-19 5:21 ` [PATCH v4 2/8] drm/rockchip: vop2: Don't use uninitialised dividers on RK3588 Arun Iyengar via B4 Relay
2026-11-19 5:21 ` [PATCH v4 3/8] drm/rockchip: vop2: Fix the HDMI sync polarity " Arun Iyengar via B4 Relay
2026-11-19 5:21 ` [PATCH v4 4/8] drm/rockchip: vop2: Fix the HDMI sync polarity bit order " Arun Iyengar via B4 Relay
2026-11-19 5:21 ` Arun Iyengar via B4 Relay [this message]
2026-11-19 5:21 ` [PATCH v4 6/8] drm/rockchip: vop2: Find the first mixer of a video port with Esmart3 too Arun Iyengar via B4 Relay
2026-11-19 5:21 ` [PATCH v4 7/8] drm/rockchip: vop2: Keep the other LUT_PORT_SEL fields on gamma LUT updates Arun Iyengar via B4 Relay
2026-11-19 5:21 ` [PATCH v4 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=20261119-vop2-fixes-v4-5-4b8f5e7148c9@gmail.com \
--to=devnull+aiyengar1990.gmail.com@kernel.org \
--cc=airlied@gmail.com \
--cc=aiyengar1990@gmail.com \
--cc=andyshrk@163.com \
--cc=chaoyi.chen@rock-chips.com \
--cc=damon.ding@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
all inboxes | Powered by JetHome®