diff mbox

[03/10] drm/i915/vlv: Remove redundant power well ID asserts

Message ID 20180720141504.22832-4-imre.deak@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Imre Deak July 20, 2018, 2:14 p.m. UTC
The callbacks these asserts are called from are used from a single power
well, so not much point in checking that. The check also requires a unique
power well ID that we would need to keep around only for this purpose.
(A follow-up patch removes power well IDs not needed for direct power
 well access).

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/intel_runtime_pm.c | 12 ------------
 1 file changed, 12 deletions(-)

Comments

Zanoni, Paulo R Aug. 1, 2018, 9:03 p.m. UTC | #1
Em Sex, 2018-07-20 às 17:14 +0300, Imre Deak escreveu:
> The callbacks these asserts are called from are used from a single
> power
> well, so not much point in checking that. The check also requires a
> unique
> power well ID that we would need to keep around only for this
> purpose.
> (A follow-up patch removes power well IDs not needed for direct power
>  well access).
> 
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>


> Cc: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_runtime_pm.c | 12 ------------
>  1 file changed, 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c
> b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index f1742466436d..f119cbe4f61d 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -1045,8 +1045,6 @@ static void
> vlv_display_power_well_deinit(struct drm_i915_private *dev_priv)
>  static void vlv_display_power_well_enable(struct drm_i915_private
> *dev_priv,
>  					  struct i915_power_well
> *power_well)
>  {
> -	WARN_ON_ONCE(power_well->id != PUNIT_POWER_WELL_DISP2D);
> -
>  	vlv_set_power_well(dev_priv, power_well, true);
>  
>  	vlv_display_power_well_init(dev_priv);
> @@ -1055,8 +1053,6 @@ static void
> vlv_display_power_well_enable(struct drm_i915_private *dev_priv,
>  static void vlv_display_power_well_disable(struct drm_i915_private
> *dev_priv,
>  					   struct i915_power_well
> *power_well)
>  {
> -	WARN_ON_ONCE(power_well->id != PUNIT_POWER_WELL_DISP2D);
> -
>  	vlv_display_power_well_deinit(dev_priv);
>  
>  	vlv_set_power_well(dev_priv, power_well, false);
> @@ -1065,8 +1061,6 @@ static void
> vlv_display_power_well_disable(struct drm_i915_private *dev_priv,
>  static void vlv_dpio_cmn_power_well_enable(struct drm_i915_private
> *dev_priv,
>  					   struct i915_power_well
> *power_well)
>  {
> -	WARN_ON_ONCE(power_well->id !=
> PUNIT_POWER_WELL_DPIO_CMN_BC);
> -
>  	/* since ref/cri clock was enabled */
>  	udelay(1); /* >10ns for cmnreset, >0ns for sidereset */
>  
> @@ -1091,8 +1085,6 @@ static void
> vlv_dpio_cmn_power_well_disable(struct drm_i915_private *dev_priv,
>  {
>  	enum pipe pipe;
>  
> -	WARN_ON_ONCE(power_well->id !=
> PUNIT_POWER_WELL_DPIO_CMN_BC);
> -
>  	for_each_pipe(dev_priv, pipe)
>  		assert_pll_disabled(dev_priv, pipe);
>  
> @@ -1516,8 +1508,6 @@ static void chv_set_pipe_power_well(struct
> drm_i915_private *dev_priv,
>  static void chv_pipe_power_well_enable(struct drm_i915_private
> *dev_priv,
>  				       struct i915_power_well
> *power_well)
>  {
> -	WARN_ON_ONCE(power_well->id != CHV_DISP_PW_PIPE_A);
> -
>  	chv_set_pipe_power_well(dev_priv, power_well, true);
>  
>  	vlv_display_power_well_init(dev_priv);
> @@ -1526,8 +1516,6 @@ static void chv_pipe_power_well_enable(struct
> drm_i915_private *dev_priv,
>  static void chv_pipe_power_well_disable(struct drm_i915_private
> *dev_priv,
>  					struct i915_power_well
> *power_well)
>  {
> -	WARN_ON_ONCE(power_well->id != CHV_DISP_PW_PIPE_A);
> -
>  	vlv_display_power_well_deinit(dev_priv);
>  
>  	chv_set_pipe_power_well(dev_priv, power_well, false);
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index f1742466436d..f119cbe4f61d 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -1045,8 +1045,6 @@  static void vlv_display_power_well_deinit(struct drm_i915_private *dev_priv)
 static void vlv_display_power_well_enable(struct drm_i915_private *dev_priv,
 					  struct i915_power_well *power_well)
 {
-	WARN_ON_ONCE(power_well->id != PUNIT_POWER_WELL_DISP2D);
-
 	vlv_set_power_well(dev_priv, power_well, true);
 
 	vlv_display_power_well_init(dev_priv);
@@ -1055,8 +1053,6 @@  static void vlv_display_power_well_enable(struct drm_i915_private *dev_priv,
 static void vlv_display_power_well_disable(struct drm_i915_private *dev_priv,
 					   struct i915_power_well *power_well)
 {
-	WARN_ON_ONCE(power_well->id != PUNIT_POWER_WELL_DISP2D);
-
 	vlv_display_power_well_deinit(dev_priv);
 
 	vlv_set_power_well(dev_priv, power_well, false);
@@ -1065,8 +1061,6 @@  static void vlv_display_power_well_disable(struct drm_i915_private *dev_priv,
 static void vlv_dpio_cmn_power_well_enable(struct drm_i915_private *dev_priv,
 					   struct i915_power_well *power_well)
 {
-	WARN_ON_ONCE(power_well->id != PUNIT_POWER_WELL_DPIO_CMN_BC);
-
 	/* since ref/cri clock was enabled */
 	udelay(1); /* >10ns for cmnreset, >0ns for sidereset */
 
@@ -1091,8 +1085,6 @@  static void vlv_dpio_cmn_power_well_disable(struct drm_i915_private *dev_priv,
 {
 	enum pipe pipe;
 
-	WARN_ON_ONCE(power_well->id != PUNIT_POWER_WELL_DPIO_CMN_BC);
-
 	for_each_pipe(dev_priv, pipe)
 		assert_pll_disabled(dev_priv, pipe);
 
@@ -1516,8 +1508,6 @@  static void chv_set_pipe_power_well(struct drm_i915_private *dev_priv,
 static void chv_pipe_power_well_enable(struct drm_i915_private *dev_priv,
 				       struct i915_power_well *power_well)
 {
-	WARN_ON_ONCE(power_well->id != CHV_DISP_PW_PIPE_A);
-
 	chv_set_pipe_power_well(dev_priv, power_well, true);
 
 	vlv_display_power_well_init(dev_priv);
@@ -1526,8 +1516,6 @@  static void chv_pipe_power_well_enable(struct drm_i915_private *dev_priv,
 static void chv_pipe_power_well_disable(struct drm_i915_private *dev_priv,
 					struct i915_power_well *power_well)
 {
-	WARN_ON_ONCE(power_well->id != CHV_DISP_PW_PIPE_A);
-
 	vlv_display_power_well_deinit(dev_priv);
 
 	chv_set_pipe_power_well(dev_priv, power_well, false);