lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 16 Feb 2007 10:12:51 +0000
From:	Ben Dooks <ben@...ff.org.uk>
To:	linux-fbdev-devel@...ts.sourceforge.net
Cc:	linux-kernel@...r.kernel.org, vince@....linux.org.uk,
	ben-linux@...ff.org
Subject: Re: [Linux-fbdev-devel] [PATCH] fb: SM501 framebuffer driver (#5)

On Fri, Feb 16, 2007 at 09:50:45AM +0000, Ben Dooks wrote:
> Driver for the Silicon Motion SM501 multifunction device
> framebuffer subsystem.
> 
> This driver supports both the CRT and LCD panel heads,
> with some simple acceleration for the cursor plotting
> and support for screen panning. There is no current
> support for bitblt/drawing engines, which should be
> added at a later date.
> 
> This has been tested on a number of configurations,
> including PCI and generic-bus, on PPC, ARM and SH4

The difference between this and the previous version is
that the checks in pan display have been removed, as per
James' suggestion:

diff -urpN -X ../dontdiff linux-2.6.20-sm501-2/drivers/video/sm501fb.c linux-2.6.20-sm501-3/drivers/video/sm501fb.c
--- linux-2.6.20-sm501-2/drivers/video/sm501fb.c	2007-02-13 19:14:47.000000000 +0000
+++ linux-2.6.20-sm501-3/drivers/video/sm501fb.c	2007-02-16 09:33:07.000000000 +0000
@@ -496,23 +496,6 @@ static void sm501fb_set_par_geometry(str
 	writel(reg, base + SM501_OFF_DC_V_SYNC);
 }
 
-/* sm501fb_validate_pan
- *
- * check panning on a var
-*/
-
-static inline int sm501fb_validate_pan(struct fb_var_screeninfo *var)
-{
-	if (var->xoffset < 0 || var->yoffset < 0)
-		return 0;
-
-	if (var->xoffset > (var->xres_virtual - var->xres) ||
-	    var->yoffset > (var->yres_virtual - var->yres))
-		return 0;
-
-	return 1;
-}
-
 /* sm501fb_pan_crt
  *
  * pan the CRT display output within an virtual framebuffer
@@ -527,9 +510,6 @@ static int sm501fb_pan_crt(struct fb_var
 	unsigned long reg;
 	unsigned long xoffs;
 
-	if (!sm501fb_validate_pan(var))
-		return -EINVAL;
-
 	xoffs = var->xoffset * bytes_pixel;
 
 	reg = readl(fbi->regs + SM501_DC_CRT_CONTROL);
@@ -558,9 +538,6 @@ static int sm501fb_pan_pnl(struct fb_var
 	struct sm501fb_info *fbi = par->info;
 	unsigned long reg;
 
-	if (!sm501fb_validate_pan(var))
-		return -EINVAL;
-
 	reg = var->xoffset | (var->xres_virtual << 16);
 	writel(reg, fbi->regs + SM501_DC_PANEL_FB_WIDTH);
 


-- 
Ben (ben@...ff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