summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorSandor Yu <Sandor.yu@nxp.com>2018-09-27 14:28:58 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:34:18 +0800
commit6699f37c41ec3643aec08f546878dea75a401ac5 (patch)
tree55b0951873696dc122a6510c50ba7c4009cd0053 /drivers/video
parent6f3a28ffc490852653dc11ecbab13d707addcabc (diff)
MLK-18895: hdmi: Reset HDMI PHY when enable/disable HDCP function
Some HDMI Sink may failed to work when running HDCP enable/disable stress test. HDMI sink may not support change HDCP state on the fly. So reset HDMI PHY and controller to resolve the issue. Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/mxc/mxc_hdmi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/video/fbdev/mxc/mxc_hdmi.c b/drivers/video/fbdev/mxc/mxc_hdmi.c
index 9e844805c0d2..c8aeadda0288 100644
--- a/drivers/video/fbdev/mxc/mxc_hdmi.c
+++ b/drivers/video/fbdev/mxc/mxc_hdmi.c
@@ -194,6 +194,7 @@ extern const struct fb_videomode mxc_cea_mode[64];
extern void mxc_hdmi_cec_handle(u16 cec_stat);
static void mxc_hdmi_setup(struct mxc_hdmi *hdmi, unsigned long event);
+static void mxc_hdmi_phy_disable(struct mxc_hdmi *hdmi);
static void hdmi_enable_overflow_interrupts(void);
static void hdmi_disable_overflow_interrupts(void);
@@ -337,6 +338,7 @@ static ssize_t mxc_hdmi_store_hdcp_enable(struct device *dev,
char event_string[32];
char *envp[] = { event_string, NULL };
unsigned long value;
+ u8 clkdis;
int ret;
ret = kstrtoul(buf, 10, &value);
@@ -345,6 +347,13 @@ static ssize_t mxc_hdmi_store_hdcp_enable(struct device *dev,
hdmi->hdmi_data.hdcp_enable = value;
+ /* Disable All HDMI clock and HDMI PHY */
+ clkdis = hdmi_readb(HDMI_MC_CLKDIS);
+ clkdis |= 0x5f;
+ hdmi_writeb(clkdis, HDMI_MC_CLKDIS);
+ mxc_hdmi_phy_disable(hdmi);
+ hdmi_disable_overflow_interrupts();
+
/* Reconfig HDMI for HDCP */
mxc_hdmi_setup(hdmi, 0);