linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jernej Skrabec <jernej.skrabec@siol.net>
To: mripard@kernel.org, wens@csie.org
Cc: sboyd@kernel.org, mturquette@baylibre.com,
	Andre Heider <a.heider@gmail.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	airlied@linux.ie, linux-sunxi@googlegroups.com, daniel@ffwll.ch,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] drm/sun4i: dw-hdmi: always set clock rate
Date: Thu,  4 Feb 2021 19:47:08 +0100	[thread overview]
Message-ID: <20210204184710.1880895-4-jernej.skrabec@siol.net> (raw)
In-Reply-To: <20210204184710.1880895-1-jernej.skrabec@siol.net>

As expected, HDMI controller clock should always match pixel clock. In
the past, changing HDMI controller rate would seemingly worsen
situation. However, that was the result of other bugs which are now
fixed.

Fix that by removing set_rate quirk and always set clock rate.

Fixes: 40bb9d3147b2 ("drm/sun4i: Add support for H6 DW HDMI controller")
Tested-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 4 +---
 drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 1 -
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
index 92add2cef2e7..23773a5e0650 100644
--- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
@@ -21,8 +21,7 @@ static void sun8i_dw_hdmi_encoder_mode_set(struct drm_encoder *encoder,
 {
 	struct sun8i_dw_hdmi *hdmi = encoder_to_sun8i_dw_hdmi(encoder);
 
-	if (hdmi->quirks->set_rate)
-		clk_set_rate(hdmi->clk_tmds, mode->crtc_clock * 1000);
+	clk_set_rate(hdmi->clk_tmds, mode->crtc_clock * 1000);
 }
 
 static const struct drm_encoder_helper_funcs
@@ -295,7 +294,6 @@ static int sun8i_dw_hdmi_remove(struct platform_device *pdev)
 
 static const struct sun8i_dw_hdmi_quirks sun8i_a83t_quirks = {
 	.mode_valid = sun8i_dw_hdmi_mode_valid_a83t,
-	.set_rate = true,
 };
 
 static const struct sun8i_dw_hdmi_quirks sun50i_h6_quirks = {
diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h
index d983746fa194..d4b55af0592f 100644
--- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h
+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h
@@ -179,7 +179,6 @@ struct sun8i_dw_hdmi_quirks {
 	enum drm_mode_status (*mode_valid)(struct dw_hdmi *hdmi, void *data,
 					   const struct drm_display_info *info,
 					   const struct drm_display_mode *mode);
-	unsigned int set_rate : 1;
 	unsigned int use_drm_infoframe : 1;
 };
 
-- 
2.30.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-02-04 18:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 18:47 [PATCH 0/5] sunxi: fix H6 HDMI related issues Jernej Skrabec
2021-02-04 18:47 ` [PATCH 1/5] clk: sunxi-ng: mp: fix parent rate change flag check Jernej Skrabec
2021-02-05  3:22   ` [linux-sunxi] " Chen-Yu Tsai
2021-02-04 18:47 ` [PATCH 2/5] drm/sun4i: tcon: set sync polarity for tcon1 channel Jernej Skrabec
2021-02-05  3:21   ` Chen-Yu Tsai
2021-02-05 16:01     ` Maxime Ripard
2021-02-05 16:21       ` Jernej Škrabec
2021-02-05 16:28         ` Chen-Yu Tsai
2021-02-05 18:47           ` Jernej Škrabec
2021-02-09 10:31             ` Maxime Ripard
2021-02-04 18:47 ` Jernej Skrabec [this message]
2021-02-05  3:22   ` [PATCH 3/5] drm/sun4i: dw-hdmi: always set clock rate Chen-Yu Tsai
2021-02-04 18:47 ` [PATCH 4/5] drm/sun4i: Fix H6 HDMI PHY configuration Jernej Skrabec
2021-02-05  3:22   ` [linux-sunxi] " Chen-Yu Tsai
2021-02-08 11:18     ` Jernej Škrabec
2021-02-04 18:47 ` [PATCH 5/5] drm/sun4i: dw-hdmi: Fix max. frequency for H6 Jernej Skrabec
2021-02-05  3:23   ` [linux-sunxi] " Chen-Yu Tsai

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=20210204184710.1880895-4-jernej.skrabec@siol.net \
    --to=jernej.skrabec@siol.net \
    --cc=a.heider@gmail.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=mripard@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=wens@csie.org \
    /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).