public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm: add retries for lspcon status check
@ 2017-08-11 13:28 Shashank Sharma
  2017-08-11 13:28 ` [PATCH 2/2] drm/i915: Don't give up waiting on INVALID_MODE Shashank Sharma
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Shashank Sharma @ 2017-08-11 13:28 UTC (permalink / raw)
  To: intel-gfx

It's an observation during some CI tests that few LSPCON chips
respond slow while system is under load, and need some delay
while reading current mode status using i2c-over-aux channel.

This patch:
- Adds few retries and delays before declaring a read
  failure from LSPCON hardware.
- Changes the debug level of the print from ERROR->DEBUG
  whereas another patch in I915 will add an ERROR message
  from the caller when we have timed out all our limits.

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
---
 drivers/gpu/drm/drm_dp_dual_mode_helper.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_dp_dual_mode_helper.c b/drivers/gpu/drm/drm_dp_dual_mode_helper.c
index 80e62f6..c63eac8 100644
--- a/drivers/gpu/drm/drm_dp_dual_mode_helper.c
+++ b/drivers/gpu/drm/drm_dp_dual_mode_helper.c
@@ -409,6 +409,7 @@ int drm_lspcon_get_mode(struct i2c_adapter *adapter,
 			enum drm_lspcon_mode *mode)
 {
 	u8 data;
+	u8 retry = 5;
 	int ret = 0;
 
 	if (!mode) {
@@ -417,10 +418,17 @@ int drm_lspcon_get_mode(struct i2c_adapter *adapter,
 	}
 
 	/* Read Status: i2c over aux */
-	ret = drm_dp_dual_mode_read(adapter, DP_DUAL_MODE_LSPCON_CURRENT_MODE,
-				    &data, sizeof(data));
+	do {
+		ret = drm_dp_dual_mode_read(adapter,
+					    DP_DUAL_MODE_LSPCON_CURRENT_MODE,
+					    &data, sizeof(data));
+		if (!ret || !retry--)
+			break;
+		usleep_range(500, 1000);
+	} while (1);
+
 	if (ret < 0) {
-		DRM_ERROR("LSPCON read(0x80, 0x41) failed\n");
+		DRM_DEBUG_KMS("LSPCON read(0x80, 0x41) failed\n");
 		return -EFAULT;
 	}
 
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [PATCH 0/2] Add retries for dp dual mode reads
@ 2017-08-22 16:11 Shashank Sharma
  2017-08-22 16:11 ` [PATCH 2/2] drm/i915: Don't give up waiting on INVALID_MODE Shashank Sharma
  0 siblings, 1 reply; 13+ messages in thread
From: Shashank Sharma @ 2017-08-22 16:11 UTC (permalink / raw)
  To: intel-gfx

Some of the DP dual mode devices (like LSPCON) need some time
to settle down, on specific platfomrs. Its been observed during
IGT CI runs that some of the KBL boards show some i2c-over-aux
failures when driver module is re-inserted or re-loaded.

This patch series adds some retries at various dp_dual_mode
helper functions, to allow these specofic devices to settle
down, and adjusts debug levels for failure messages.

Shashank Sharma (2):
  drm: Add retries for dp dual mode read
  drm/i915: Don't give up waiting on INVALID_MODE

 drivers/gpu/drm/drm_dp_dual_mode_helper.c | 14 +++++++++++---
 drivers/gpu/drm/i915/intel_lspcon.c       |  9 ++++-----
 2 files changed, 15 insertions(+), 8 deletions(-)

-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-08-22 16:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-11 13:28 [PATCH 1/2] drm: add retries for lspcon status check Shashank Sharma
2017-08-11 13:28 ` [PATCH 2/2] drm/i915: Don't give up waiting on INVALID_MODE Shashank Sharma
2017-08-15  0:21   ` Pandiyan, Dhinakaran
2017-08-16 14:08     ` Imre Deak
2017-08-16 15:50     ` Sharma, Shashank
2017-08-16 14:06   ` Imre Deak
2017-08-11 13:47 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm: add retries for lspcon status check Patchwork
2017-08-14 22:46 ` [PATCH 1/2] " Pandiyan, Dhinakaran
2017-08-16 14:05 ` Imre Deak
2017-08-16 15:48   ` Sharma, Shashank
2017-08-16 16:12     ` Imre Deak
2017-08-16 16:21       ` Sharma, Shashank
  -- strict thread matches above, loose matches on Subject: below --
2017-08-22 16:11 [PATCH 0/2] Add retries for dp dual mode reads Shashank Sharma
2017-08-22 16:11 ` [PATCH 2/2] drm/i915: Don't give up waiting on INVALID_MODE Shashank Sharma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox