diff mbox series

drm/i915: make __intel_display_power_is_enabled() static

Message ID 20240813151216.2573845-1-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: make __intel_display_power_is_enabled() static | expand

Commit Message

Jani Nikula Aug. 13, 2024, 3:12 p.m. UTC
The function isn't used outside of intel_display_power.c. Make it
static.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 .../gpu/drm/i915/display/intel_display_power.c   | 16 ++--------------
 .../gpu/drm/i915/display/intel_display_power.h   |  2 --
 2 files changed, 2 insertions(+), 16 deletions(-)

Comments

Imre Deak Aug. 14, 2024, 12:34 p.m. UTC | #1
On Tue, Aug 13, 2024 at 06:12:16PM +0300, Jani Nikula wrote:
> The function isn't used outside of intel_display_power.c. Make it
> static.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Imre Deak <imre.deak@intel.com>

Same applies to intel_display_power_domain_str().

> ---
>  .../gpu/drm/i915/display/intel_display_power.c   | 16 ++--------------
>  .../gpu/drm/i915/display/intel_display_power.h   |  2 --
>  2 files changed, 2 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
> index 0af1e34ef2a7..cf8b38f2ebf5 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
> @@ -198,20 +198,8 @@ intel_display_power_domain_str(enum intel_display_power_domain domain)
>  	}
>  }
>  
> -/**
> - * __intel_display_power_is_enabled - unlocked check for a power domain
> - * @dev_priv: i915 device instance
> - * @domain: power domain to check
> - *
> - * This is the unlocked version of intel_display_power_is_enabled() and should
> - * only be used from error capture and recovery code where deadlocks are
> - * possible.
> - *
> - * Returns:
> - * True when the power domain is enabled, false otherwise.
> - */
> -bool __intel_display_power_is_enabled(struct drm_i915_private *dev_priv,
> -				      enum intel_display_power_domain domain)
> +static bool __intel_display_power_is_enabled(struct drm_i915_private *dev_priv,
> +					     enum intel_display_power_domain domain)
>  {
>  	struct i915_power_well *power_well;
>  	bool is_enabled;
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.h b/drivers/gpu/drm/i915/display/intel_display_power.h
> index d6c2a5846bdc..0962f6aaeee6 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.h
> @@ -188,8 +188,6 @@ intel_display_power_domain_str(enum intel_display_power_domain domain);
>  
>  bool intel_display_power_is_enabled(struct drm_i915_private *dev_priv,
>  				    enum intel_display_power_domain domain);
> -bool __intel_display_power_is_enabled(struct drm_i915_private *dev_priv,
> -				      enum intel_display_power_domain domain);
>  intel_wakeref_t intel_display_power_get(struct drm_i915_private *dev_priv,
>  					enum intel_display_power_domain domain);
>  intel_wakeref_t
> -- 
> 2.39.2
>
Jani Nikula Aug. 15, 2024, 12:01 p.m. UTC | #2
On Wed, 14 Aug 2024, Imre Deak <imre.deak@intel.com> wrote:
> On Tue, Aug 13, 2024 at 06:12:16PM +0300, Jani Nikula wrote:
>> The function isn't used outside of intel_display_power.c. Make it
>> static.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Reviewed-by: Imre Deak <imre.deak@intel.com>

Thanks, pushed to din.

> Same applies to intel_display_power_domain_str().

Sent another patch for that one.

BR,
Jani.

>
>> ---
>>  .../gpu/drm/i915/display/intel_display_power.c   | 16 ++--------------
>>  .../gpu/drm/i915/display/intel_display_power.h   |  2 --
>>  2 files changed, 2 insertions(+), 16 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
>> index 0af1e34ef2a7..cf8b38f2ebf5 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_power.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
>> @@ -198,20 +198,8 @@ intel_display_power_domain_str(enum intel_display_power_domain domain)
>>  	}
>>  }
>>  
>> -/**
>> - * __intel_display_power_is_enabled - unlocked check for a power domain
>> - * @dev_priv: i915 device instance
>> - * @domain: power domain to check
>> - *
>> - * This is the unlocked version of intel_display_power_is_enabled() and should
>> - * only be used from error capture and recovery code where deadlocks are
>> - * possible.
>> - *
>> - * Returns:
>> - * True when the power domain is enabled, false otherwise.
>> - */
>> -bool __intel_display_power_is_enabled(struct drm_i915_private *dev_priv,
>> -				      enum intel_display_power_domain domain)
>> +static bool __intel_display_power_is_enabled(struct drm_i915_private *dev_priv,
>> +					     enum intel_display_power_domain domain)
>>  {
>>  	struct i915_power_well *power_well;
>>  	bool is_enabled;
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.h b/drivers/gpu/drm/i915/display/intel_display_power.h
>> index d6c2a5846bdc..0962f6aaeee6 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_power.h
>> +++ b/drivers/gpu/drm/i915/display/intel_display_power.h
>> @@ -188,8 +188,6 @@ intel_display_power_domain_str(enum intel_display_power_domain domain);
>>  
>>  bool intel_display_power_is_enabled(struct drm_i915_private *dev_priv,
>>  				    enum intel_display_power_domain domain);
>> -bool __intel_display_power_is_enabled(struct drm_i915_private *dev_priv,
>> -				      enum intel_display_power_domain domain);
>>  intel_wakeref_t intel_display_power_get(struct drm_i915_private *dev_priv,
>>  					enum intel_display_power_domain domain);
>>  intel_wakeref_t
>> -- 
>> 2.39.2
>>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index 0af1e34ef2a7..cf8b38f2ebf5 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -198,20 +198,8 @@  intel_display_power_domain_str(enum intel_display_power_domain domain)
 	}
 }
 
-/**
- * __intel_display_power_is_enabled - unlocked check for a power domain
- * @dev_priv: i915 device instance
- * @domain: power domain to check
- *
- * This is the unlocked version of intel_display_power_is_enabled() and should
- * only be used from error capture and recovery code where deadlocks are
- * possible.
- *
- * Returns:
- * True when the power domain is enabled, false otherwise.
- */
-bool __intel_display_power_is_enabled(struct drm_i915_private *dev_priv,
-				      enum intel_display_power_domain domain)
+static bool __intel_display_power_is_enabled(struct drm_i915_private *dev_priv,
+					     enum intel_display_power_domain domain)
 {
 	struct i915_power_well *power_well;
 	bool is_enabled;
diff --git a/drivers/gpu/drm/i915/display/intel_display_power.h b/drivers/gpu/drm/i915/display/intel_display_power.h
index d6c2a5846bdc..0962f6aaeee6 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.h
+++ b/drivers/gpu/drm/i915/display/intel_display_power.h
@@ -188,8 +188,6 @@  intel_display_power_domain_str(enum intel_display_power_domain domain);
 
 bool intel_display_power_is_enabled(struct drm_i915_private *dev_priv,
 				    enum intel_display_power_domain domain);
-bool __intel_display_power_is_enabled(struct drm_i915_private *dev_priv,
-				      enum intel_display_power_domain domain);
 intel_wakeref_t intel_display_power_get(struct drm_i915_private *dev_priv,
 					enum intel_display_power_domain domain);
 intel_wakeref_t