From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [PATCH v2 3/3] drm/xe: Use the encoder suspend helper also used by the i915 driver
Date: Tue, 18 Jun 2024 15:52:55 +0300 [thread overview]
Message-ID: <20240618125255.4080303-3-imre.deak@intel.com> (raw)
In-Reply-To: <20240618125255.4080303-1-imre.deak@intel.com>
Use the suspend encoders helper which is also used by the i915 driver.
This fixes an issue in the xe driver where the encoder
suspend_complete() hook is not called and was an overlook when this hook
was added in commit b61fad5f7e5d ("drm/i915/tc: Call TypeC port
flush_work/cleanup without modeset locks held") for i915, but not added
to the xe driver (which was still in a separate source tree at the above
point).
v2: Fix checkpatch warn in commit log. (Rodrigo)
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
drivers/gpu/drm/xe/display/xe_display.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index 78cccbe289475..8b83dcff72e17 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -23,6 +23,7 @@
#include "intel_display_types.h"
#include "intel_dmc.h"
#include "intel_dp.h"
+#include "intel_encoder.h"
#include "intel_fbdev.h"
#include "intel_hdcp.h"
#include "intel_hotplug.h"
@@ -270,21 +271,6 @@ void xe_display_irq_postinstall(struct xe_device *xe, struct xe_gt *gt)
gen11_de_irq_postinstall(xe);
}
-static void intel_suspend_encoders(struct xe_device *xe)
-{
- struct drm_device *dev = &xe->drm;
- struct intel_encoder *encoder;
-
- if (has_display(xe))
- return;
-
- drm_modeset_lock_all(dev);
- for_each_intel_encoder(dev, encoder)
- if (encoder->suspend)
- encoder->suspend(encoder);
- drm_modeset_unlock_all(dev);
-}
-
static bool suspend_to_idle(void)
{
#if IS_ENABLED(CONFIG_ACPI_SLEEP)
@@ -315,7 +301,7 @@ void xe_display_pm_suspend(struct xe_device *xe, bool runtime)
intel_hpd_cancel_work(xe);
- intel_suspend_encoders(xe);
+ intel_encoder_suspend_all(&xe->display);
intel_opregion_suspend(xe, s2idle ? PCI_D1 : PCI_D3cold);
--
2.43.3
next prev parent reply other threads:[~2024-06-18 12:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 12:52 [PATCH v2 1/3] drm/i915: Move encoder suspend/shutdown helpers to intel_encoder.c Imre Deak
2024-06-18 12:52 ` [PATCH v2 2/3] drm/i915: Pass intel_display to the encoder suspend/shutdown helpers Imre Deak
2024-06-18 13:48 ` Jani Nikula
2024-06-18 12:52 ` Imre Deak [this message]
2024-06-18 13:49 ` [PATCH v2 3/3] drm/xe: Use the encoder suspend helper also used by the i915 driver Jani Nikula
2024-06-18 12:57 ` ✓ CI.Patch_applied: success for series starting with [v2,1/3] drm/i915: Move encoder suspend/shutdown helpers to intel_encoder.c Patchwork
2024-06-18 12:57 ` ✓ CI.checkpatch: " Patchwork
2024-06-18 12:58 ` ✓ CI.KUnit: " Patchwork
2024-06-18 13:10 ` ✓ CI.Build: " Patchwork
2024-06-18 13:12 ` ✗ CI.Hooks: failure " Patchwork
2024-06-18 13:14 ` ✗ CI.checksparse: warning " Patchwork
2024-06-18 13:35 ` ✓ CI.BAT: success " Patchwork
2024-06-19 1:44 ` ✗ CI.FULL: failure " 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=20240618125255.4080303-3-imre.deak@intel.com \
--to=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