dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: dri-devel@lists.freedesktop.org
Cc: Michael Riesch <michael.riesch@wolfvision.net>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Sandy Huang <hjc@rock-chips.com>,
	kernel@pengutronix.de
Subject: [PATCH 1/2] drm/rockchip: dw_hdmi: relax mode_valid hook
Date: Mon, 22 Aug 2022 17:20:16 +0200	[thread overview]
Message-ID: <20220822152017.1523679-2-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20220822152017.1523679-1-s.hauer@pengutronix.de>

The driver checks if the pixel clock of the given mode matches an entry
in the mpll config table. The frequencies in the mpll table are meant as
a frequency range up to which the entry works, not as a frequency that
must match the pixel clock. Return MODE_OK when the pixelclock is
smaller than one of the mpll frequencies to allow for more display
resolutions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
index c14f888938688..b6b662dabedc6 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
@@ -251,7 +251,7 @@ dw_hdmi_rockchip_mode_valid(struct dw_hdmi *hdmi, void *data,
 	int i;
 
 	for (i = 0; mpll_cfg[i].mpixelclock != (~0UL); i++) {
-		if (pclk == mpll_cfg[i].mpixelclock) {
+		if (pclk <= mpll_cfg[i].mpixelclock) {
 			valid = true;
 			break;
 		}
-- 
2.30.2


  reply	other threads:[~2022-08-22 15:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-22 15:20 [PATCH 0/2] drm/rockchip: dw_hdmi: Add 4k@30 support Sascha Hauer
2022-08-22 15:20 ` Sascha Hauer [this message]
2022-08-24 16:07   ` [PATCH 1/2] drm/rockchip: dw_hdmi: relax mode_valid hook Robin Murphy
2022-08-25 11:40     ` Sascha Hauer
2022-09-22 13:09       ` Robin Murphy
2022-08-22 15:20 ` [PATCH 2/2] drm/rockchip: dw_hdmi: Add support for 4k@30 resolution Sascha Hauer
2022-08-24  5:43 ` [PATCH 0/2] drm/rockchip: dw_hdmi: Add 4k@30 support Michael Riesch
2022-08-24  7:10   ` Sascha Hauer
2022-08-24  7:07 ` Sascha Hauer
2022-09-03  7:53   ` Andy Yan

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=20220822152017.1523679-2-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hjc@rock-chips.com \
    --cc=kernel@pengutronix.de \
    --cc=michael.riesch@wolfvision.net \
    /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).