summaryrefslogtreecommitdiffstats
path: root/drivers/video/cfbcopyarea.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/cfbcopyarea.c
parentdd0314f7bb407bc4bdb3ea769b9c8a3a5d39ffd7 (diff)
downloadblackbird-obmc-linux-b4d8aea6d66aabc1d79aaeb1ecc90562abb8f575.tar.gz
blackbird-obmc-linux-b4d8aea6d66aabc1d79aaeb1ecc90562abb8f575.zip
[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/cfbcopyarea.c')
-rw-r--r--drivers/video/cfbcopyarea.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/drivers/video/cfbcopyarea.c b/drivers/video/cfbcopyarea.c
index 67711f7b11b1..cdc71572cf35 100644
--- a/drivers/video/cfbcopyarea.c
+++ b/drivers/video/cfbcopyarea.c
@@ -349,46 +349,10 @@ void cfb_copyarea(struct fb_info *p, const struct fb_copyarea *area)
unsigned long __iomem *dst = NULL, *src = NULL;
int bits = BITS_PER_LONG, bytes = bits >> 3;
int dst_idx = 0, src_idx = 0, rev_copy = 0;
- int x2, y2, vxres, vyres;
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 (area->dx > vxres || area->sx > vxres ||
- area->dy > vyres || area->sy > vyres)
- return;
-
- /* clip the destination
- * We could use hardware clipping but on many cards you get around
- * hardware clipping by writing to framebuffer directly.
- */
- x2 = area->dx + area->width;
- y2 = area->dy + area->height;
- dx = area->dx > 0 ? area->dx : 0;
- dy = area->dy > 0 ? area->dy : 0;
- x2 = x2 < vxres ? x2 : vxres;
- y2 = y2 < vyres ? y2 : vyres;
- width = x2 - dx;
- height = y2 - dy;
-
- if ((width==0) ||(height==0))
- return;
-
- /* update sx1,sy1 */
- sx += (dx - area->dx);
- sy += (dy - area->dy);
-
- /* the source must be completely inside the virtual screen */
- if (sx < 0 || sy < 0 || (sx + width) > vxres || (sy + height) > vyres)
- return;
-
/* if the beginning of the target area might overlap with the end of
the source area, be have to copy the area reverse. */
if ((dy == sy && dx > sx) || (dy > sy)) {
OpenPOWER on IntegriCloud