Re: [PATCH v3 6/8] drm/i915: Disable power management for i915 driver in VM

Yu, Zhang
2014-12-17T03:27:07Z

On 12/12/2014 9:27 PM, Tvrtko Ursulin wrote:
>
>
> On 11/13/2014 12:02 PM, Yu Zhang wrote:
>> With Intel GVT-g, GPU power management is controlled by
>> host driver, so there is no need to provide virtualized
>> GPU PM support. In the future it might be useful to gather
>> VM input for freq boost, but now let's disable it simply.
>>
>> v2:
>> take Chris' comments:
>> - do not special case this to gen6+
>>
>> Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com>
>> Signed-off-by: Jike Song <jike.song@intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_pm.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_pm.c
>> b/drivers/gpu/drm/i915/intel_pm.c
>> index 3bc5d93..3722bd4 100644
>> --- a/drivers/gpu/drm/i915/intel_pm.c
>> +++ b/drivers/gpu/drm/i915/intel_pm.c
>> @@ -5314,6 +5314,10 @@ void intel_enable_gt_powersave(struct
>> drm_device *dev)
>> {
>> struct drm_i915_private *dev_priv = dev->dev_private;
>>
>> + /* Powersaving is controlled by the host when inside a VM */
>> + if (intel_vgpu_active(dev))
>> + return;
>> +
>> if (IS_IRONLAKE_M(dev)) {
>> mutex_lock(&dev->struct_mutex);
>> ironlake_enable_drps(dev);
>>
>
> I was looking for potential call sites of this which come earlier than
> i915_check_vgpu. Didn't find any but found RPS (intel_pm_setup) - what's
> with that - should it be disabled as well?
>
IIUC, the intel_pm_setup() only add the intel_gen6_powersave_work() to
the delayed_resume_work queue. Real call of this routine will be delayed
to intel_enable_gt_powersave(). So I guess no necessary to do anything
in intel_pm_setup(). :)
> Otherwise,
>
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
B.R.
Yu