All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915: Fix DPT suspend/resume on !HAS_DISPLAY platforms
@ 2021-11-25 17:16 Imre Deak
  2021-11-25 17:53 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Imre Deak @ 2021-11-25 17:16 UTC (permalink / raw)
  To: intel-gfx; +Cc: Chris Wilson

The drm.mode_config state is not initialized in case of !HAS_DISPLAY
so taking the fb_lock and iterating the fb list won't work on those
platforms. Skip the suspend/resume with an explicit check for this.

Fixes: 9755f055f512 ("drm/i915: Restore memory mapping for DPT FBs across system suspend/resume")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dpt.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dpt.c b/drivers/gpu/drm/i915/display/intel_dpt.c
index 56755788547d2..963ca7155b064 100644
--- a/drivers/gpu/drm/i915/display/intel_dpt.c
+++ b/drivers/gpu/drm/i915/display/intel_dpt.c
@@ -183,6 +183,9 @@ void intel_dpt_resume(struct drm_i915_private *i915)
 {
 	struct drm_framebuffer *drm_fb;
 
+	if (!HAS_DISPLAY(i915))
+		return;
+
 	mutex_lock(&i915->drm.mode_config.fb_lock);
 	drm_for_each_fb(drm_fb, &i915->drm) {
 		struct intel_framebuffer *fb = to_intel_framebuffer(drm_fb);
@@ -207,6 +210,9 @@ void intel_dpt_suspend(struct drm_i915_private *i915)
 {
 	struct drm_framebuffer *drm_fb;
 
+	if (!HAS_DISPLAY(i915))
+		return;
+
 	mutex_lock(&i915->drm.mode_config.fb_lock);
 
 	drm_for_each_fb(drm_fb, &i915->drm) {
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-11-29 17:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25 17:16 [Intel-gfx] [PATCH] drm/i915: Fix DPT suspend/resume on !HAS_DISPLAY platforms Imre Deak
2021-11-25 17:53 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-11-25 22:38 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-11-26 13:01   ` Imre Deak
2021-11-26 13:06     ` Sarvela, Tomi P
2021-11-26 13:59       ` Imre Deak
2021-11-29 17:15         ` Vudum, Lakshminarayana
2021-11-26 11:10 ` [Intel-gfx] [PATCH] " Ville Syrjälä
2021-11-29 16:10 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.