From: Daniel Kurtz <djkurtz@xxxxxxxxxxxx> Currently, 400kHz i2c transactions on i915 ddc adapters are gated by long polling loops in the wait_for() macro. For the case where the polling loops sleep, make them tighter by converting a msleep(1) to usleep_range(50, 100); A better solution might be to eliminate this polling entirely, and use the i915 interrupts to detect state transitions instead of polling. Signed-off-by: Daniel Kurtz <djkurtz@xxxxxxxxxxxx> BUG=chromium:246465 TEST=i2c reads over ddc succeed. On a scope, single transactions no longer have large gaps. Change-Id: I96cef50ed8a3d0ad8a3c6fa6f079234242fa17d3 Reviewed-on: https://gerrit.chromium.org/gerrit/17937 Reviewed-by: Daniel Kurtz <djkurtz@xxxxxxxxxxxx> Tested-by: Daniel Kurtz <djkurtz@xxxxxxxxxxxx> Commit-Ready: Daniel Kurtz <djkurtz@xxxxxxxxxxxx> Reviewed-on: https://gerrit.chromium.org/gerrit/57458 Tested-by: Yufeng Shen <miletus@xxxxxxxxxxxx> Commit-Queue: Yufeng Shen <miletus@xxxxxxxxxxxx> --- drivers/gpu/drm/i915/intel_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 60ec305..9f32cfc 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -42,7 +42,7 @@ break; \ } \ if (W && drm_can_sleep()) { \ - msleep(W); \ + usleep_range(W * 50, W * 100); \ } else { \ cpu_relax(); \ } \ -- 1.8.3.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx