On Mon, 09 Apr 2018 14:47:24 +0200, Chris Wilson <ch...@chris-wilson.co.uk> wrote:

Quoting Michal Wajdeczko (2018-04-09 13:23:28)
As we always call intel_uc_sanitize after every call to
intel_uc_fini_hw we may drop redundant call and sanitize
uC from the fini_hw function.

Signed-off-by: Michal Wajdeczko <michal.wajdec...@intel.com>
Cc: Sagar Arun Kamble <sagar.a.kam...@intel.com>
Cc: Chris Wilson <ch...@chris-wilson.co.uk>

Not that it matters, since doing it before losing control or on resume
is the same from our pov, but I've always pencilled in sanitize as being
done on takeover (i.e. before init).

In intel_uc_init_hw we are already doing some semi-sanitization (thanks
to __intel_uc_reset_hw), but maybe to be more explicit, we should add
call to __uc_sanitize() in intel_uc_init_mmio() ?

Why do you favour after fini?

Hmm, not at all, I would call it just more explicit

Gut feeling prefers keeping it as a separate step rather rolling it up
into init/fini. But that's just because before we did sanitize
elsewhere, we had many strange bugs and those bugs have left their
scars (so I like seeing sanitize, it reminds me of dead bugs).

As now we have symmetrical inits/finis that cover all critical paths,
I don't think we need separate 'sanitize' step that could be called
any time/any place.

I assume extra __sanitize in uc_init_mmio should be enough reminder.

Intel-gfx mailing list

Reply via email to