mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
HDMI: rk3368/rk3288: If HDCP is enabled in uboot, do not set again.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
This commit is contained in:
@@ -196,8 +196,9 @@ static void rockchip_hdmiv2_hdcp_start(struct hdmi *hdmi)
|
||||
m_ENCRYPT_DISBALE | m_PH2UPSHFTENC,
|
||||
v_ENCRYPT_DISBALE(0) | v_PH2UPSHFTENC(1));
|
||||
/* Reset HDCP Engine */
|
||||
hdmi_msk_reg(hdmi_dev, A_HDCPCFG1,
|
||||
m_HDCP_SW_RST, v_HDCP_SW_RST(0));
|
||||
if (hdmi_readl(hdmi_dev, MC_CLKDIS) & m_HDCPCLK_DISABLE)
|
||||
hdmi_msk_reg(hdmi_dev, A_HDCPCFG1,
|
||||
m_HDCP_SW_RST, v_HDCP_SW_RST(0));
|
||||
|
||||
hdmi_writel(hdmi_dev, A_APIINTMSK, 0x00);
|
||||
hdmi_msk_reg(hdmi_dev, A_HDCPCFG0, m_RX_DETECT, v_RX_DETECT(1));
|
||||
@@ -296,6 +297,7 @@ static DEVICE_ATTR(trytimes, S_IRUGO|S_IWUSR,
|
||||
static int hdcp_init(struct hdmi *hdmi)
|
||||
{
|
||||
int ret;
|
||||
struct hdmi_dev *hdmi_dev = hdmi->property->priv;
|
||||
|
||||
mdev.minor = MISC_DYNAMIC_MINOR;
|
||||
mdev.name = "hdcp";
|
||||
@@ -334,7 +336,8 @@ static int hdcp_init(struct hdmi *hdmi)
|
||||
pr_err("HDCP: request_firmware_nowait failed: %d\n", ret);
|
||||
goto error4;
|
||||
}
|
||||
|
||||
if ((hdmi_readl(hdmi_dev, MC_CLKDIS) & m_HDCPCLK_DISABLE) == 0)
|
||||
hdcp->enable = 1;
|
||||
hdmi->ops->hdcp_cb = rockchip_hdmiv2_hdcp_start;
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -1288,9 +1288,9 @@ static int hdmi_dev_config_video(struct hdmi *hdmi, struct hdmi_video *vpara)
|
||||
}
|
||||
hdmi_msk_reg(hdmi_dev, FC_DBGFORCE,
|
||||
m_FC_FORCEVIDEO, v_FC_FORCEVIDEO(1));
|
||||
hdmi_writel(hdmi_dev, MC_CLKDIS, m_HDCPCLK_DISABLE);
|
||||
}
|
||||
|
||||
hdmi_writel(hdmi_dev, MC_CLKDIS, m_HDCPCLK_DISABLE);
|
||||
if (rockchip_hdmiv2_video_framecomposer(hdmi, vpara) < 0)
|
||||
return -1;
|
||||
|
||||
@@ -1598,7 +1598,8 @@ static int hdmi_dev_insert(struct hdmi *hdmi)
|
||||
struct hdmi_dev *hdmi_dev = hdmi->property->priv;
|
||||
|
||||
HDMIDBG("%s\n", __func__);
|
||||
hdmi_writel(hdmi_dev, MC_CLKDIS, m_HDCPCLK_DISABLE);
|
||||
if (!hdmi->uboot)
|
||||
hdmi_writel(hdmi_dev, MC_CLKDIS, m_HDCPCLK_DISABLE);
|
||||
return HDMI_ERROR_SUCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user