Commit 162a61e8 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] fix for tridentfb.c usage on CRTs.

From: Bram Stolk <bram@sara.nl>

All modes that exceed the native resolution of a flatpanel are discarded.
However, a CRT has native resolution set to 0, and therefore, tridentfb.c
cannot be used with a CRT.
parent 5efc426f
......@@ -723,7 +723,7 @@ static int tridentfb_check_var(struct fb_var_screeninfo *var, struct fb_info *in
if (bpp == 24 )
bpp = var->bits_per_pixel = 32;
/* check whether resolution fits on panel and in memory*/
if (var->xres > nativex)
if (flatpanel && nativex && var->xres > nativex)
return -EINVAL;
if (var->xres * var->yres_virtual * bpp/8 > info->fix.smem_len)
return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment