From: Ben Dooks <ben@fluff.org.uk>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org, vince@arm.linux.org.uk,
ben-linux@fluff.org
Subject: Re: [Linux-fbdev-devel] [PATCH] fb: SM501 framebuffer driver (#5)
Date: Fri, 16 Feb 2007 10:12:51 +0000 [thread overview]
Message-ID: <20070216101251.GG19392@home.fluff.org> (raw)
In-Reply-To: <20070216095045.GA15256@fluff.org.uk>
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@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
next prev parent reply other threads:[~2007-02-16 10:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-16 9:50 [PATCH] fb: SM501 framebuffer driver (#5) Ben Dooks
2007-02-16 10:12 ` Ben Dooks [this message]
2007-02-16 14:37 ` [Linux-fbdev-devel] " James Simmons
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=20070216101251.GG19392@home.fluff.org \
--to=ben@fluff.org.uk \
--cc=ben-linux@fluff.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=vince@arm.linux.org.uk \
/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).