line_length = var->xres_virtual * bpp / 8;
}
- if (var->yres > var->yres_virtual)
- var->yres_virtual = var->yres;
+ /* datasheet specifies how to set panning only up to 4 MB */
+ if (line_length * (var->yres_virtual - var->yres) > (4 << 20))
+ var->yres_virtual = ((4 << 20) / line_length) + var->yres;
+
if (line_length * var->yres_virtual > info->fix.smem_len)
return -EINVAL;
debug("enter\n");
offset = (var->xoffset + (var->yoffset * var->xres_virtual))
* var->bits_per_pixel / 32;
- info->var.xoffset = var->xoffset;
- info->var.yoffset = var->yoffset;
set_screen_start(par, offset);
debug("exit\n");
return 0;
((blue & 0xFF00) >> 8);
}
-/* debug("exit\n"); */
return 0;
}