diff options
| author | Ajay Singh Parmar <aparmar@codeaurora.org> | 2016-04-08 09:59:50 -0700 |
|---|---|---|
| committer | Jeevan Shriram <jshriram@codeaurora.org> | 2016-05-05 15:05:53 -0700 |
| commit | 9a313755d210eb5d77638d321b4e607da73093b1 (patch) | |
| tree | e05c573f1c36b8e71ae5f13661907fdb4aca83e0 | |
| parent | 6c3b2881c1e927894471609395174081e43321e5 (diff) | |
msm: mdss: hdmi: check for scrambler override
In some cases, scrambling may need to be forced on or off based on
sink requirements. To support such requirements, scrambler override
may be imposed. If scrambler override has been enabled, use
override value to enable or disable scrambler.
Change-Id: I9556c6457258598e6b6758573bb0263d53e612da
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_hdmi_edid.c | 18 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_hdmi_edid.h | 1 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_hdmi_tx.c | 12 |
3 files changed, 26 insertions, 5 deletions
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_edid.c b/drivers/video/fbdev/msm/mdss_hdmi_edid.c index 018d7519bf8f..ab2c9c0e501f 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_edid.c +++ b/drivers/video/fbdev/msm/mdss_hdmi_edid.c @@ -2346,6 +2346,24 @@ bool hdmi_edid_get_scdc_support(void *input) return scdc_present; } +/** + * hdmi_edid_sink_scramble_override() - check if override has been enabled + * @input: edid data + * + * Return true if scrambling override is enabled false otherwise. + */ +bool hdmi_edid_sink_scramble_override(void *input) +{ + struct hdmi_edid_ctrl *edid_ctrl = (struct hdmi_edid_ctrl *)input; + + if (edid_ctrl->edid_override && + (edid_ctrl->override_data.scramble != -1)) + return true; + + return false; + +} + bool hdmi_edid_get_sink_scrambler_support(void *input) { struct hdmi_edid_ctrl *edid_ctrl = (struct hdmi_edid_ctrl *)input; diff --git a/drivers/video/fbdev/msm/mdss_hdmi_edid.h b/drivers/video/fbdev/msm/mdss_hdmi_edid.h index 6cf0f1240f8a..4dd92ed32364 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_edid.h +++ b/drivers/video/fbdev/msm/mdss_hdmi_edid.h @@ -32,6 +32,7 @@ int hdmi_edid_parser(void *edid_ctrl); u32 hdmi_edid_get_raw_data(void *edid_ctrl, u8 *buf, u32 size); u8 hdmi_edid_get_sink_scaninfo(void *edid_ctrl, u32 resolution); u32 hdmi_edid_get_sink_mode(void *edid_ctrl); +bool hdmi_edid_sink_scramble_override(void *input); bool hdmi_edid_get_sink_scrambler_support(void *input); bool hdmi_edid_get_scdc_support(void *input); int hdmi_edid_get_audio_blk(void *edid_ctrl, diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.c b/drivers/video/fbdev/msm/mdss_hdmi_tx.c index fdd80465fca6..514304948b3e 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_tx.c +++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.c @@ -3311,15 +3311,17 @@ int hdmi_tx_setup_scrambler(struct hdmi_tx_ctrl *hdmi_ctrl) rate = hdmi_tx_setup_tmds_clk_rate(hdmi_ctrl); - if (rate > HDMI_TX_SCRAMBLER_THRESHOLD_RATE_KHZ) { - scrambler_on = true; - tmds_clock_ratio = 1; - } else { - if (hdmi_edid_get_sink_scrambler_support(edid_data)) + scrambler_on = hdmi_edid_get_sink_scrambler_support(edid_data); + + if (!hdmi_edid_sink_scramble_override(edid_data)) { + if (rate > HDMI_TX_SCRAMBLER_THRESHOLD_RATE_KHZ) scrambler_on = true; } if (scrambler_on) { + if (rate > HDMI_TX_SCRAMBLER_THRESHOLD_RATE_KHZ) + tmds_clock_ratio = 1; + rc = hdmi_scdc_write(&hdmi_ctrl->ddc_ctrl, HDMI_TX_SCDC_TMDS_BIT_CLOCK_RATIO_UPDATE, tmds_clock_ratio); |
