diff options
author | Tatenda Chipeperekwa <tatendac@codeaurora.org> | 2016-07-05 14:25:44 -0700 |
---|---|---|
committer | Kyle Yan <kyan@codeaurora.org> | 2016-07-06 15:41:02 -0700 |
commit | f47beac1930de6e5985d243878d31f30295fefb1 (patch) | |
tree | 0c31881478867c668f85e5e305c2334aaf332b4d | |
parent | f600d8b9ec91f477d6b7a83cb60c83d15de51167 (diff) |
msm: mdss: hdmi: fix deep color enable and audio clock
Enable deep color only for msmcobalt platform. Furthermore,
adjust the pixel clock reported to the audio driver when
deep color is enabled so that it matches the clock configured
when the interface is turned on.
CRs-Fixed: 1034047
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Change-Id: I48a767f7673defe60156c305e39f1ce4aa44306b
-rw-r--r-- | drivers/video/fbdev/msm/mdss_hdmi_tx.c | 13 | ||||
-rw-r--r-- | drivers/video/fbdev/msm/mdss_hdmi_tx.h | 1 |
2 files changed, 11 insertions, 3 deletions
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.c b/drivers/video/fbdev/msm/mdss_hdmi_tx.c index 33f18cd28de9..3d773371713d 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_tx.c +++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.c @@ -287,7 +287,7 @@ static inline bool hdmi_tx_is_hdcp_enabled(struct hdmi_tx_ctrl *hdmi_ctrl) static inline bool hdmi_tx_dc_support(struct hdmi_tx_ctrl *hdmi_ctrl) { - return hdmi_ctrl->dc_support && + return hdmi_ctrl->dc_feature_on && hdmi_ctrl->dc_support && (hdmi_edid_get_deep_color( hdmi_tx_get_fd(HDMI_TX_FEAT_EDID)) & BIT(1)); } @@ -2204,8 +2204,12 @@ static int hdmi_tx_check_capability(struct hdmi_tx_ctrl *hdmi_ctrl) } } - DEV_DBG("%s: Features <HDMI:%s, HDCP:%s>\n", __func__, - hdmi_disabled ? "OFF" : "ON", hdcp_disabled ? "OFF" : "ON"); + if (hdmi_ctrl->hdmi_tx_version >= HDMI_TX_VERSION_403) + hdmi_ctrl->dc_feature_on = true; + + DEV_DBG("%s: Features <HDMI:%s, HDCP:%s, Deep Color:%s>\n", __func__, + hdmi_disabled ? "OFF" : "ON", hdcp_disabled ? "OFF" : "ON", + hdmi_ctrl->dc_feature_on ? "OFF" : "ON"); if (hdmi_disabled) { DEV_ERR("%s: HDMI disabled\n", __func__); @@ -2837,6 +2841,9 @@ static int hdmi_tx_setup_tmds_clk_rate(struct hdmi_tx_ctrl *hdmi_ctrl) rate = timing->pixel_freq / rate_ratio; + if (hdmi_tx_dc_support(hdmi_ctrl)) + rate += rate >> 2; + end: return rate; } diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.h b/drivers/video/fbdev/msm/mdss_hdmi_tx.h index b606ffedaa26..462edac31c09 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_tx.h +++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.h @@ -126,6 +126,7 @@ struct hdmi_tx_ctrl { bool hdcp22_present; bool power_data_enable[HDMI_TX_MAX_PM]; bool dc_support; + bool dc_feature_on; void (*hdmi_tx_hpd_done)(void *data); void *downstream_data; |