aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/cfbfillrect.c
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2005-11-07 01:00:39 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 07:53:51 -0800
commitb4d8aea6d66aabc1d79aaeb1ecc90562abb8f575 (patch)
tree9d1acb46481ba54827463ae2d8f79821d5119953 /drivers/video/cfbfillrect.c
parentdd0314f7bb407bc4bdb3ea769b9c8a3a5d39ffd7 (diff)
[PATCH] fbdev: Remove software clipping from drawing functions
Remove software clipping from imageblit, fillrect and copyarea. Clipping is not needed because the console layer assures that reads/writes doest not happen beyond the extents of the framebuffer. And software clipping tends to hide bugs, if they do exist. Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/cfbfillrect.c')
-rw-r--r--drivers/video/cfbfillrect.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/video/cfbfillrect.c b/drivers/video/cfbfillrect.c
index e4fc42b013e..167d9314e6e 100644
--- a/drivers/video/cfbfillrect.c
+++ b/drivers/video/cfbfillrect.c
@@ -344,7 +344,8 @@ bitfill_unaligned_rev(unsigned long __iomem *dst, int dst_idx, unsigned long pat
void cfb_fillrect(struct fb_info *p, const struct fb_fillrect *rect)
{
- unsigned long x2, y2, vxres, vyres, height, width, pat, fg;
+ unsigned long pat, fg;
+ unsigned long width = rect->width, height = rect->height;
int bits = BITS_PER_LONG, bytes = bits >> 3;
u32 bpp = p->var.bits_per_pixel;
unsigned long __iomem *dst;
@@ -353,27 +354,6 @@ void cfb_fillrect(struct fb_info *p, const struct fb_fillrect *rect)
if (p->state != FBINFO_STATE_RUNNING)
return;
- /* We want rotation but lack hardware to do it for us. */
- if (!p->fbops->fb_rotate && p->var.rotate) {
- }
-
- vxres = p->var.xres_virtual;
- vyres = p->var.yres_virtual;
-
- if (!rect->width || !rect->height ||
- rect->dx > vxres || rect->dy > vyres)
- return;
-
- /* We could use hardware clipping but on many cards you get around
- * hardware clipping by writing to framebuffer directly. */
-
- x2 = rect->dx + rect->width;
- y2 = rect->dy + rect->height;
- x2 = x2 < vxres ? x2 : vxres;
- y2 = y2 < vyres ? y2 : vyres;
- width = x2 - rect->dx;
- height = y2 - rect->dy;
-
if (p->fix.visual == FB_VISUAL_TRUECOLOR ||
p->fix.visual == FB_VISUAL_DIRECTCOLOR )
fg = ((u32 *) (p->pseudo_palette))[rect->color];