[Intel-gfx] [PATCH v2 02/15] drm/i915/tdr: Extend the idea of reset_counter to engine reset

Chris Wilson chris at chris-wilson.co.uk
Fri Jun 17 07:35:32 UTC 2016


On Fri, Jun 17, 2016 at 08:09:02AM +0100, Arun Siluvery wrote:
> This change extends the idea of reset_counter variable to engine reset by
> creating additional variables for each engine. Least significant bit is set
> to mark the engine reset is pending and once reset is successful it is
> incremented again, this is further used to count the no of engine resets.

You still haven't split it up into the seperate fields.

atomic_t flags;
atomic_t global_reset_counter;
atomic_t engine_reset_counter[NUM_ENGINES];

That way checking whether a reset in progress is just one atomic read,
not N+1.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list