|
From: Antonino D. <ad...@po...> - 2002-11-02 18:46:45
|
On Sat, 2002-11-02 at 01:11, 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)
> 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;
> }
>
> Now what I was wondering are these test standard enough that we coudl call
> this instead of info->fb_ops->fb_pan_display. Several drivers have this
> test so it would me more code reduction.
Looks generic enough for me.
Tony
|