[Intel-gfx] [PATCH v5] drm/i915: Use atomic waits for short non-atomic ones
Chris Wilson
chris at chris-wilson.co.uk
Wed Jun 29 11:37:21 UTC 2016
On Wed, Jun 29, 2016 at 12:27:22PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>
> usleep_range is not recommended for waits shorten than 10us.
>
> Make the wait_for_us use the atomic variant for such waits.
>
> To do so we need to reimplement the _wait_for_atomic macro to
> be safe with regards to preemption and interrupts.
>
> v2: Reimplement _wait_for_atomic to be irq and preemption safe.
> (Chris Wilson and Imre Deak)
>
> v3: Fixed in_atomic check due rebase error.
> v4: Build bug on non-constant timeouts.
> v5: Compile away cpu migration code in atomic paths.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Imre Deak <imre.deak at intel.com>
> Cc: Mika Kuoppala <mika.kuoppala at intel.com>
I like the polish.
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
Using wait_for_hybrid() is really tempting, just need to kick Mika to
finish intel_wait_for_register()...
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list