[PATCH] drm/i915: Add delay on DPCD reads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Additional 50 ms delay is needed between DPCD reads on HP Bizlink 1326
DP to VGA adapter. Having said that, I haven't noticed a need for
additional delay between DPCD reads on other DP-VGA dongles.

While at it, let's replace mdelay() with usleep_range() routine.

Signed-off-by: Mika Kahola <mika.kahola@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_dp.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 0e326e7..ff3883c 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3125,9 +3125,11 @@ intel_dp_dpcd_read_wake(struct drm_dp_aux *aux, unsigned int offset,
 
 	for (i = 0; i < 3; i++) {
 		ret = drm_dp_dpcd_read(aux, offset, buffer, size);
-		if (ret == size)
+		if (ret == size) {
+			usleep_range(50000, 50100);
 			return ret;
-		msleep(1);
+		}
+		usleep_range(1000, 1100);
 	}
 
 	return ret;
-- 
1.9.1

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux