diff options
| author | Zhiming Weng <czweng@codeaurora.org> | 2017-10-20 15:48:27 +0800 |
|---|---|---|
| committer | Zhiming Weng <czweng@codeaurora.org> | 2017-10-20 15:50:15 +0800 |
| commit | 9d011882322fffd8a503ea7675e67a4c94183297 (patch) | |
| tree | 845875fc64be15ddff8e99f92b592f07516a1e06 /drivers/media | |
| parent | b99844d8a3a4ec71119113e14e7e0f631450c1ae (diff) | |
msm: cec: fix off by one in retransmit count
Request the correct number of retransmits during TX.
Change-Id: I724235987e868b0f02a3ea0f7d530063fd557a23
CRs-Fixed: 2117556
Signed-off-by: Zhiming Weng <czweng@codeaurora.org>
Diffstat (limited to 'drivers/media')
| -rw-r--r-- | drivers/media/platform/msm/sde/cec/sde_hdmi_cec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/platform/msm/sde/cec/sde_hdmi_cec.c b/drivers/media/platform/msm/sde/cec/sde_hdmi_cec.c index b3798e8a9d24..f56d822ad335 100644 --- a/drivers/media/platform/msm/sde/cec/sde_hdmi_cec.c +++ b/drivers/media/platform/msm/sde/cec/sde_hdmi_cec.c @@ -138,6 +138,7 @@ static int sde_hdmi_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, struct sde_hdmi_cec *cec = adap->priv; struct cec_hw_resource *hw = &cec->hw_res; u32 frame_type; + u8 retransmits; int i; u32 line_check_retry = 10; @@ -152,8 +153,9 @@ static int sde_hdmi_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, /* make sure state is cleared */ wmb(); - CEC_REG_WRITE(hw, HDMI_CEC_RETRANSMIT, - ((attempts & 0xF) << 4) | BIT(0)); + retransmits = attempts ? (attempts - 1) : 0; + + CEC_REG_WRITE(hw, HDMI_CEC_RETRANSMIT, (retransmits << 4) | BIT(0)); frame_type = cec_msg_is_broadcast(msg) ? BIT(0) : 0; |
