|
From: Petr V. <van...@vc...> - 2002-11-03 02:25:30
|
On Fri, Nov 01, 2002 at 09:11:08AM -0800, James Simmons wrote:
>
> Hi!
>
> Looking at the last bits of the fbdev changes I have question. Currently
> I have in fbgen.c:
>
> int fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
> {
> int xoffset = var->xoffset;
> int yoffset = var->yoffset;
> int err;
>
> if (xoffset < 0 || yoffset < 0 ||
> xoffset + info->var.xres > info->var.xres_virtual ||
> yoffset + info->var.yres > info->var.yres_virtual)
Hm, do not YWRAP devices need this
if (xoffset < 0 || yoffset < 0 ||
xoffset >= info->var.xres_virtual ||
yoffset >= info->var.yres_virtual) {
instead?
> return -EINVAL;
> if (info->fbops->fb_pan_display) {
> if ((err = info->fbops->fb_pan_display(var, info)))
> return err;
> else
> return -EINVAL;
> }
> info->var.xoffset = var->xoffset;
> info->var.yoffset = var->yoffset;
> if (var->vmode & FB_VMODE_YWRAP)
> info->var.vmode |= FB_VMODE_YWRAP;
> else
> info->var.vmode &= ~FB_VMODE_YWRAP;
> return 0;
Somebody has to check whether FB_VMODE_YWRAP is supported
by this hardware at all (i.e. var.vmode should already
contain FB_VMODE_YWRAP bit set from previous set_var, should
not it?).
Best regards,
Petr Vandrovec
van...@vc...
|