intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: imre.deak@intel.com, Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 01/31] drm/i915: Remove vga and gmbus seq out of i915_restore_display
Date: Wed, 25 Sep 2024 13:20:56 +0300	[thread overview]
Message-ID: <87h6a42fw7.fsf@intel.com> (raw)
In-Reply-To: <20240924204222.246862-2-rodrigo.vivi@intel.com>

On Tue, 24 Sep 2024, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> Restrict this function to only save and restore registers
> functionality. Then, that can be moved out later to under
> display with a proper name.
>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_driver.c  | 6 ++++++
>  drivers/gpu/drm/i915/i915_suspend.c | 6 ------
>  2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index 6dc0104a3e36..c5ffcf229f42 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -60,6 +60,7 @@
>  #include "display/intel_pch_refclk.h"
>  #include "display/intel_pps.h"
>  #include "display/intel_sprite_uapi.h"
> +#include "display/intel_vga.h"
>  #include "display/skl_watermark.h"
>  
>  #include "gem/i915_gem_context.h"
> @@ -1167,6 +1168,11 @@ static int i915_drm_resume(struct drm_device *dev)
>  	intel_dmc_resume(display);
>  
>  	i915_restore_display(dev_priv);
> +
> +	intel_vga_redisable(display);
> +
> +	intel_gmbus_reset(dev_priv);
> +

Hate to be nitpicky, but these are now called for !HAS_DISPLAY()
too. Maybe the later patches fix it, but here it's not right.

I agree with the approach though.

>  	intel_pps_unlock_regs_wa(display);
>  
>  	intel_init_pch_refclk(dev_priv);
> diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
> index 9d3d9b983032..fb67b05cd864 100644
> --- a/drivers/gpu/drm/i915/i915_suspend.c
> +++ b/drivers/gpu/drm/i915/i915_suspend.c
> @@ -26,7 +26,6 @@
>  
>  #include "display/intel_de.h"
>  #include "display/intel_gmbus.h"
> -#include "display/intel_vga.h"
>  
>  #include "i915_drv.h"
>  #include "i915_reg.h"
> @@ -118,7 +117,6 @@ void i915_save_display(struct drm_i915_private *dev_priv)
>  
>  void i915_restore_display(struct drm_i915_private *dev_priv)
>  {
> -	struct intel_display *display = &dev_priv->display;
>  	struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev);
>  
>  	if (!HAS_DISPLAY(dev_priv))
> @@ -134,8 +132,4 @@ void i915_restore_display(struct drm_i915_private *dev_priv)
>  	if (GRAPHICS_VER(dev_priv) <= 4)
>  		intel_de_write(dev_priv, DSPARB(dev_priv),
>  			       dev_priv->regfile.saveDSPARB);
> -
> -	intel_vga_redisable(display);
> -
> -	intel_gmbus_reset(dev_priv);
>  }

