public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: use udelay for very short delays
@ 2016-12-15  4:29 Nicholas Mc Guire
  2016-12-15  9:08 ` Jani Nikula
  0 siblings, 1 reply; 13+ messages in thread
From: Nicholas Mc Guire @ 2016-12-15  4:29 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Shashank Sharma, Jani Nikula, David Airlie, intel-gfx, dri-devel,
	linux-kernel, Nicholas Mc Guire

Even on fast systems a 2 microsecond delay is most likely more efficient
as a busy-wait loop. The overhead of a hrtimer does not seem warranted -
change this to a udelay(2).

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---

Problem found by coccinelle:

Patch was compile tested with: x86_64_defconfig (implies CONFIG_DRM_I915)

Patch is against 4.9.0 (localversion-next is next-20161214)

 drivers/gpu/drm/i915/intel_dsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 5b72c50..19fe86b 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -379,7 +379,7 @@ static void bxt_dsi_device_ready(struct intel_encoder *encoder)
 		val &= ~ULPS_STATE_MASK;
 		val |= (ULPS_STATE_ENTER | DEVICE_READY);
 		I915_WRITE(MIPI_DEVICE_READY(port), val);
-		usleep_range(2, 3);
+		udelay(2);
 
 		/* 3. Exit ULPS */
 		val = I915_READ(MIPI_DEVICE_READY(port));
-- 
2.1.4

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

end of thread, other threads:[~2016-12-15 12:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-15  4:29 [PATCH] drm/i915: use udelay for very short delays Nicholas Mc Guire
2016-12-15  9:08 ` Jani Nikula
2016-12-15  9:25   ` [Intel-gfx] " Daniel Vetter
2016-12-15  9:27     ` Daniel Vetter
2016-12-15 10:51       ` Nicholas Mc Guire
2016-12-15 11:39         ` Daniel Vetter
2016-12-15  9:28   ` Nicholas Mc Guire
2016-12-15  9:52     ` Jani Nikula
2016-12-15 10:10       ` Ville Syrjälä
2016-12-15 10:20         ` Jani Nikula
2016-12-15 10:34           ` Nicholas Mc Guire
2016-12-15 11:48             ` Jani Nikula
2016-12-15 11:51             ` Ville Syrjälä

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