From mboxrd@z Thu Jan 1 00:00:00 1970 From: Antonino Daplas Subject: Re: fb_pan_display Date: 03 Nov 2002 02:43:49 +0800 Sender: linux-fbdev-devel-admin@lists.sourceforge.net Message-ID: <1036262577.583.3.camel@daplas> References: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: Received: from [203.167.79.9] (helo=willow.compass.com.ph) by usw-sf-list1.sourceforge.net with esmtp (Exim 3.31-VA-mm2 #1 (Debian)) id 1883ID-0007Lv-00 for ; Sat, 02 Nov 2002 10:46:45 -0800 In-Reply-To: Errors-To: linux-fbdev-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Content-Type: text/plain; charset="us-ascii" To: James Simmons Cc: Linux Fbdev development list 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