diff mbox

[v4,09/26] drm/i915/slpc: If using SLPC, do not set frequency

Message ID 1473425505-3890-10-git-send-email-sagar.a.kamble@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

sagar.a.kamble@intel.com Sept. 9, 2016, 12:51 p.m. UTC
From: Tom O'Rourke <Tom.O'Rourke@intel.com>

When frequency requests are made by SLPC, host driver
should not attempt to make frequency requests due to
potential conflicts.

Host-based turbo operations are already avoided when
SLPC is used.  This change covers other frequency
requests such as from sysfs or debugfs interfaces.

A later patch in this series updates sysfs/debugfs
interfaces for setting max/min frequencies with SLPC.

v1: Use intel_slpc_active instead of HAS_SLPC (Paulo)

Signed-off-by: Tom O'Rourke <Tom.O'Rourke@intel.com>
Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Chris Wilson Sept. 9, 2016, 5:21 p.m. UTC | #1
On Fri, Sep 09, 2016 at 06:21:28PM +0530, Sagar Arun Kamble wrote:
> From: Tom O'Rourke <Tom.O'Rourke@intel.com>
> 
> When frequency requests are made by SLPC, host driver
> should not attempt to make frequency requests due to
> potential conflicts.
> 
> Host-based turbo operations are already avoided when
> SLPC is used.  This change covers other frequency
> requests such as from sysfs or debugfs interfaces.
> 
> A later patch in this series updates sysfs/debugfs
> interfaces for setting max/min frequencies with SLPC.
> 
> v1: Use intel_slpc_active instead of HAS_SLPC (Paulo)
> 
> Signed-off-by: Tom O'Rourke <Tom.O'Rourke@intel.com>
> Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index db5c4ef..d187066 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -5047,6 +5047,9 @@ void gen6_rps_boost(struct drm_i915_private *dev_priv,
>  
>  void intel_set_rps(struct drm_i915_private *dev_priv, u8 val)
>  {
> +	if (intel_slpc_active(dev_priv))
> +		return;

active not enabled?

All of the other checks in rps are enabled, right?
-Chris
sagar.a.kamble@intel.com Sept. 15, 2016, 10:41 a.m. UTC | #2
On 9/9/2016 10:51 PM, Chris Wilson wrote:
> On Fri, Sep 09, 2016 at 06:21:28PM +0530, Sagar Arun Kamble wrote:
>> From: Tom O'Rourke <Tom.O'Rourke@intel.com>
>>
>> When frequency requests are made by SLPC, host driver
>> should not attempt to make frequency requests due to
>> potential conflicts.
>>
>> Host-based turbo operations are already avoided when
>> SLPC is used.  This change covers other frequency
>> requests such as from sysfs or debugfs interfaces.
>>
>> A later patch in this series updates sysfs/debugfs
>> interfaces for setting max/min frequencies with SLPC.
>>
>> v1: Use intel_slpc_active instead of HAS_SLPC (Paulo)
>>
>> Signed-off-by: Tom O'Rourke <Tom.O'Rourke@intel.com>
>> Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
>> ---
>>   drivers/gpu/drm/i915/intel_pm.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
>> index db5c4ef..d187066 100644
>> --- a/drivers/gpu/drm/i915/intel_pm.c
>> +++ b/drivers/gpu/drm/i915/intel_pm.c
>> @@ -5047,6 +5047,9 @@ void gen6_rps_boost(struct drm_i915_private *dev_priv,
>>   
>>   void intel_set_rps(struct drm_i915_private *dev_priv, u8 val)
>>   {
>> +	if (intel_slpc_active(dev_priv))
>> +		return;
> active not enabled?
>
> All of the other checks in rps are enabled, right?
> -Chris

Will change this to make consistent.

>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index db5c4ef..d187066 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5047,6 +5047,9 @@  void gen6_rps_boost(struct drm_i915_private *dev_priv,
 
 void intel_set_rps(struct drm_i915_private *dev_priv, u8 val)
 {
+	if (intel_slpc_active(dev_priv))
+		return;
+
 	if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
 		valleyview_set_rps(dev_priv, val);
 	else