mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
drm/bridge: synopsys: dw-hdmi-qp: Clear ddc write/read bits when ddc transfer failed
If don't clear write/read bits when ddc transmission fails, ddc transmission may always fail no matter how many times retry. Change-Id: I8f1a64432a1fb2afffc9404dcfb911f01f8188ad Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This commit is contained in:
@@ -1082,6 +1082,7 @@ static int dw_hdmi_i2c_read(struct dw_hdmi_qp *hdmi,
|
||||
if (!stat) {
|
||||
dev_err(hdmi->dev, "i2c read time out!\n");
|
||||
hdmi_writel(hdmi, 0x01, I2CM_CONTROL0);
|
||||
hdmi_modb(hdmi, 0, I2CM_WR_MASK, I2CM_INTERFACE_CONTROL0);
|
||||
retry -= 10;
|
||||
continue;
|
||||
}
|
||||
@@ -1090,6 +1091,7 @@ static int dw_hdmi_i2c_read(struct dw_hdmi_qp *hdmi,
|
||||
if (i2c->stat & I2CM_NACK_RCVD_IRQ) {
|
||||
dev_err(hdmi->dev, "i2c read err!\n");
|
||||
hdmi_writel(hdmi, 0x01, I2CM_CONTROL0);
|
||||
hdmi_modb(hdmi, 0, I2CM_WR_MASK, I2CM_INTERFACE_CONTROL0);
|
||||
retry--;
|
||||
usleep_range(10000, 11000);
|
||||
continue;
|
||||
@@ -1164,6 +1166,7 @@ static int dw_hdmi_i2c_write(struct dw_hdmi_qp *hdmi,
|
||||
if (!stat) {
|
||||
dev_err(hdmi->dev, "i2c write time out!\n");
|
||||
hdmi_writel(hdmi, 0x01, I2CM_CONTROL0);
|
||||
hdmi_modb(hdmi, 0, I2CM_WR_MASK, I2CM_INTERFACE_CONTROL0);
|
||||
retry -= 10;
|
||||
continue;
|
||||
}
|
||||
@@ -1172,6 +1175,7 @@ static int dw_hdmi_i2c_write(struct dw_hdmi_qp *hdmi,
|
||||
if (i2c->stat & I2CM_NACK_RCVD_IRQ) {
|
||||
dev_err(hdmi->dev, "i2c write nack!\n");
|
||||
hdmi_writel(hdmi, 0x01, I2CM_CONTROL0);
|
||||
hdmi_modb(hdmi, 0, I2CM_WR_MASK, I2CM_INTERFACE_CONTROL0);
|
||||
retry--;
|
||||
usleep_range(10000, 11000);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user