Skip to content

Commit 74ba89c

Browse files
committed
drm/i915: Fix DPT suspend/resume on !HAS_DISPLAY platforms
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: 9755f05 ("drm/i915: Restore memory mapping for DPT FBs across system suspend/resume") Cc: Chris Wilson <[email protected]> Cc: Ville Syrjala <[email protected]> Cc: Jani Nikula <[email protected]> Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 86c82c8 commit 74ba89c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpu/drm/i915/display/intel_dpt.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ void intel_dpt_resume(struct drm_i915_private *i915)
183183
{
184184
struct drm_framebuffer *drm_fb;
185185

186+
if (!HAS_DISPLAY(i915))
187+
return;
188+
186189
mutex_lock(&i915->drm.mode_config.fb_lock);
187190
drm_for_each_fb(drm_fb, &i915->drm) {
188191
struct intel_framebuffer *fb = to_intel_framebuffer(drm_fb);
@@ -207,6 +210,9 @@ void intel_dpt_suspend(struct drm_i915_private *i915)
207210
{
208211
struct drm_framebuffer *drm_fb;
209212

213+
if (!HAS_DISPLAY(i915))
214+
return;
215+
210216
mutex_lock(&i915->drm.mode_config.fb_lock);
211217

212218
drm_for_each_fb(drm_fb, &i915->drm) {

0 commit comments

Comments
 (0)