Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: kernel test robot <oliver.sang@intel.com>
Subject: [Intel-gfx] [PATCH] drm/i915: Uninit the DMC FW loader state during shutdown
Date: Thu, 11 Mar 2021 16:45:29 +0200	[thread overview]
Message-ID: <20210311144529.3059024-1-imre.deak@intel.com> (raw)

We need to wait for the DMC FW loader work to complete during shutdown,
even if it's unlikely to be still pending by that time, fix this.

This also fixes the wakeref tracking WARN during shutdown about the
leaked reference we hold due to a missing DMC firmware.

While at it add a TODO comment about unifying the shutdown and PM
power-off sequences and later these sequences with the driver remove and
system/runtime suspend sequences.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
References: https://lore.kernel.org/lkml/20210303055517.GB2708@xsang-OptiPlex-9020
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 3edd5e47ad68..4a0e491e9692 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1038,10 +1038,18 @@ void i915_driver_shutdown(struct drm_i915_private *i915)
 	intel_suspend_encoders(i915);
 	intel_shutdown_encoders(i915);
 
+	intel_csr_ucode_suspend(i915);
+
 	/*
 	 * The only requirement is to reboot with display DC states disabled,
 	 * for now leaving all display power wells in the INIT power domain
-	 * enabled matching the driver reload sequence.
+	 * enabled.
+	 *
+	 * TODO:
+	 * - unify the pci_driver::shutdown sequence here with the
+	 *   pci_driver.driver.pm.poweroff,poweroff_late sequence.
+	 * - unify the driver remove and system/runtime suspend sequences with
+	 *   the above unified shutdown/poweroff sequence.
 	 */
 	intel_power_domains_driver_remove(i915);
 	enable_rpm_wakeref_asserts(&i915->runtime_pm);
-- 
2.25.1

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

             reply	other threads:[~2021-03-11 14:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 14:45 Imre Deak [this message]
2021-03-11 14:59 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Uninit the DMC FW loader state during shutdown Patchwork
2021-03-11 15:29 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-03-11 15:53   ` Imre Deak
2021-03-11 16:18     ` Vudum, Lakshminarayana
2021-03-11 16:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-03-11 17:42 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-04-01 22:41   ` Imre Deak
2021-04-02 16:04     ` Vudum, Lakshminarayana
2021-03-31 21:15 ` [Intel-gfx] [PATCH] " Ed Baker
2021-04-01 15:02 ` Ville Syrjälä
2021-04-02  0:03 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " 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=20210311144529.3059024-1-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=oliver.sang@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