aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/riva
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@pentafluge.infradead.org>2005-06-21 20:17:07 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 22:07:41 -0400
commitf1ab5dac251bb4514607918b0019a3b3f5f5fb48 (patch)
tree65d7912b1d407b1dc12b9e2f67b4311a153a41e5 /drivers/video/riva
parent303b86d9913eca0cbfc3c5cb41e7006f6e13b755 (diff)
[PATCH] fbdev: stack reduction
Shrink the stack when calling the drawing alignment functions. Signed-off-by: James Simmons <jsimmons@www.infradead.org> Cc: "Antonino A. Daplas" <adaplas@hotpop.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/riva')
-rw-r--r--drivers/video/riva/fbdev.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
index b0c886de0404..7540f60af948 100644
--- a/drivers/video/riva/fbdev.c
+++ b/drivers/video/riva/fbdev.c
@@ -1582,12 +1582,11 @@ static int rivafb_cursor(struct fb_info *info, struct fb_cursor *cursor)
1582{ 1582{
1583 struct riva_par *par = (struct riva_par *) info->par; 1583 struct riva_par *par = (struct riva_par *) info->par;
1584 u8 data[MAX_CURS * MAX_CURS/8]; 1584 u8 data[MAX_CURS * MAX_CURS/8];
1585 u16 fg, bg;
1586 int i, set = cursor->set; 1585 int i, set = cursor->set;
1586 u16 fg, bg;
1587 1587
1588 if (cursor->image.width > MAX_CURS || 1588 if (cursor->image.width > MAX_CURS || cursor->image.height > MAX_CURS)
1589 cursor->image.height > MAX_CURS) 1589 return -ENXIO;
1590 return soft_cursor(info, cursor);
1591 1590
1592 par->riva.ShowHideCursor(&par->riva, 0); 1591 par->riva.ShowHideCursor(&par->riva, 0);
1593 1592
@@ -1625,21 +1624,18 @@ static int rivafb_cursor(struct fb_info *info, struct fb_cursor *cursor)
1625 if (src) { 1624 if (src) {
1626 switch (cursor->rop) { 1625 switch (cursor->rop) {
1627 case ROP_XOR: 1626 case ROP_XOR:
1628 for (i = 0; i < s_pitch * cursor->image.height; 1627 for (i = 0; i < s_pitch * cursor->image.height; i++)
1629 i++)
1630 src[i] = dat[i] ^ msk[i]; 1628 src[i] = dat[i] ^ msk[i];
1631 break; 1629 break;
1632 case ROP_COPY: 1630 case ROP_COPY:
1633 default: 1631 default:
1634 for (i = 0; i < s_pitch * cursor->image.height; 1632 for (i = 0; i < s_pitch * cursor->image.height; i++)
1635 i++)
1636 src[i] = dat[i] & msk[i]; 1633 src[i] = dat[i] & msk[i];
1637 break; 1634 break;
1638 } 1635 }
1639 1636
1640 fb_sysmove_buf_aligned(info, &info->pixmap, data, 1637 fb_pad_aligned_buffer(data, d_pitch, src, s_pitch,
1641 d_pitch, src, s_pitch, 1638 cursor->image.height);
1642 cursor->image.height);
1643 1639
1644 bg = ((info->cmap.red[bg_idx] & 0xf8) << 7) | 1640 bg = ((info->cmap.red[bg_idx] & 0xf8) << 7) |
1645 ((info->cmap.green[bg_idx] & 0xf8) << 2) | 1641 ((info->cmap.green[bg_idx] & 0xf8) << 2) |