public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Souza, Jose" <jose.souza@intel.com>
To: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Deak, Imre" <imre.deak@intel.com>
Subject: Re: [PATCH v3 08/11] drm/i915: Remove the unneeded AUX power ref from intel_dp_hpd_pulse()
Date: Thu, 9 May 2019 17:43:25 +0000	[thread overview]
Message-ID: <4816bf2c86001fb640de47316f40db801d3524a0.camel@intel.com> (raw)
In-Reply-To: <20190509173446.31095-9-imre.deak@intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 3656 bytes --]

On Thu, 2019-05-09 at 20:34 +0300, Imre Deak wrote:
> The power get/put was added in
> 
> commit 1c767b339b39 ("drm/i915: take display port power domain in DP
> HPD handler")
> Author: Imre Deak <imre.deak@intel.com>
> Date:   Mon Aug 18 14:42:42 2014 +0300
> 
> to account for the HW access in ibx_digital_port_connected(). This
> latter call was in turn removed in
> 
> commit 7d23e3c37bb3 ("drm/i915: Cleaning up intel_dp_hpd_pulse")
> Author: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
> Date:   Wed Mar 30 18:05:23 2016 +0530
> 
> after which we didn't actually need the power reference.
> 
> One way we are accessing the HW during HPD pulse handling is via DP
> AUX
> transfers, but the transfer function takes its own reference, so
> doesn't
> need the reference in intel_dp_hpd_pulse().

<Did not look at the other patches />

The problem of removing that reference is that every aux transfer will
take a little bit more of time because it will need to wait the aux
power well to be enabled/disabled, taking one reference before hand
save us that.

> 
> The other spot is in
> 
> 	intel_psr_short_pulse()->intel_psr_disable_locked()
> 
> but that can only happen when the panel is enabled with the
> corresponding modeset already holding the required power reference.
> 
> v2:
> - Remove the unneeded power get/put from intel_psr_disable_locked().
>   (Ville)
> - Checkpatch commit quoting format fix in the commit log.
> 
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 20 ++++----------------
>  1 file changed, 4 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c
> b/drivers/gpu/drm/i915/intel_dp.c
> index 553071812f69..8a91b453b2e9 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -6302,9 +6302,6 @@ enum irqreturn
>  intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool
> long_hpd)
>  {
>  	struct intel_dp *intel_dp = &intel_dig_port->dp;
> -	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> -	enum irqreturn ret = IRQ_NONE;
> -	intel_wakeref_t wakeref;
>  
>  	if (long_hpd && intel_dig_port->base.type == INTEL_OUTPUT_EDP)
> {
>  		/*
> @@ -6327,9 +6324,6 @@ intel_dp_hpd_pulse(struct intel_digital_port
> *intel_dig_port, bool long_hpd)
>  		return IRQ_NONE;
>  	}
>  
> -	wakeref = intel_display_power_get(dev_priv,
> -					  intel_aux_power_domain(intel_
> dig_port));
> -
>  	if (intel_dp->is_mst) {
>  		if (intel_dp_check_mst_status(intel_dp) == -EINVAL) {
>  			/*
> @@ -6341,7 +6335,8 @@ intel_dp_hpd_pulse(struct intel_digital_port
> *intel_dig_port, bool long_hpd)
>  			intel_dp->is_mst = false;
>  			drm_dp_mst_topology_mgr_set_mst(&intel_dp-
> >mst_mgr,
>  							intel_dp-
> >is_mst);
> -			goto put_power;
> +
> +			return IRQ_NONE;
>  		}
>  	}
>  
> @@ -6351,17 +6346,10 @@ intel_dp_hpd_pulse(struct intel_digital_port
> *intel_dig_port, bool long_hpd)
>  		handled = intel_dp_short_pulse(intel_dp);
>  
>  		if (!handled)
> -			goto put_power;
> +			return IRQ_NONE;
>  	}
>  
> -	ret = IRQ_HANDLED;
> -
> -put_power:
> -	intel_display_power_put(dev_priv,
> -				intel_aux_power_domain(intel_dig_port),
> -				wakeref);
> -
> -	return ret;
> +	return IRQ_HANDLED;
>  }
>  
>  /* check the VBT to see whether the eDP is on another port */

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-05-09 17:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-09 17:34 [PATCH v3 00/11] drm/i915: Add support for asynchronous display power disabling Imre Deak
2019-05-09 17:34 ` [PATCH v3 01/11] drm/i915: Add support for tracking wakerefs w/o power-on guarantee Imre Deak
2019-05-09 17:34 ` [PATCH v3 02/11] drm/i915: Force printing wakeref tacking during pm_cleanup Imre Deak
2019-05-09 17:34 ` [PATCH v3 03/11] drm/i915: Verify power domains state during suspend in all cases Imre Deak
2019-05-09 17:34 ` [PATCH v3 04/11] drm/i915: Add support for asynchronous display power disabling Imre Deak
2019-05-13 19:25   ` [PATCH v4 " Imre Deak
2019-05-09 17:34 ` [PATCH v3 05/11] drm/i915: Disable power asynchronously during DP AUX transfers Imre Deak
2019-05-09 17:34 ` [PATCH v3 06/11] drm/i915: WARN for eDP encoders in intel_dp_detect_dpcd() Imre Deak
2019-05-09 17:34 ` [PATCH v3 07/11] drm/i915: Remove the unneeded AUX power ref from intel_dp_detect() Imre Deak
2019-05-09 17:34 ` [PATCH v3 08/11] drm/i915: Remove the unneeded AUX power ref from intel_dp_hpd_pulse() Imre Deak
2019-05-09 17:43   ` Souza, Jose [this message]
2019-05-09 17:48     ` Imre Deak
2019-05-09 17:34 ` [PATCH v3 09/11] drm/i915: Replace use of PLLS power domain with DISPLAY_CORE domain Imre Deak
2019-05-09 17:34 ` [PATCH v3 10/11] drm/i915: Avoid taking the PPS lock for non-eDP/VLV/CHV Imre Deak
2019-05-09 17:34 ` [PATCH v3 11/11] drm/i915: Assert that TypeC ports are not used for eDP Imre Deak
2019-05-09 17:49 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add support for asynchronous display power disabling (rev4) Patchwork
2019-05-09 17:54 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-05-09 18:08 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-10  2:09 ` ✓ Fi.CI.IGT: " Patchwork
2019-05-13 19:43 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add support for asynchronous display power disabling (rev5) Patchwork
2019-05-13 19:47 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-05-13 20:03 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-14  0:06 ` ✓ Fi.CI.IGT: " Patchwork
2019-05-14 11:15   ` Imre Deak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4816bf2c86001fb640de47316f40db801d3524a0.camel@intel.com \
    --to=jose.souza@intel.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox