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.
Unified · Split
| @@ -183,6 +183,9 @@ void intel_dpt_resume(struct drm_i915_private *i915) · 182 unmodified lines | |||
| 183 | { | 183 | { |
| 184 | struct drm_framebuffer *drm_fb; | 184 | struct drm_framebuffer *drm_fb; |
| 185 | 185 | ||
| 186 | if (!HAS_DISPLAY(i915)) | ||
| 187 | return; | ||
| 188 | |||
| 186 | mutex_lock(&i915->drm.mode_config.fb_lock); | 189 | mutex_lock(&i915->drm.mode_config.fb_lock); |
| 187 | drm_for_each_fb(drm_fb, &i915->drm) { | 190 | drm_for_each_fb(drm_fb, &i915->drm) { |
| 188 | struct intel_framebuffer *fb = to_intel_framebuffer(drm_fb); | 191 | struct intel_framebuffer *fb = to_intel_framebuffer(drm_fb); |
| @@ -207,6 +210,9 @@ void intel_dpt_suspend(struct drm_i915_private *i915) · 18 unmodified lines | |||
| 207 | { | 210 | { |
| 208 | struct drm_framebuffer *drm_fb; | 211 | struct drm_framebuffer *drm_fb; |
| 209 | 212 | ||
| 213 | if (!HAS_DISPLAY(i915)) | ||
| 214 | return; | ||
| 215 | |||
| 210 | mutex_lock(&i915->drm.mode_config.fb_lock); | 216 | mutex_lock(&i915->drm.mode_config.fb_lock); |
| 211 | 217 | ||
| 212 | drm_for_each_fb(drm_fb, &i915->drm) { | 218 | drm_for_each_fb(drm_fb, &i915->drm) { |