drm/i915: don't update the fb base if there is no fb
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 10 Jul 2012 16:11:08 +0000 (18:11 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 6 Sep 2012 06:02:07 +0000 (08:02 +0200)
Otherwise we'll set_fb complains pretty loudly if we the crtc is off
and userspace moves the NULL fb around a bit. Yeah, this actually
happens in the wild ...

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index 71cb90d763bd9492499149737e5cd7bf1d9a66a7..01d871b16f625b29afe6082ece3dcb366190fb8a 100644 (file)
@@ -6828,7 +6828,7 @@ intel_set_config_compute_mode_changes(struct drm_mode_set *set,
                        config->fb_changed = true;
        }
 
-       if (set->x != set->crtc->x || set->y != set->crtc->y)
+       if (set->fb && (set->x != set->crtc->x || set->y != set->crtc->y))
                config->fb_changed = true;
 
        if (set->mode && !drm_mode_equal(set->mode, &set->crtc->mode)) {