[Intel-gfx] [PATCH] drm/i915: Check caller held wakerefs in assert_forcewakes_active

Chris Wilson chris at chris-wilson.co.uk
Thu Jul 4 08:15:40 UTC 2019


Quoting Tvrtko Ursulin (2019-07-04 09:10:32)
> 
> On 03/07/2019 13:48, Chris Wilson wrote:
> > Quoting Tvrtko Ursulin (2019-07-03 13:43:34)
> >>
> >> On 03/07/2019 13:12, Chris Wilson wrote:
> >>> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> >>> index 68d54e126d79..bc25a6e51463 100644
> >>> --- a/drivers/gpu/drm/i915/intel_uncore.c
> >>> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> >>> @@ -738,6 +738,12 @@ void assert_forcewakes_inactive(struct intel_uncore *uncore)
> >>>    void assert_forcewakes_active(struct intel_uncore *uncore,
> >>>                              enum forcewake_domains fw_domains)
> >>>    {
> >>> +     struct intel_uncore_forcewake_domain *domain;
> >>> +     unsigned int tmp;
> >>> +
> >>> +     if (!IS_ENABLED(CONFIG_DRM_i915_RUNTIME_PM))
> >>> +             return;
> >>> +
> >>
> >> If uncore->funcs.force_wake_get is set why wouldn't we still want to run
> >> the asserts?
> > 
> > I'm just being worried by adding a loop under irq-off and didn't want to
> > add more trouble to non-debug kernels. (Closing the stable door much?)
> 
> What is the connection between debug/non-debug kernels and 
> CONFIG_DRM_i915_RUNTIME_PM?

Well, I can't type obviously. It's meant to be the symbol for
	config DRM_I915_DEBUG_RUNTIME_PM
to match the other assert in use.
-Chris


More information about the Intel-gfx mailing list