diff options
| author | Abhishek Kharbanda <akharban@codeaurora.org> | 2013-07-01 11:52:08 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:19:17 -0700 |
| commit | 0369cffb8b5cb174eea3fa7166c1dd8a0e6bae2e (patch) | |
| tree | 85ce628f6f7e0a74a629b965ac08079315823dfd /drivers/video/fbdev | |
| parent | 4327b4ea5c494c22493deece4227e0b98dcf5fd4 (diff) | |
msm8974: mhl: set hpd, tmds based on path_en bit
Set HPD and TMDS pass-through only after receiving
PATH_EN from the sink and reading all device
capability bytes from the sink.
Making MHL wait until the PATH_EN bit has been set by the
sink/dongle is in conformance with the MHL spec.
This change prevents incorrect behavior in usecases
such as meeting timing requirements in test 1A-02 HDCP
compliance test suite, disabling hpd when TV is powered off
with MHL cable connected to the TX.
CRs-Fixed: 504737
CRs-Fixed: 481930
Change-Id: Id2c1fb9d2dbe10b1310958021cca3533790e7394
Signed-off-by: Abhishek Kharbanda <akharban@codeaurora.org>
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
| -rw-r--r-- | drivers/video/fbdev/msm/mhl_msc.c | 13 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mhl_sii8334.c | 6 |
2 files changed, 11 insertions, 8 deletions
diff --git a/drivers/video/fbdev/msm/mhl_msc.c b/drivers/video/fbdev/msm/mhl_msc.c index 15811bb88537..d0f93cfd4055 100644 --- a/drivers/video/fbdev/msm/mhl_msc.c +++ b/drivers/video/fbdev/msm/mhl_msc.c @@ -224,12 +224,16 @@ int mhl_msc_command_done(struct mhl_tx_ctrl *mhl_ctrl, case MHL_WRITE_STAT: if (req->offset == MHL_STATUS_REG_LINK_MODE) { if (req->payload.data[0] - & MHL_STATUS_PATH_ENABLED) + & MHL_STATUS_PATH_ENABLED) { /* Enable TMDS output */ mhl_tmds_ctrl(mhl_ctrl, TMDS_ENABLE); - else + if (mhl_ctrl->devcap_state == MHL_DEVCAP_ALL) + mhl_drive_hpd(mhl_ctrl, HPD_UP); + } else { /* Disable TMDS output */ mhl_tmds_ctrl(mhl_ctrl, TMDS_DISABLE); + mhl_drive_hpd(mhl_ctrl, HPD_DOWN); + } } break; case MHL_READ_DEVCAP: @@ -245,8 +249,9 @@ int mhl_msc_command_done(struct mhl_tx_ctrl *mhl_ctrl, pr_debug("%s: devcap pow bit unset\n", __func__); break; - case DEVCAP_OFFSET_MHL_VERSION: - case DEVCAP_OFFSET_INT_STAT_SIZE: + case DEVCAP_OFFSET_RESERVED: + mhl_tmds_ctrl(mhl_ctrl, TMDS_ENABLE); + mhl_drive_hpd(mhl_ctrl, HPD_UP); break; } break; diff --git a/drivers/video/fbdev/msm/mhl_sii8334.c b/drivers/video/fbdev/msm/mhl_sii8334.c index 82b56e35f2dd..add15a495152 100644 --- a/drivers/video/fbdev/msm/mhl_sii8334.c +++ b/drivers/video/fbdev/msm/mhl_sii8334.c @@ -794,12 +794,10 @@ static bool is_mhl_powered(void *mhl_ctx) void mhl_tmds_ctrl(struct mhl_tx_ctrl *mhl_ctrl, uint8_t on) { struct i2c_client *client = mhl_ctrl->i2c_handle; - if (on) { + if (on) MHL_SII_REG_NAME_MOD(REG_TMDS_CCTRL, BIT4, BIT4); - mhl_drive_hpd(mhl_ctrl, HPD_UP); - } else { + else MHL_SII_REG_NAME_MOD(REG_TMDS_CCTRL, BIT4, 0x00); - } } void mhl_drive_hpd(struct mhl_tx_ctrl *mhl_ctrl, uint8_t to_state) |
