Signed-off-by: Dima Zavin <[EMAIL PROTECTED]>

diff --git a/linux-core/intel_fb.c b/linux-core/intel_fb.c
index d5282b5..394cb19 100644
--- a/linux-core/intel_fb.c
+++ b/linux-core/intel_fb.c
@@ -137,6 +137,14 @@ static int intelfb_check_var(struct fb_var_screeninfo *var,
                return -EINVAL;
        }
 
+       if (var->xres_virtual > fb->width || var->yres_virtual > fb->height) {
+               DRM_ERROR("Requested virtual xres/yres is greater than current"
+                         " fb object %dx%d > %%dx%d\n", var->xres_virtual,
+                         var->yres_virtual,fb->width,fb->height);
+               DRM_ERROR("Need resizing code.\n");
+               return -EINVAL;
+       }
+
        switch (var->bits_per_pixel) {
        case 16:
                depth = (var->green.length == 6) ? 16 : 15;
-- 
1.5.4.5


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to