Commit 76ce87ca authored by Jernej Skrabec's avatar Jernej Skrabec Committed by Maxime Ripard

drm/sun4i: dw-hdmi: Add quirk for setting TMDS clock

It turns out that H6 HDMI BSP kernel driver doesn't change TMDS rate at
all. At this point it is not clear whether it is just not necessary or
it would cause some kind of issues.

Add a quirk for it.
Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarJernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-18-jernej.skrabec@siol.net
parent 79971521
...@@ -21,7 +21,8 @@ static void sun8i_dw_hdmi_encoder_mode_set(struct drm_encoder *encoder, ...@@ -21,7 +21,8 @@ static void sun8i_dw_hdmi_encoder_mode_set(struct drm_encoder *encoder,
{ {
struct sun8i_dw_hdmi *hdmi = encoder_to_sun8i_dw_hdmi(encoder); struct sun8i_dw_hdmi *hdmi = encoder_to_sun8i_dw_hdmi(encoder);
clk_set_rate(hdmi->clk_tmds, mode->crtc_clock * 1000); if (hdmi->quirks->set_rate)
clk_set_rate(hdmi->clk_tmds, mode->crtc_clock * 1000);
} }
static const struct drm_encoder_helper_funcs static const struct drm_encoder_helper_funcs
...@@ -235,6 +236,7 @@ static int sun8i_dw_hdmi_remove(struct platform_device *pdev) ...@@ -235,6 +236,7 @@ static int sun8i_dw_hdmi_remove(struct platform_device *pdev)
static const struct sun8i_dw_hdmi_quirks sun8i_a83t_quirks = { static const struct sun8i_dw_hdmi_quirks sun8i_a83t_quirks = {
.mode_valid = sun8i_dw_hdmi_mode_valid_a83t, .mode_valid = sun8i_dw_hdmi_mode_valid_a83t,
.set_rate = true,
}; };
static const struct of_device_id sun8i_dw_hdmi_dt_ids[] = { static const struct of_device_id sun8i_dw_hdmi_dt_ids[] = {
......
...@@ -173,6 +173,7 @@ struct sun8i_hdmi_phy { ...@@ -173,6 +173,7 @@ struct sun8i_hdmi_phy {
struct sun8i_dw_hdmi_quirks { struct sun8i_dw_hdmi_quirks {
enum drm_mode_status (*mode_valid)(struct drm_connector *connector, enum drm_mode_status (*mode_valid)(struct drm_connector *connector,
const struct drm_display_mode *mode); const struct drm_display_mode *mode);
unsigned int set_rate : 1;
}; };
struct sun8i_dw_hdmi { struct sun8i_dw_hdmi {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment