From: Vasily Khoruzhick <anarsoul@gmail.com>
To: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>,
Jonas Karlman <jonas@kwiboo.se>, Tom Rini <trini@konsulko.com>,
Lukasz Majewski <lukma@denx.de>,
Sean Anderson <seanga2@gmail.com>, Simon Glass <sjg@chromium.org>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
Kever Yang <kever.yang@rock-chips.com>,
Anatolij Gustschin <agust@denx.de>, Jagan Teki <jagan@edgeble.ai>,
Quentin Schulz <quentin.schulz@cherry.de>,
u-boot@lists.denx.de
Cc: Vasily Khoruzhick <anarsoul@gmail.com>
Subject: [PATCH v2 2/3] video: rockchip: rk3328: filter unsupported modes
Date: Sun, 23 Mar 2025 15:50:57 -0700 [thread overview]
Message-ID: <20250323225134.2369473-2-anarsoul@gmail.com> (raw)
In-Reply-To: <20250323225134.2369473-1-anarsoul@gmail.com>
While RK3328 is capable of 4K resolutions, dw-hdmi driver in u-boot
seems to have some issue with 4K. 1440p or lower works fine.
Limit max resolutions to 2560x1440x60Hz, by filtering the modes with
pixel clock > 297MHz
Fixes: f3ea872970d603 ("video: rockchip: Add rk3328 hdmi support")
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
v2: add a comment that max pixel clock limit is a workaround
drivers/video/rockchip/rk3328_hdmi.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/video/rockchip/rk3328_hdmi.c b/drivers/video/rockchip/rk3328_hdmi.c
index 763669c09be..ff351aaac7c 100644
--- a/drivers/video/rockchip/rk3328_hdmi.c
+++ b/drivers/video/rockchip/rk3328_hdmi.c
@@ -105,9 +105,20 @@ static int rk3328_hdmi_probe(struct udevice *dev)
return 0;
}
+static bool rk3328_hdmi_mode_valid(struct udevice *dev,
+ const struct display_timing *timing)
+{
+ /* Limit pixel clock to 297MHz. While RK3328 support higher rates and it
+ * works in Linux, it doesn't seem to work in u-boot. That limits max
+ * resolution to 1440p
+ */
+ return timing->pixelclock.typ <= 297000000;
+}
+
static const struct dm_display_ops rk3328_hdmi_ops = {
.read_edid = rk_hdmi_read_edid,
.enable = rk3328_hdmi_enable,
+ .mode_valid = rk3328_hdmi_mode_valid,
};
static const struct udevice_id rk3328_hdmi_ids[] = {
--
2.49.0
next prev parent reply other threads:[~2025-03-23 22:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-23 22:50 [PATCH v2 1/3] clk: rockchip: rk3328: use HDMIPHY PLL as a clock parent for VOP_DCLK Vasily Khoruzhick
2025-03-23 22:50 ` Vasily Khoruzhick [this message]
2025-03-24 5:36 ` [PATCH v2 2/3] video: rockchip: rk3328: filter unsupported modes Matwey V. Kornilov
2025-03-24 6:48 ` Vasily Khoruzhick
2025-03-30 11:57 ` Jonas Karlman
2025-04-01 5:26 ` Vasily Khoruzhick
2025-03-23 22:50 ` [PATCH v2 3/3] rockchip: rock64-rk3328_defconfig: enable HDMI output and USB keyboard Vasily Khoruzhick
2025-03-30 11:44 ` Jonas Karlman
2025-03-30 11:52 ` Matwey V. Kornilov
2025-03-30 12:11 ` Jonas Karlman
2025-03-31 22:16 ` Vasily Khoruzhick
2025-04-01 7:56 ` Jonas Karlman
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=20250323225134.2369473-2-anarsoul@gmail.com \
--to=anarsoul@gmail.com \
--cc=agust@denx.de \
--cc=jagan@edgeble.ai \
--cc=jonas@kwiboo.se \
--cc=kever.yang@rock-chips.com \
--cc=lukma@denx.de \
--cc=matwey.kornilov@gmail.com \
--cc=philipp.tomsich@vrull.eu \
--cc=quentin.schulz@cherry.de \
--cc=seanga2@gmail.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.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