diff mbox

[4/4] drm/i915: remove useless runtime PM get calls

Message ID 1398347456-2523-1-git-send-email-przanoni@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paulo Zanoni April 24, 2014, 1:50 p.m. UTC
From: Paulo Zanoni <paulo.r.zanoni@intel.com>

We already call intel_dp_power_get, which will get a power domain, and
every power domain should get a runtime PM reference, which will wake
up the machine.

v2: - Also touch intel_crt_detect() (Ville).

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/intel_crt.c | 4 ----
 drivers/gpu/drm/i915/intel_dp.c  | 5 -----
 2 files changed, 9 deletions(-)

Comments

Ville Syrjälä April 24, 2014, 2:05 p.m. UTC | #1
On Thu, Apr 24, 2014 at 10:50:56AM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> 
> We already call intel_dp_power_get, which will get a power domain, and
                  ^^^^^^^^^^^^^^^^^^
Commit message needs a small fix. Otherwise looks good.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> every power domain should get a runtime PM reference, which will wake
> up the machine.
> 
> v2: - Also touch intel_crt_detect() (Ville).
> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_crt.c | 4 ----
>  drivers/gpu/drm/i915/intel_dp.c  | 5 -----
>  2 files changed, 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
> index aa5a3dc..4c673d0 100644
> --- a/drivers/gpu/drm/i915/intel_crt.c
> +++ b/drivers/gpu/drm/i915/intel_crt.c
> @@ -646,8 +646,6 @@ intel_crt_detect(struct drm_connector *connector, bool force)
>  	enum drm_connector_status status;
>  	struct intel_load_detect_pipe tmp;
>  
> -	intel_runtime_pm_get(dev_priv);
> -
>  	DRM_DEBUG_KMS("[CONNECTOR:%d:%s] force=%d\n",
>  		      connector->base.id, drm_get_connector_name(connector),
>  		      force);
> @@ -699,8 +697,6 @@ intel_crt_detect(struct drm_connector *connector, bool force)
>  
>  out:
>  	intel_display_power_put(dev_priv, power_domain);
> -	intel_runtime_pm_put(dev_priv);
> -
>  	return status;
>  }
>  
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 66d202c..104998e 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3155,8 +3155,6 @@ intel_dp_detect(struct drm_connector *connector, bool force)
>  	enum intel_display_power_domain power_domain;
>  	struct edid *edid = NULL;
>  
> -	intel_runtime_pm_get(dev_priv);
> -
>  	power_domain = intel_display_port_power_domain(intel_encoder);
>  	intel_display_power_get(dev_priv, power_domain);
>  
> @@ -3191,9 +3189,6 @@ intel_dp_detect(struct drm_connector *connector, bool force)
>  
>  out:
>  	intel_display_power_put(dev_priv, power_domain);
> -
> -	intel_runtime_pm_put(dev_priv);
> -
>  	return status;
>  }
>  
> -- 
> 1.9.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter July 14, 2014, 3:59 p.m. UTC | #2
On Thu, Apr 24, 2014 at 05:05:21PM +0300, Ville Syrjälä wrote:
> On Thu, Apr 24, 2014 at 10:50:56AM -0300, Paulo Zanoni wrote:
> > From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > 
> > We already call intel_dp_power_get, which will get a power domain, and
>                   ^^^^^^^^^^^^^^^^^^
> Commit message needs a small fix. Otherwise looks good.

Fixed.
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Queued for -next, thanks for the patch.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index aa5a3dc..4c673d0 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -646,8 +646,6 @@  intel_crt_detect(struct drm_connector *connector, bool force)
 	enum drm_connector_status status;
 	struct intel_load_detect_pipe tmp;
 
-	intel_runtime_pm_get(dev_priv);
-
 	DRM_DEBUG_KMS("[CONNECTOR:%d:%s] force=%d\n",
 		      connector->base.id, drm_get_connector_name(connector),
 		      force);
@@ -699,8 +697,6 @@  intel_crt_detect(struct drm_connector *connector, bool force)
 
 out:
 	intel_display_power_put(dev_priv, power_domain);
-	intel_runtime_pm_put(dev_priv);
-
 	return status;
 }
 
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 66d202c..104998e 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3155,8 +3155,6 @@  intel_dp_detect(struct drm_connector *connector, bool force)
 	enum intel_display_power_domain power_domain;
 	struct edid *edid = NULL;
 
-	intel_runtime_pm_get(dev_priv);
-
 	power_domain = intel_display_port_power_domain(intel_encoder);
 	intel_display_power_get(dev_priv, power_domain);
 
@@ -3191,9 +3189,6 @@  intel_dp_detect(struct drm_connector *connector, bool force)
 
 out:
 	intel_display_power_put(dev_priv, power_domain);
-
-	intel_runtime_pm_put(dev_priv);
-
 	return status;
 }