[Intel-gfx] [PATCH 3/9] drm/i915/pmu: Suspend sampling when GPU is idle
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Wed Oct 25 12:44:24 UTC 2017
On 25/10/2017 10:13, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2017-10-25 10:06:01)
>> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
>> index bafe1cdd57d8..08bbceaeb9b8 100644
>> --- a/drivers/gpu/drm/i915/i915_gem.c
>> +++ b/drivers/gpu/drm/i915/i915_gem.c
>> @@ -3349,6 +3349,7 @@ i915_gem_idle_work_handler(struct work_struct *work)
>>
>> intel_engines_mark_idle(dev_priv);
>> i915_gem_timelines_mark_idle(dev_priv);
>> + i915_pmu_gt_idle(dev_priv);
>
> Heads up, the new trend here is to use "park". Does i915_pmu_park_gt()
> or i915_pmu_gt_park() work for you?
Okay I did not manage to stay up to speed with the park/unpark
threads/chats. But as much as I picked up, the difference here is rather
than parking the PMU, we are notifying is GT is idle/active.
In the light of this, and if I got the gist right, perhaps
i915_pmu_gt_(un)parked would make sense?
Regards,
Tvrtko
>>
>> GEM_BUG_ON(!dev_priv->gt.awake);
>> dev_priv->gt.awake = false;
>> diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
>> index d140fcf5c6a3..165988932c8b 100644
>> --- a/drivers/gpu/drm/i915/i915_gem_request.c
>> +++ b/drivers/gpu/drm/i915/i915_gem_request.c
>> @@ -258,6 +258,7 @@ static void mark_busy(struct drm_i915_private *i915)
>> i915_update_gfx_val(i915);
>> if (INTEL_GEN(i915) >= 6)
>> gen6_rps_busy(i915);
>> + i915_pmu_gt_active(i915);
>
> And unpark here.
> -Chris
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
More information about the Intel-gfx
mailing list