diff options
author | James Simmons <jsimmons@pentafluge.infradead.org> | 2005-06-21 20:17:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 22:07:41 -0400 |
commit | f1ab5dac251bb4514607918b0019a3b3f5f5fb48 (patch) | |
tree | 65d7912b1d407b1dc12b9e2f67b4311a153a41e5 /drivers/video/nvidia | |
parent | 303b86d9913eca0cbfc3c5cb41e7006f6e13b755 (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/nvidia')
-rw-r--r-- | drivers/video/nvidia/nvidia.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index 47733f58153b..266ff5d7ac36 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c | |||
@@ -516,9 +516,9 @@ static struct backlight_controller nvidia_backlight_controller = { | |||
516 | static void nvidiafb_load_cursor_image(struct nvidia_par *par, u8 * data8, | 516 | static void nvidiafb_load_cursor_image(struct nvidia_par *par, u8 * data8, |
517 | u16 bg, u16 fg, u32 w, u32 h) | 517 | u16 bg, u16 fg, u32 w, u32 h) |
518 | { | 518 | { |
519 | u32 *data = (u32 *) data8; | ||
519 | int i, j, k = 0; | 520 | int i, j, k = 0; |
520 | u32 b, tmp; | 521 | u32 b, tmp; |
521 | u32 *data = (u32 *) data8; | ||
522 | 522 | ||
523 | w = (w + 1) & ~1; | 523 | w = (w + 1) & ~1; |
524 | 524 | ||
@@ -890,11 +890,11 @@ static int nvidiafb_cursor(struct fb_info *info, struct fb_cursor *cursor) | |||
890 | { | 890 | { |
891 | struct nvidia_par *par = info->par; | 891 | struct nvidia_par *par = info->par; |
892 | u8 data[MAX_CURS * MAX_CURS / 8]; | 892 | u8 data[MAX_CURS * MAX_CURS / 8]; |
893 | u16 fg, bg; | ||
894 | int i, set = cursor->set; | 893 | int i, set = cursor->set; |
894 | u16 fg, bg; | ||
895 | 895 | ||
896 | if (cursor->image.width > MAX_CURS || cursor->image.height > MAX_CURS) | 896 | if (cursor->image.width > MAX_CURS || cursor->image.height > MAX_CURS) |
897 | return soft_cursor(info, cursor); | 897 | return -ENXIO; |
898 | 898 | ||
899 | NVShowHideCursor(par, 0); | 899 | NVShowHideCursor(par, 0); |
900 | 900 | ||
@@ -931,21 +931,18 @@ static int nvidiafb_cursor(struct fb_info *info, struct fb_cursor *cursor) | |||
931 | if (src) { | 931 | if (src) { |
932 | switch (cursor->rop) { | 932 | switch (cursor->rop) { |
933 | case ROP_XOR: | 933 | case ROP_XOR: |
934 | for (i = 0; i < s_pitch * cursor->image.height; | 934 | for (i = 0; i < s_pitch * cursor->image.height; i++) |
935 | i++) | ||
936 | src[i] = dat[i] ^ msk[i]; | 935 | src[i] = dat[i] ^ msk[i]; |
937 | break; | 936 | break; |
938 | case ROP_COPY: | 937 | case ROP_COPY: |
939 | default: | 938 | default: |
940 | for (i = 0; i < s_pitch * cursor->image.height; | 939 | for (i = 0; i < s_pitch * cursor->image.height; i++) |
941 | i++) | ||
942 | src[i] = dat[i] & msk[i]; | 940 | src[i] = dat[i] & msk[i]; |
943 | break; | 941 | break; |
944 | } | 942 | } |
945 | 943 | ||
946 | fb_sysmove_buf_aligned(info, &info->pixmap, data, | 944 | fb_pad_aligned_buffer(data, d_pitch, src, s_pitch, |
947 | d_pitch, src, s_pitch, | 945 | cursor->image.height); |
948 | cursor->image.height); | ||
949 | 946 | ||
950 | bg = ((info->cmap.red[bg_idx] & 0xf8) << 7) | | 947 | bg = ((info->cmap.red[bg_idx] & 0xf8) << 7) | |
951 | ((info->cmap.green[bg_idx] & 0xf8) << 2) | | 948 | ((info->cmap.green[bg_idx] & 0xf8) << 2) | |