Merge remote-tracking branch 'drm/drm-next' into drm-misc-next
[linux-2.6-microblaze.git] / drivers / gpu / drm / drm_fb_helper.c
index a502f3e..9a69ad7 100644 (file)
@@ -1632,6 +1632,10 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
        if (var->pixclock != 0 || in_dbg_master())
                return -EINVAL;
 
+       if ((drm_format_info_block_width(fb->format, 0) > 1) ||
+           (drm_format_info_block_height(fb->format, 0) > 1))
+               return -EINVAL;
+
        /*
         * Changes struct fb_var_screeninfo are currently not pushed back
         * to KMS, hence fail if different settings are requested.
@@ -1949,6 +1953,8 @@ void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helpe
 {
        struct drm_framebuffer *fb = fb_helper->fb;
 
+       WARN_ON((drm_format_info_block_width(fb->format, 0) > 1) ||
+               (drm_format_info_block_height(fb->format, 0) > 1));
        info->pseudo_palette = fb_helper->pseudo_palette;
        info->var.xres_virtual = fb->width;
        info->var.yres_virtual = fb->height;