drm: bpp and depth changes require full mode sets
authorJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 24 Jun 2011 19:19:26 +0000 (12:19 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 7 Jul 2011 20:20:49 +0000 (13:20 -0700)
To properly drive a framebuffer with a new depth or bpp, dither settings
and link bandwidth calculations may change, so make sure we go through a
full mode set in that case.

Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
drivers/gpu/drm/drm_crtc_helper.c

index 9236965..f88a9b2 100644 (file)
@@ -560,6 +560,11 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
                        mode_changed = true;
                } else if (set->fb == NULL) {
                        mode_changed = true;
+               } else if (set->fb->depth != set->crtc->fb->depth) {
+                       mode_changed = true;
+               } else if (set->fb->bits_per_pixel !=
+                          set->crtc->fb->bits_per_pixel) {
+                       mode_changed = true;
                } else
                        fb_changed = true;
        }