Re: [PATCH 2/2] drm/i915: Prove an assert for when we expect forcewake to be held

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



s/Prove/Provide/

Quoting Chris Wilson (2017-10-06 15:54:59)
> Add assert_forcewakes_active() (the complementary function to
> assert_forcewakes_inactive) that documents the requirement of a
> function for its callers to be holding the forcewake ref (i.e. the
> function is part of a sequence over which RC6 must be prevented).
> 
> One such example is during ringbuffer reset, where RC6 must be held
> across the whole reinitialisation sequence.
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_ringbuffer.c | 11 ++++++++++-
>  drivers/gpu/drm/i915/intel_uncore.c     | 12 ++++++++++++
>  drivers/gpu/drm/i915/intel_uncore.h     |  2 ++
>  3 files changed, 24 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 05c08b0bc172..4285f09ff8b8 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -579,7 +579,16 @@ static int init_ring_common(struct intel_engine_cs *engine)
>  static void reset_ring_common(struct intel_engine_cs *engine,
>                               struct drm_i915_gem_request *request)
>  {
> -       /* Try to restore the logical GPU state to match the continuation
> +       /*
> +        * RC6 must be prevented until the reset is complete and the engine
> +        * reinitialised. If it occurs in the middle of this sequence, the
> +        * state written to/loaded from the power context is ill-defined (e.g.
> +        * the PP_BASE_DIR may be lost).

PP_DIR_BASE
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux