Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>,
	<intel-xe@lists.freedesktop.org>, <ville.syrjala@linux.intel.com>
Subject: Re: [RESEND v2 3/8] drm/i915: move some display runtime suspend operations earlier
Date: Wed, 1 Jul 2026 16:02:02 -0400	[thread overview]
Message-ID: <akVyOnlB_6Qodh1r@intel.com> (raw)
In-Reply-To: <00d016457a78589b97972203a52a390f5f1a3541.1782913901.git.jani.nikula@intel.com>

On Wed, Jul 01, 2026 at 04:53:01PM +0300, Jani Nikula wrote:
> In preparation for abstracting display runtime suspend/resume calls,
> relocate opregion adapter notification and hotplug poll enable slightly
> earlier. Even though this is intended to be a non-functional change, do
> it as a separate step to pinpoint any issues here.

fingers crossed! :)

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> 
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_driver.c | 54 ++++++++++++++++--------------
>  1 file changed, 28 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index 10427f8f5699..b3d87acc142c 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -1518,11 +1518,39 @@ static int i915_pm_runtime_suspend(struct device *kdev)
>  
>  	intel_display_power_runtime_suspend(display);
>  
> +	/*
> +	 * FIXME: We really should find a document that references the arguments
> +	 * used below!
> +	 */
> +	if (IS_BROADWELL(dev_priv)) {
> +		/*
> +		 * On Broadwell, if we use PCI_D1 the PCH DDI ports will stop
> +		 * being detected, and the call we do at i915_pm_runtime_resume()
> +		 * won't be able to restore them. Since PCI_D3hot matches the
> +		 * actual specification and appears to be working, use it.
> +		 */
> +		intel_opregion_notify_adapter(display, PCI_D3hot);
> +	} else {
> +		/*
> +		 * current versions of firmware which depend on this opregion
> +		 * notification have repurposed the D1 definition to mean
> +		 * "runtime suspended" vs. what you would normally expect (D3)
> +		 * to distinguish it from notifications that might be sent via
> +		 * the suspend path.
> +		 */
> +		intel_opregion_notify_adapter(display, PCI_D1);
> +	}
> +
> +	if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv))
> +		intel_hpd_poll_enable(display);
> +
>  	ret = vlv_suspend_complete(dev_priv);
>  	if (ret) {
>  		drm_err(&dev_priv->drm,
>  			"Runtime suspend failed, disabling it (%d)\n", ret);
>  
> +		intel_opregion_notify_adapter(display, PCI_D0);
> +
>  		intel_display_power_runtime_resume(display);
>  
>  		for_each_gt(gt, dev_priv, i)
> @@ -1554,34 +1582,8 @@ static int i915_pm_runtime_suspend(struct device *kdev)
>  	if (root_pdev)
>  		pci_d3cold_disable(root_pdev);
>  
> -	/*
> -	 * FIXME: We really should find a document that references the arguments
> -	 * used below!
> -	 */
> -	if (IS_BROADWELL(dev_priv)) {
> -		/*
> -		 * On Broadwell, if we use PCI_D1 the PCH DDI ports will stop
> -		 * being detected, and the call we do at i915_pm_runtime_resume()
> -		 * won't be able to restore them. Since PCI_D3hot matches the
> -		 * actual specification and appears to be working, use it.
> -		 */
> -		intel_opregion_notify_adapter(display, PCI_D3hot);
> -	} else {
> -		/*
> -		 * current versions of firmware which depend on this opregion
> -		 * notification have repurposed the D1 definition to mean
> -		 * "runtime suspended" vs. what you would normally expect (D3)
> -		 * to distinguish it from notifications that might be sent via
> -		 * the suspend path.
> -		 */
> -		intel_opregion_notify_adapter(display, PCI_D1);
> -	}
> -
>  	assert_forcewakes_inactive(&dev_priv->uncore);
>  
> -	if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv))
> -		intel_hpd_poll_enable(display);
> -
>  	drm_dbg(&dev_priv->drm, "Device suspended\n");
>  	return 0;
>  }
> -- 
> 2.47.3
> 

  reply	other threads:[~2026-07-01 20:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 13:52 [RESEND v2 0/8] drm/{i915,xe}: unify runtime pm calls Jani Nikula
2026-07-01 13:52 ` [RESEND v2 1/8] drm/i915: call intel_uncore_runtime_resume() for each gt Jani Nikula
2026-07-01 13:53 ` [RESEND v2 2/8] drm/i915: call intel_display_power_runtime_resume() on suspend error path Jani Nikula
2026-07-01 19:59   ` Rodrigo Vivi
2026-07-01 13:53 ` [RESEND v2 3/8] drm/i915: move some display runtime suspend operations earlier Jani Nikula
2026-07-01 20:02   ` Rodrigo Vivi [this message]
2026-07-01 13:53 ` [RESEND v2 4/8] drm/i915: add intel_display_driver_pm_runtime*() functions Jani Nikula
2026-07-01 13:53 ` [RESEND v2 5/8] drm/{i915, xe}: add new intel_display_driver_runtime_pm_{enable, disable}() Jani Nikula
2026-07-01 13:53 ` [RESEND v2 6/8] drm/xe/display: separate d3cold handling from xe_display_pm_runtime_suspend_late() Jani Nikula
2026-07-01 13:53 ` [RESEND v2 7/8] drm/xe/display: add xe_display_pm_runtime_resume_early() Jani Nikula
2026-07-02  7:14   ` [PATCH v2] " Jani Nikula
2026-07-01 13:53 ` [RESEND v2 8/8] drm/xe/display: unify runtime suspend/resume with i915 for non-d3cold Jani Nikula
2026-07-01 15:36 ` ✗ CI.KUnit: failure for drm/{i915,xe}: unify runtime pm calls (rev3) Patchwork
2026-07-02  7:22 ` ✓ CI.KUnit: success for drm/{i915,xe}: unify runtime pm calls (rev4) Patchwork
2026-07-02  8:27 ` ✓ Xe.CI.BAT: " Patchwork

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=akVyOnlB_6Qodh1r@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /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