@@ -4156,7 +4156,9 @@ static bool intel_choose_pipe_bpp_dither
* also stays within the max display bpc discovered above.
*/
- switch (fb->depth) {
+ if (WARN_ON(!fb))
+ bpc = 8;
+ else switch (fb->depth) {
case 8:
bpc = 8; /* since we go through a colormap */
break;
@@ -9302,6 +9304,10 @@ void intel_modeset_setup_hw_state(struct
if (force_restore) {
for_each_pipe(pipe) {
crtc = to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
+ if (WARN_ON(!crtc->base.enabled))
+ continue;
+ if (WARN_ON(!crtc->base.fb))
+ continue;
intel_set_mode(&crtc->base, &crtc->base.mode,
crtc->base.x, crtc->base.y, crtc->base.fb);
}