diff mbox series

[06/12] drm/i915: Suspend the framebuffer console earlier during system suspend

Message ID 20240104083008.2715733-7-imre.deak@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Fix HPD handling during driver init/shutdown | expand

Commit Message

Imre Deak Jan. 4, 2024, 8:30 a.m. UTC
Suspend the FB console early during system suspend to prevent new FB
probe/modeset cycles interfering with the HW uninitialization steps in a
similar way as during driver shutdown as described in the previous
patch.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/i915_driver.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Hogander, Jouni Jan. 8, 2024, 7:51 a.m. UTC | #1
On Thu, 2024-01-04 at 10:30 +0200, Imre Deak wrote:
> Suspend the FB console early during system suspend to prevent new FB
> probe/modeset cycles interfering with the HW uninitialization steps
> in a
> similar way as during driver shutdown as described in the previous
> patch.
> 
> Signed-off-by: Imre Deak <imre.deak@intel.com>

Reviewed-by: Jouni Högander <jouni.hogander@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_driver.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_driver.c
> b/drivers/gpu/drm/i915/i915_driver.c
> index 9269b485137ce..166476948c896 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -1081,6 +1081,7 @@ static int i915_drm_suspend(struct drm_device
> *dev)
>         /* We do a lot of poking in a lot of registers, make sure
> they work
>          * properly. */
>         intel_power_domains_disable(dev_priv);
> +       intel_fbdev_set_suspend(dev, FBINFO_STATE_SUSPENDED, true);
>         if (HAS_DISPLAY(dev_priv))
>                 drm_kms_helper_poll_disable(dev);
>  
> @@ -1104,8 +1105,6 @@ static int i915_drm_suspend(struct drm_device
> *dev)
>         opregion_target_state = suspend_to_idle(dev_priv) ? PCI_D1 :
> PCI_D3cold;
>         intel_opregion_suspend(dev_priv, opregion_target_state);
>  
> -       intel_fbdev_set_suspend(dev, FBINFO_STATE_SUSPENDED, true);
> -
>         dev_priv->suspend_count++;
>  
>         intel_dmc_suspend(dev_priv);
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index 9269b485137ce..166476948c896 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -1081,6 +1081,7 @@  static int i915_drm_suspend(struct drm_device *dev)
 	/* We do a lot of poking in a lot of registers, make sure they work
 	 * properly. */
 	intel_power_domains_disable(dev_priv);
+	intel_fbdev_set_suspend(dev, FBINFO_STATE_SUSPENDED, true);
 	if (HAS_DISPLAY(dev_priv))
 		drm_kms_helper_poll_disable(dev);
 
@@ -1104,8 +1105,6 @@  static int i915_drm_suspend(struct drm_device *dev)
 	opregion_target_state = suspend_to_idle(dev_priv) ? PCI_D1 : PCI_D3cold;
 	intel_opregion_suspend(dev_priv, opregion_target_state);
 
-	intel_fbdev_set_suspend(dev, FBINFO_STATE_SUSPENDED, true);
-
 	dev_priv->suspend_count++;
 
 	intel_dmc_suspend(dev_priv);