[Intel-gfx] [PATCH] drm/i915: Fix up the forcewake timer initialization

Daniel Vetter daniel.vetter at ffwll.ch
Wed Mar 19 08:15:30 CET 2014


On Wed, Mar 19, 2014 at 1:41 AM, Ben Widawsky
<benjamin.widawsky at intel.com> wrote:
>> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
>> index e4d2b9f15ae2..9faee49f210d 100644
>> --- a/drivers/gpu/drm/i915/i915_dma.c
>> +++ b/drivers/gpu/drm/i915/i915_dma.c
>> @@ -1608,8 +1608,6 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
>>               goto put_bridge;
>>       }
>>
>> -     intel_uncore_early_sanitize(dev);
>> -
>>       /* This must be called before any calls to HAS_PCH_* */
>>       intel_detect_pch(dev);
>>
>> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
>> index e2e328d86aff..c3832d9270a6 100644
>> --- a/drivers/gpu/drm/i915/intel_uncore.c
>> +++ b/drivers/gpu/drm/i915/intel_uncore.c
>> @@ -736,6 +736,8 @@ void intel_uncore_init(struct drm_device *dev)
>>       setup_timer(&dev_priv->uncore.force_wake_timer,
>>                   gen6_force_wake_timer, (unsigned long)dev_priv);
>>
>> +     intel_uncore_early_sanitize(dev);
>> +
>>       if (IS_VALLEYVIEW(dev)) {
>>               dev_priv->uncore.funcs.force_wake_get = __vlv_force_wake_get;
>>               dev_priv->uncore.funcs.force_wake_put = __vlv_force_wake_put;
>
> If you only want to setup_timer once, the setup_timer call should be in
> intel_uncore_init() which is the only one called only at load time. And
> of course, this is where the bug is. Otherwise, thaw calls
> uncore_early_sanitize, which will setup_timer again (which I thought was
> your complaint with my original patch).
>
> How about this, (only minimally tested):

Yeah, would work also but since everyone was blocked on the regression
I've moved forward with my color choice of moving 1 line around ;-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list