Skip to contentSkip to conversation

drm/i915: Use EIO instead of EAGAIN for sink CRC error.

PATCH Applied Rodrigo Vivi 2 participants 2 messages Sep 15, 2014 – Sep 16, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 drm/i915: Use EIO instead of EAGAIN for sink CRC error.

If something while getting panel CRC this means that probably hw I/O error so hw is busted and try again shouldn't help much.

---
 drivers/gpu/drm/i915/intel_dp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +3 -3
index fae0fae..963e956 100644
@@ -3473,14 +3473,14 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc)
 	int attempts = 6;
 
 	if (drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_SINK_MISC, &buf) < 0)
-		return -EAGAIN;
+		return -EIO;
 
 	if (!(buf & DP_TEST_CRC_SUPPORTED))
 		return -ENOTTY;
 
 	if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_TEST_SINK,
 			       DP_TEST_SINK_START) < 0)
-		return -EAGAIN;
+		return -EIO;
 
 	drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_SINK_MISC, &buf);
 	test_crc_count = buf & DP_TEST_COUNT_MASK;
@@ -3494,7 +3494,7 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc)
 		return -EIO;
 
 	if (drm_dp_dpcd_read(&intel_dp->aux, DP_TEST_CRC_R_CR, crc, 6) < 0)
-		return -EAGAIN;
+		return -EIO;
 
 	drm_dp_dpcd_writeb(&intel_dp->aux, DP_TEST_SINK, 0);
 	return 0;
Signature · 1 line
1.9.3
#1 lore raw
Quoted 4 lines · Rodrigo Vivi

If something while getting panel CRC this means that probably hw I/O error so hw is busted and try again shouldn't help much.

Queued for -next, thanks for the patch.
-Daniel

Quoted 41 lines
---
 drivers/gpu/drm/i915/intel_dp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +3 -3
index fae0fae..963e956 100644
@@ -3473,14 +3473,14 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc)
 	int attempts = 6;
 
 	if (drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_SINK_MISC, &buf) < 0)
-		return -EAGAIN;
+		return -EIO;
 
 	if (!(buf & DP_TEST_CRC_SUPPORTED))
 		return -ENOTTY;
 
 	if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_TEST_SINK,
 			       DP_TEST_SINK_START) < 0)
-		return -EAGAIN;
+		return -EIO;
 
 	drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_SINK_MISC, &buf);
 	test_crc_count = buf & DP_TEST_COUNT_MASK;
@@ -3494,7 +3494,7 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc)
 		return -EIO;
 
 	if (drm_dp_dpcd_read(&intel_dp->aux, DP_TEST_CRC_R_CR, crc, 6) < 0)
-		return -EAGAIN;
+		return -EIO;
 
 	drm_dp_dpcd_writeb(&intel_dp->aux, DP_TEST_SINK, 0);
 	return 0;
Signature · 6 lines
1.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch