hdmirx: close hdcp2.2 when shut down. [4/4]

PD#SWPL-3828

Problem:
hdcp22 access ddr when power shutdown

Solution:
need notify hdcp22 close when power shutdown

Verify:
Local

Change-Id: Iffead6b2dfdd97e6e7ad16e856cb09b42e3783d1
Signed-off-by: yicheng shen <yicheng.shen@amlogic.com>
This commit is contained in:
yicheng shen
2019-01-08 06:02:09 -05:00
committed by Jianxin Pan
parent 2c07dbff32
commit c7b3287d93
4 changed files with 12 additions and 13 deletions

View File

@@ -2450,11 +2450,10 @@ static int aml_hdcp22_pm_notify(struct notifier_block *nb,
rx_pr("hdcp22 kill ok!\n");
else
rx_pr("hdcp22 kill timeout!\n");
hdcp22_kill_esm = 0;
hdcp22_suspend();
hdcp_22_off();
} else if ((event == PM_POST_SUSPEND) && hdcp22_on) {
rx_pr("PM_POST_SUSPEND\n");
hdcp22_resume();
hdcp_22_on();
}
return NOTIFY_OK;
}
@@ -2505,7 +2504,7 @@ static void hdmirx_shutdown(struct platform_device *pdev)
/* phy powerdown */
rx_phy_power_on(0);
if (hdcp22_on)
hdcp22_clk_en(0);
hdcp_22_off();
rx_pr("[hdmirx]: shutdown success\n");
}

View File

@@ -41,7 +41,7 @@
*
*
*/
#define RX_VER1 "ver.2018/12/27"
#define RX_VER1 "ver.2019/01/08"
/*
*
*

View File

@@ -1714,9 +1714,9 @@ void hdmirx_hdcp22_hpd(bool value)
}
/*
* hdcp22_suspend - suspend flow of hdcp2.2
* hdcp_22_off
*/
void hdcp22_suspend(void)
void hdcp_22_off(void)
{
hdcp22_clk_en(0);
/* note: can't pull down hpd before enter suspend */
@@ -1726,16 +1726,16 @@ void hdcp22_suspend(void)
hdmirx_wr_dwc(DWC_HDCP22_CONTROL,
0x0);
if (hdcp22_kill_esm == 0)
/* rx_pr("kill = 1\n"); */
hdmirx_hdcp22_esm_rst();
/* msleep(20); */
else
hdcp22_kill_esm = 0;
rx_pr("hdcp22 off\n");
}
/*
* hdcp22_resume - resume flow of hdcp2.2
* hdcp_22_on
*/
void hdcp22_resume(void)
void hdcp_22_on(void)
{
hdcp22_kill_esm = 0;
/* switch_set_state(&rx.hpd_sdev, 0x0); */

View File

@@ -1170,8 +1170,8 @@ extern void hdcp22_clk_en(bool en);
extern void hdmirx_hdcp22_esm_rst(void);
extern unsigned int rx_sec_set_duk(bool repeater);
extern void hdmirx_hdcp22_init(void);
extern void hdcp22_suspend(void);
extern void hdcp22_resume(void);
extern void hdcp_22_off(void);
extern void hdcp_22_on(void);
extern void hdmirx_hdcp22_hpd(bool value);
extern void esm_set_reset(bool reset);
extern void esm_set_stable(bool stable);