Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/mediatek: Disable tmds on mt2701

Without that patch if you use specific resolutions like 1280x1024,
I can see distortion in the output. It seems as if the
frequency for updating the pixel of the image is out of sync.

For initialization tmds needs to be active, but can be disabled after init
to fix blurry display

Signed-off-by: chunhui dai <chunhui.dai@mediatek.com>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>

authored by

chunhui dai and committed by
Chun-Kuang Hu
09e872d5 f89c696e

+5
+1
drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c
··· 238 238 239 239 struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf = { 240 240 .flags = CLK_SET_RATE_GATE, 241 + .pll_default_off = true, 241 242 .hdmi_phy_clk_ops = &mtk_hdmi_phy_pll_ops, 242 243 .hdmi_phy_enable_tmds = mtk_hdmi_phy_enable_tmds, 243 244 .hdmi_phy_disable_tmds = mtk_hdmi_phy_disable_tmds,
+3
drivers/phy/mediatek/phy-mtk-hdmi.c
··· 184 184 return PTR_ERR(phy_provider); 185 185 } 186 186 187 + if (hdmi_phy->conf->pll_default_off) 188 + hdmi_phy->conf->hdmi_phy_disable_tmds(hdmi_phy); 189 + 187 190 return of_clk_add_provider(dev->of_node, of_clk_src_simple_get, 188 191 hdmi_phy->pll); 189 192 }
+1
drivers/phy/mediatek/phy-mtk-hdmi.h
··· 21 21 22 22 struct mtk_hdmi_phy_conf { 23 23 unsigned long flags; 24 + bool pll_default_off; 24 25 const struct clk_ops *hdmi_phy_clk_ops; 25 26 void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy); 26 27 void (*hdmi_phy_disable_tmds)(struct mtk_hdmi_phy *hdmi_phy);