[Intel-gfx] [PATCH] CHROMIUM: drm/i915/intel_drv: reduce wait_for polling time
james.ausmus at intel.com
james.ausmus at intel.com
Fri Aug 16 02:30:59 CEST 2013
From: Daniel Kurtz <djkurtz at chromium.org>
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 at chromium.org>
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 at chromium.org>
Tested-by: Daniel Kurtz <djkurtz at chromium.org>
Commit-Ready: Daniel Kurtz <djkurtz at chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/57458
Tested-by: Yufeng Shen <miletus at chromium.org>
Commit-Queue: Yufeng Shen <miletus at chromium.org>
---
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
More information about the Intel-gfx
mailing list