Skip to content

Commit

Permalink
Revert "drm/meson: add HDMI div40 TMDS mode"
Browse files Browse the repository at this point in the history
This reverts commit d7d8fb7.
  • Loading branch information
superna9999 committed Mar 13, 2019
1 parent d6f41dc commit 82226d9
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions drivers/gpu/drm/meson/meson_dw_hdmi.c
Expand Up @@ -365,8 +365,7 @@ static int dw_hdmi_phy_init(struct dw_hdmi *hdmi, void *data,
unsigned int wr_clk =
readl_relaxed(priv->io_base + _REG(VPU_HDMI_SETTING));

DRM_DEBUG_DRIVER("\"%s\" div%d\n", mode->name,
mode->clock > 340000 ? 40 : 10);
DRM_DEBUG_DRIVER("\"%s\"\n", mode->name);

/* Enable clocks */
regmap_update_bits(priv->hhi, HHI_HDMI_CLK_CNTL, 0xffff, 0x100);
Expand All @@ -386,17 +385,9 @@ static int dw_hdmi_phy_init(struct dw_hdmi *hdmi, void *data,
/* Enable normal output to PHY */
dw_hdmi_top_write(dw_hdmi, HDMITX_TOP_BIST_CNTL, BIT(12));

/* TMDS pattern setup (TOFIX Handle the YUV420 case) */
if (mode->clock > 340000) {
dw_hdmi_top_write(dw_hdmi, HDMITX_TOP_TMDS_CLK_PTTN_01, 0);
dw_hdmi_top_write(dw_hdmi, HDMITX_TOP_TMDS_CLK_PTTN_23,
0x03ff03ff);
} else {
dw_hdmi_top_write(dw_hdmi, HDMITX_TOP_TMDS_CLK_PTTN_01,
0x001f001f);
dw_hdmi_top_write(dw_hdmi, HDMITX_TOP_TMDS_CLK_PTTN_23,
0x001f001f);
}
/* TMDS pattern setup (TOFIX pattern for 4k2k scrambling) */
dw_hdmi_top_write(dw_hdmi, HDMITX_TOP_TMDS_CLK_PTTN_01, 0x001f001f);
dw_hdmi_top_write(dw_hdmi, HDMITX_TOP_TMDS_CLK_PTTN_23, 0x001f001f);

/* Load TMDS pattern */
dw_hdmi_top_write(dw_hdmi, HDMITX_TOP_TMDS_CLK_PTTN_CNTL, 0x1);
Expand All @@ -422,8 +413,6 @@ static int dw_hdmi_phy_init(struct dw_hdmi *hdmi, void *data,
/* Disable clock, fifo, fifo_wr */
regmap_update_bits(priv->hhi, HHI_HDMI_PHY_CNTL1, 0xf, 0);

dw_hdmi_set_high_tmds_clock_ratio(hdmi);

msleep(100);

/* Reset PHY 3 times in a row */
Expand Down Expand Up @@ -568,10 +557,6 @@ dw_hdmi_mode_valid(struct drm_connector *connector,

DRM_DEBUG_DRIVER("Modeline " DRM_MODE_FMT "\n", DRM_MODE_ARG(mode));

/* If sink max TMDS clock, we reject the mode */
if (mode->clock > connector->display_info.max_tmds_clock)
return MODE_BAD;

/* Check against non-VIC supported modes */
if (!vic) {
status = meson_venc_hdmi_supported_mode(mode);
Expand Down

0 comments on commit 82226d9

Please sign in to comment.