-- 
Jani Nikula, Intel

  reply	other threads:[~2024-09-25 10:21 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-24 20:35 [PATCH 00/31] Reconcile i915's and xe's display power mgt sequences Rodrigo Vivi
2024-09-24 20:35 ` [PATCH 01/31] drm/i915: Remove vga and gmbus seq out of i915_restore_display Rodrigo Vivi
2024-09-25 10:20   ` Jani Nikula [this message]
2024-09-25 20:59     ` Rodrigo Vivi
2024-10-07 19:15   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 02/31] drm/i915/display: Convert i915_suspend into i9xx_display_sr Rodrigo Vivi
2024-10-01 13:21   ` Jani Nikula
2024-10-07 19:15   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 03/31] drm/i915/display: Move regfile registers intel_display.restore Rodrigo Vivi
2024-10-07 19:17   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 04/31] drm/i915/display: Move shutdown sequences under display driver Rodrigo Vivi
2024-10-07 19:18   ` Cavitt, Jonathan
2024-10-08 15:57   ` Imre Deak
2024-09-24 20:35 ` [PATCH 05/31] drm/xe: At shutdown disable commit helpers instead of flushing Rodrigo Vivi
2024-10-07 19:42   ` Cavitt, Jonathan
2024-11-14 20:20     ` Rodrigo Vivi
2024-09-24 20:35 ` [PATCH 06/31] drm/xe: Use i915-display shutdown sequence directly Rodrigo Vivi
2024-10-07 19:44   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 07/31] drm/{i915, xe}/display: Move DP MST calls to display_driver Rodrigo Vivi
2024-10-07 19:46   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 08/31] drm/i915/display: Move suspend sequences to intel_display_driver Rodrigo Vivi
2024-10-07 20:28   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 09/31] drm/xe/display: Delay hpd_init resume Rodrigo Vivi
2024-10-07 20:29   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 10/31] drm/xe/display: Spin-off xe_display runtime/d3cold sequences Rodrigo Vivi
2024-10-07 20:43   ` Cavitt, Jonathan
2024-10-08 16:27   ` Imre Deak
2024-09-24 20:35 ` [PATCH 11/31] drm/{i915,xe}: Consolidate display resume functions Rodrigo Vivi
2024-10-07 21:02   ` [PATCH 11/31] drm/{i915, xe}: " Cavitt, Jonathan
2024-11-14 22:15     ` Rodrigo Vivi
2024-09-24 20:35 ` [PATCH 12/31] drm/i915: Remove lingering pci_save_state Rodrigo Vivi
2024-09-27  8:45   ` Gupta, Anshuman
2024-10-07 21:10   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 13/31] drm/{i915,xe}: Consolidate display suspend functions Rodrigo Vivi
2024-10-07 21:14   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 14/31] drm/i915/display: Move resume sequences to intel_display_driver Rodrigo Vivi
2024-10-07 21:16   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 15/31] drm/xe/display: Delay dsm handler registration Rodrigo Vivi
2024-10-07 21:17   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 16/31] drm/{i915, xe}: Move power_domains suspend/resume to display_power Rodrigo Vivi
2024-10-07 21:25   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 17/31] drm/{i915, xe}: Move remaining intel_power_domains to intel_display Rodrigo Vivi
2024-10-07 21:27   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 18/31] drm/i915/display: Split resume_noirq calls for now Rodrigo Vivi
2024-10-07 21:29   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 19/31] drm/xe/display: Align display resume sequence with i915 Rodrigo Vivi
2024-10-07 21:37   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 20/31] drm/xe/display: Align suspend " Rodrigo Vivi
2024-10-07 21:40   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 21/31] drm/{i915, xe}/display: Move dsm registration under intel_driver Rodrigo Vivi
2024-10-08 14:04   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 22/31] drm/i915/display: Move runtime pm related calls under intel_display_driver Rodrigo Vivi
2024-10-08 14:10   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 23/31] drm/xe/display: Prepare runtime pm functions Rodrigo Vivi
2024-10-08 14:31   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 24/31] drm/xe/display: Call intel_hpd_init on every runtime resume Rodrigo Vivi
2024-10-03  6:32   ` Govindapillai, Vinod
2024-10-03 12:24     ` Govindapillai, Vinod
2024-10-08 14:32   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 25/31] drm/xe/display: Move hpd_poll calls to later runtime stages Rodrigo Vivi
2024-10-03 12:22   ` Govindapillai, Vinod
2024-10-08 14:33   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 26/31] drm/xe/display: Add missing watermark ipc update at runtime resume Rodrigo Vivi
2024-10-08 14:35   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 27/31] drm/xe/display: Notify opregion upon runtime suspend/resume non-d3cold Rodrigo Vivi
2024-10-08 14:37   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 28/31] drm/xe/display: Move display runtime suspend to a later point Rodrigo Vivi
2024-10-08 14:37   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 29/31] drm/xe/display: Kill crtc commit flush Rodrigo Vivi
2024-10-08 14:50   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 30/31] drm/xe/display: Add missing power display handling on non-d3cold rpm Rodrigo Vivi
2024-10-08 14:51   ` Cavitt, Jonathan
2024-09-24 20:35 ` [PATCH 31/31] drm/{i915, xe}/display: Consolidade entire runtime pm sequence Rodrigo Vivi
2024-10-08 14:57   ` Cavitt, Jonathan
2024-09-25 10:32 ` [PATCH 00/31] Reconcile i915's and xe's display power mgt sequences Jani Nikula
2024-09-25 21:00   ` Rodrigo Vivi
2024-09-27  0:05 ` ✗ Fi.CI.BAT: failure for " Patchwork
2024-09-27  0:08 ` ✗ Fi.CI.CHECKPATCH: warning " Patchwork
2024-09-27  0:08 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-10-08 15:24 ` [PATCH 00/31] " Cavitt, Jonathan
2024-11-11 19:23   ` Rodrigo Vivi

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=87h6a42fw7.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=rodrigo.vivi@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;
as well as URLs for NNTP newsgroup(s).