linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antonino Daplas <adaplas@pol.net>
To: James Simmons <jsimmons@infradead.org>
Cc: Linux Fbdev development list <linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: fb_pan_display
Date: 03 Nov 2002 02:43:49 +0800	[thread overview]
Message-ID: <1036262577.583.3.camel@daplas> (raw)
In-Reply-To: <Pine.LNX.4.33.0211010908390.6296-100000@maxwell.earthlink.net>

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



-------------------------------------------------------
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com

  parent reply	other threads:[~2002-11-02 18:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Antonino Daplas [this message]
2002-11-03  2:25 ` fb_pan_display Petr Vandrovec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1036262577.583.3.camel@daplas \
    --to=adaplas@pol.net \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).