Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60924
b: refs/heads/master
c: 90da63e
h: refs/heads/master
v: v3
  • Loading branch information
Geert Uytterhoeven authored and Linus Torvalds committed Jul 17, 2007
1 parent ca8f1db commit 78cec15
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b6e8f00fcd56b426371334d722d1f3fb251b7290
refs/heads/master: 90da63e54604fd515c17014a0a7f332a018a0a11
39 changes: 23 additions & 16 deletions trunk/drivers/video/fbmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,22 +470,24 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
return fb_logo.logo->height;
}

int fb_show_logo(struct fb_info *info, int rotate)
static int fb_show_logo_line(struct fb_info *info, int rotate,
const struct linux_logo *logo, int y,
unsigned int n)
{
u32 *palette = NULL, *saved_pseudo_palette = NULL;
unsigned char *logo_new = NULL, *logo_rotate = NULL;
struct fb_image image;

/* Return if the frame buffer is not mapped or suspended */
if (fb_logo.logo == NULL || info->state != FBINFO_STATE_RUNNING ||
if (logo == NULL || info->state != FBINFO_STATE_RUNNING ||
info->flags & FBINFO_MODULE)
return 0;

image.depth = 8;
image.data = fb_logo.logo->data;
image.data = logo->data;

if (fb_logo.needs_cmapreset)
fb_set_logocmap(info, fb_logo.logo);
fb_set_logocmap(info, logo);

if (fb_logo.needs_truepalette ||
fb_logo.needs_directpalette) {
Expand All @@ -494,47 +496,52 @@ int fb_show_logo(struct fb_info *info, int rotate)
return 0;

if (fb_logo.needs_truepalette)
fb_set_logo_truepalette(info, fb_logo.logo, palette);
fb_set_logo_truepalette(info, logo, palette);
else
fb_set_logo_directpalette(info, fb_logo.logo, palette);
fb_set_logo_directpalette(info, logo, palette);

saved_pseudo_palette = info->pseudo_palette;
info->pseudo_palette = palette;
}

if (fb_logo.depth <= 4) {
logo_new = kmalloc(fb_logo.logo->width * fb_logo.logo->height,
GFP_KERNEL);
logo_new = kmalloc(logo->width * logo->height, GFP_KERNEL);
if (logo_new == NULL) {
kfree(palette);
if (saved_pseudo_palette)
info->pseudo_palette = saved_pseudo_palette;
return 0;
}
image.data = logo_new;
fb_set_logo(info, fb_logo.logo, logo_new, fb_logo.depth);
fb_set_logo(info, logo, logo_new, fb_logo.depth);
}

image.dx = 0;
image.dy = 0;
image.width = fb_logo.logo->width;
image.height = fb_logo.logo->height;
image.dy = y;
image.width = logo->width;
image.height = logo->height;

if (rotate) {
logo_rotate = kmalloc(fb_logo.logo->width *
fb_logo.logo->height, GFP_KERNEL);
logo_rotate = kmalloc(logo->width *
logo->height, GFP_KERNEL);
if (logo_rotate)
fb_rotate_logo(info, logo_rotate, &image, rotate);
}

fb_do_show_logo(info, &image, rotate, num_online_cpus());
fb_do_show_logo(info, &image, rotate, n);

kfree(palette);
if (saved_pseudo_palette != NULL)
info->pseudo_palette = saved_pseudo_palette;
kfree(logo_new);
kfree(logo_rotate);
return fb_logo.logo->height;
return logo->height;
}

int fb_show_logo(struct fb_info *info, int rotate)
{
return fb_show_logo_line(info, rotate, fb_logo.logo, 0,
num_online_cpus());
}
#else
int fb_prepare_logo(struct fb_info *info, int rotate) { return 0; }
Expand Down

0 comments on commit 78cec15

Please sign in to comment.