dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Vicente Bergas <vicencb@gmail.com>
To: "Robin Murphy" <robin.murphy@arm.com>,
	"Jonas Karlman" <jonas@kwiboo.se>,
	"Douglas Anderson" <dianders@chromium.org>,
	crj <algea.cao@rock-chips.com>,
	"Andy Yan" <andy.yan@rock-chips.com>,
	"Sandy Huang" <hjc@rock-chips.com>,
	"Heiko Stübner" <heiko@sntech.de>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org,
	linux-rockchip@lists.infradead.org
Cc: Vicente Bergas <vicencb@gmail.com>
Subject: [PATCH v3] drm: rockchip: hdmi: enable higher resolutions than FHD
Date: Tue,  1 Dec 2020 17:06:13 +0100	[thread overview]
Message-ID: <20201201160613.1419-1-vicencb@gmail.com> (raw)

This patch enables a QHD HDMI monitor to work at native resolution.
Tested on a Sapphire board with RK3399 connected to a Q27q-10 monitor at 2560x1440@60

Messages like
dwhdmi-rockchip ff940000.hdmi: PHY configuration failed (clock 148501000)
and like
dwhdmi-rockchip ff940000.hdmi: PHY configuration failed (clock 241501000)
were present and still are because of vop_crtc_mode_fixup in
drivers/gpu/drm/rockchip/rockchip_drm_vop.c
but this time the display ends up working fine, just after an extra delay
of a few seconds.

Changes since v2:
Just add the strictly required frequency for backwards compatibility.

Changes since v1:
Use alternative clock rounding code proposed by Doug Anderson

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
---
 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
index 23de359a1..e1515d55b 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
@@ -148,6 +148,10 @@ static const struct dw_hdmi_mpll_config rockchip_mpll_cfg[] = {
 			{ 0x214c, 0x0003},
 			{ 0x4064, 0x0003}
 		},
+	}, {
+		241500000, {
+			{ 0x0040, 0x0003},
+		},
 	}, {
 		~0UL, {
 			{ 0x00a0, 0x000a },
@@ -173,6 +177,8 @@ static const struct dw_hdmi_curr_ctrl rockchip_cur_ctr[] = {
 		146250000, { 0x0038, 0x0038, 0x0038 },
 	}, {
 		148500000, { 0x0000, 0x0038, 0x0038 },
+	}, {
+		241500000, { 0x0000,                },
 	}, {
 		~0UL,      { 0x0000, 0x0000, 0x0000},
 	}
-- 
2.29.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2020-12-02  8:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 16:06 Vicente Bergas [this message]
2020-12-14 11:03 ` [PATCH v3] drm: rockchip: hdmi: enable higher resolutions than FHD Vicente Bergas
2020-12-14 12:06   ` Robin Murphy

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=20201201160613.1419-1-vicencb@gmail.com \
    --to=vicencb@gmail.com \
    --cc=airlied@linux.ie \
    --cc=algea.cao@rock-chips.com \
    --cc=andy.yan@rock-chips.com \
    --cc=daniel@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robin.murphy@arm.com \
    /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).