summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/video/fbdev/msm/mdss_hdmi_edid.c5
-rw-r--r--drivers/video/fbdev/msm/mdss_hdmi_tx.c21
2 files changed, 18 insertions, 8 deletions
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_edid.c b/drivers/video/fbdev/msm/mdss_hdmi_edid.c
index 36209e36b324..3d8fe2ceebac 100644
--- a/drivers/video/fbdev/msm/mdss_hdmi_edid.c
+++ b/drivers/video/fbdev/msm/mdss_hdmi_edid.c
@@ -2478,6 +2478,11 @@ bool hdmi_edid_is_s3d_mode_supported(void *input, u32 video_mode, u32 s3d_mode)
struct hdmi_edid_ctrl *edid_ctrl = (struct hdmi_edid_ctrl *)input;
struct hdmi_edid_sink_data *sink_data;
+ if (!edid_ctrl) {
+ DEV_ERR("%s: invalid input\n", __func__);
+ return false;
+ }
+
sink_data = &edid_ctrl->sink_data;
for (i = 0; i < sink_data->num_of_elements; ++i) {
if (sink_data->disp_mode_list[i].video_format != video_mode)
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.c b/drivers/video/fbdev/msm/mdss_hdmi_tx.c
index d573bd1eb0ba..04c7ec326a47 100644
--- a/drivers/video/fbdev/msm/mdss_hdmi_tx.c
+++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.c
@@ -1610,14 +1610,18 @@ static void hdmi_tx_hdcp_cb_work(struct work_struct *work)
}
if (hdmi_tx_is_panel_on(hdmi_ctrl)) {
- DEV_DBG("%s: Reauthenticating\n", __func__);
- rc = hdmi_ctrl->hdcp_ops->reauthenticate(
- hdmi_ctrl->hdcp_data);
- if (rc)
- DEV_ERR("%s: HDCP reauth failed. rc=%d\n",
- __func__, rc);
+ pr_debug("%s: Reauthenticating\n", __func__);
+ if (hdmi_ctrl->hdcp_ops && hdmi_ctrl->hdcp_data) {
+ rc = hdmi_ctrl->hdcp_ops->reauthenticate(
+ hdmi_ctrl->hdcp_data);
+ if (rc)
+ pr_err("%s: HDCP reauth failed. rc=%d\n",
+ __func__, rc);
+ } else
+ pr_err("%s: NULL HDCP Ops and Data\n",
+ __func__);
} else {
- DEV_DBG("%s: Not reauthenticating. Cable not conn\n",
+ pr_debug("%s: Not reauthenticating. Cable not conn\n",
__func__);
}
@@ -2284,7 +2288,8 @@ static void hdmi_tx_update_hdcp_info(struct hdmi_tx_ctrl *hdmi_ctrl)
if (hdmi_ctrl->hdcp14_present) {
fd = hdmi_tx_get_fd(HDMI_TX_FEAT_HDCP);
- ops = hdcp_1x_start(fd);
+ if (fd)
+ ops = hdcp_1x_start(fd);
}
}