linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fb_pan_display
@ 2002-11-01 17:11 James Simmons
  2002-11-02 13:20 ` fb_pan_display Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: James Simmons @ 2002-11-01 17:11 UTC (permalink / raw)
  To: Linux Fbdev development list


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.

MS: (n) 1. A debilitating and surprisingly widespread affliction that
renders the sufferer barely able to perform the simplest task. 2. A disease.

James Simmons  [jsimmons@users.sf.net] 	                ____/|
fbdev/console/gfx developer                             \ o.O|
http://www.linux-fbdev.org                               =(_)=
http://linuxgfx.sourceforge.net                            U
http://linuxconsole.sourceforge.net



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-11-18 19:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-01 17:11 fb_pan_display James Simmons
2002-11-02 13:20 ` fb_pan_display Geert Uytterhoeven
2002-11-09  1:04   ` fb_pan_display James Simmons
2002-11-11 10:04     ` Linux 2.5.47 compile error Michael Kummer
2002-11-12 17:44       ` James Simmons
2002-11-18 19:56       ` [Linux-fbdev-devel] " James Simmons
2002-11-02 18:43 ` fb_pan_display Antonino Daplas
2002-11-03  2:25 ` fb_pan_display Petr Vandrovec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).