[Intel-gfx] [PATCH 3/3] drm: Add retries for dp dual mode read
Shashank Sharma
shashank.sharma at intel.com
Tue Aug 22 14:53:51 UTC 2017
>From the CI builds, its been observed that during a driver
reload/insert, dp dual mode read function sometimes fails to
read from dual mode devices (like LSPCON) over i2c-over-aux
channel. This patch adds some delay and few retries, allowing
a scope for these devices to settle down.
V3: Introduced this patch
Cc: Ville Syrjala <ville.syrjala at linux.intel.com>
Cc: Imre Deak <imre.deak at intel.com>
Signed-off-by: Shashank Sharma <shashank.sharma at intel.com>
---
drivers/gpu/drm/drm_dp_dual_mode_helper.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_dp_dual_mode_helper.c b/drivers/gpu/drm/drm_dp_dual_mode_helper.c
index fc8c7ac..bb34ff8 100644
--- a/drivers/gpu/drm/drm_dp_dual_mode_helper.c
+++ b/drivers/gpu/drm/drm_dp_dual_mode_helper.c
@@ -75,8 +75,15 @@ ssize_t drm_dp_dual_mode_read(struct i2c_adapter *adapter,
},
};
int ret;
+ int retry;
+
+ for (retry = 5; ; retry--) {
+ ret = i2c_transfer(adapter, msgs, ARRAY_SIZE(msgs));
+ if (ret > 0 || !retry)
+ break;
+ usleep_range(500, 1000);
+ }
- ret = i2c_transfer(adapter, msgs, ARRAY_SIZE(msgs));
if (ret < 0)
return ret;
if (ret != ARRAY_SIZE(msgs))
--
2.7.4
More information about the Intel-gfx
mailing list