drm: Perform a full mode set when the pixel format changed
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 21 Apr 2013 23:38:47 +0000 (01:38 +0200)
committerDave Airlie <airlied@redhat.com>
Mon, 22 Apr 2013 09:48:30 +0000 (19:48 +1000)
Test whether the pixel format changes in the mode set handler, and
perform a full mode set instead of a mode set base if it does.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc_helper.c

index 7b2d378b257666626dac923f43ac09dfd2583248..e974f9309b72697d3c9918ab979c8469d548c25d 100644 (file)
@@ -648,6 +648,9 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
                } else if (set->fb->bits_per_pixel !=
                           set->crtc->fb->bits_per_pixel) {
                        mode_changed = true;
+               } else if (set->fb->pixel_format !=
+                          set->crtc->fb->pixel_format) {
+                       mode_changed = true;
                } else
                        fb_changed = true;
        }