From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> To: James Simmons <jsimmons@infradead.org> Cc: Linux Frame Buffer Device Development <linux-fbdev-devel@lists.sourceforge.net>, Cell Broadband Engine OSS Development <cbe-oss-dev@ozlabs.org>, Linux Kernel Development <linux-kernel@vger.kernel.org> Subject: [PATCH 2/7] fbdev: fb_do_show_logo() updates Date: Wed, 31 Jan 2007 13:43:59 +0100 (CET) [thread overview] Message-ID: <Pine.LNX.4.62.0701311338180.15066@pademelon.sonytel.be> (raw) In-Reply-To: <Pine.LNX.4.62.0701311325480.14996@pademelon.sonytel.be> fb_do_show_logo() updates: - Use width and height of the passed image instead of the global variable fb_logo - Explicitly pass the number of logos to draw Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> --- drivers/video/fbmem.c | 34 +++++++++++++++------------------- 1 files changed, 15 insertions(+), 19 deletions(-) --- ps3-linux-2.6.20-rc7.orig/drivers/video/fbmem.c +++ ps3-linux-2.6.20-rc7/drivers/video/fbmem.c @@ -377,37 +377,33 @@ static void fb_rotate_logo(struct fb_inf } static void fb_do_show_logo(struct fb_info *info, struct fb_image *image, - int rotate) + int rotate, unsigned int num) { - int x; + unsigned int x; if (rotate == FB_ROTATE_UR) { - for (x = 0; x < num_online_cpus() && - x * (fb_logo.logo->width + 8) <= - info->var.xres - fb_logo.logo->width; x++) { + for (x = 0; + x < num && image->dx + image->width <= info->var.xres; + x++) { info->fbops->fb_imageblit(info, image); - image->dx += fb_logo.logo->width + 8; + image->dx += image->width + 8; } } else if (rotate == FB_ROTATE_UD) { - for (x = 0; x < num_online_cpus() && - x * (fb_logo.logo->width + 8) <= - info->var.xres - fb_logo.logo->width; x++) { + for (x = 0; x < num && image->dx >= 0; x++) { info->fbops->fb_imageblit(info, image); - image->dx -= fb_logo.logo->width + 8; + image->dx -= image->width + 8; } } else if (rotate == FB_ROTATE_CW) { - for (x = 0; x < num_online_cpus() && - x * (fb_logo.logo->width + 8) <= - info->var.yres - fb_logo.logo->width; x++) { + for (x = 0; + x < num && image->dy + image->height <= info->var.yres; + x++) { info->fbops->fb_imageblit(info, image); - image->dy += fb_logo.logo->width + 8; + image->dy += image->height + 8; } } else if (rotate == FB_ROTATE_CCW) { - for (x = 0; x < num_online_cpus() && - x * (fb_logo.logo->width + 8) <= - info->var.yres - fb_logo.logo->width; x++) { + for (x = 0; x < num && image->dy >= 0; x++) { info->fbops->fb_imageblit(info, image); - image->dy -= fb_logo.logo->width + 8; + image->dy -= image->height + 8; } } } @@ -533,7 +529,7 @@ int fb_show_logo(struct fb_info *info, i fb_rotate_logo(info, logo_rotate, &image, rotate); } - fb_do_show_logo(info, &image, rotate); + fb_do_show_logo(info, &image, rotate, num_online_cpus()); kfree(palette); if (saved_pseudo_palette != NULL) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE) Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1 Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> To: James Simmons <jsimmons@infradead.org> Cc: Linux Frame Buffer Device Development <linux-fbdev-devel@lists.sourceforge.net>, Cell Broadband Engine OSS Development <cbe-oss-dev@ozlabs.org>, Linux Kernel Development <linux-kernel@vger.kernel.org> Subject: [PATCH 2/7] fbdev: fb_do_show_logo() updates Date: Wed, 31 Jan 2007 13:43:59 +0100 (CET) [thread overview] Message-ID: <Pine.LNX.4.62.0701311338180.15066@pademelon.sonytel.be> (raw) In-Reply-To: <Pine.LNX.4.62.0701311325480.14996@pademelon.sonytel.be> fb_do_show_logo() updates: - Use width and height of the passed image instead of the global variable fb_logo - Explicitly pass the number of logos to draw Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> --- drivers/video/fbmem.c | 34 +++++++++++++++------------------- 1 files changed, 15 insertions(+), 19 deletions(-) --- ps3-linux-2.6.20-rc7.orig/drivers/video/fbmem.c +++ ps3-linux-2.6.20-rc7/drivers/video/fbmem.c @@ -377,37 +377,33 @@ static void fb_rotate_logo(struct fb_inf } static void fb_do_show_logo(struct fb_info *info, struct fb_image *image, - int rotate) + int rotate, unsigned int num) { - int x; + unsigned int x; if (rotate == FB_ROTATE_UR) { - for (x = 0; x < num_online_cpus() && - x * (fb_logo.logo->width + 8) <= - info->var.xres - fb_logo.logo->width; x++) { + for (x = 0; + x < num && image->dx + image->width <= info->var.xres; + x++) { info->fbops->fb_imageblit(info, image); - image->dx += fb_logo.logo->width + 8; + image->dx += image->width + 8; } } else if (rotate == FB_ROTATE_UD) { - for (x = 0; x < num_online_cpus() && - x * (fb_logo.logo->width + 8) <= - info->var.xres - fb_logo.logo->width; x++) { + for (x = 0; x < num && image->dx >= 0; x++) { info->fbops->fb_imageblit(info, image); - image->dx -= fb_logo.logo->width + 8; + image->dx -= image->width + 8; } } else if (rotate == FB_ROTATE_CW) { - for (x = 0; x < num_online_cpus() && - x * (fb_logo.logo->width + 8) <= - info->var.yres - fb_logo.logo->width; x++) { + for (x = 0; + x < num && image->dy + image->height <= info->var.yres; + x++) { info->fbops->fb_imageblit(info, image); - image->dy += fb_logo.logo->width + 8; + image->dy += image->height + 8; } } else if (rotate == FB_ROTATE_CCW) { - for (x = 0; x < num_online_cpus() && - x * (fb_logo.logo->width + 8) <= - info->var.yres - fb_logo.logo->width; x++) { + for (x = 0; x < num && image->dy >= 0; x++) { info->fbops->fb_imageblit(info, image); - image->dy -= fb_logo.logo->width + 8; + image->dy -= image->height + 8; } } } @@ -533,7 +529,7 @@ int fb_show_logo(struct fb_info *info, i fb_rotate_logo(info, logo_rotate, &image, rotate); } - fb_do_show_logo(info, &image, rotate); + fb_do_show_logo(info, &image, rotate, num_online_cpus()); kfree(palette); if (saved_pseudo_palette != NULL) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE) Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1 Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
next prev parent reply other threads:[~2007-01-31 12:44 UTC|newest] Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-01-31 12:27 [PATCH 0/7] RFC: Cell SPE logos Geert Uytterhoeven 2007-01-31 12:27 ` Geert Uytterhoeven 2007-01-31 12:40 ` Geert Uytterhoeven 2007-01-31 12:40 ` Geert Uytterhoeven 2007-01-31 12:43 ` [PATCH 1/7] fbdev: Avoid vertical overflow when making space for the logo Geert Uytterhoeven 2007-01-31 12:43 ` Geert Uytterhoeven 2007-01-31 12:43 ` Geert Uytterhoeven [this message] 2007-01-31 12:43 ` [PATCH 2/7] fbdev: fb_do_show_logo() updates Geert Uytterhoeven 2007-01-31 12:44 ` [PATCH 3/7] fbdev: extract fb_show_logo_line() Geert Uytterhoeven 2007-01-31 12:44 ` Geert Uytterhoeven 2007-01-31 12:44 ` [PATCH 4/7] fbdev: move logo externs to header file Geert Uytterhoeven 2007-01-31 12:44 ` Geert Uytterhoeven 2007-03-13 14:00 ` const and __initdata (was: Re: [Linux-fbdev-devel] [PATCH 4/7] fbdev: move logo externs to header file) Geert Uytterhoeven 2007-03-13 14:00 ` Geert Uytterhoeven 2007-01-31 12:44 ` [PATCH 5/7] fbdev: Add fb_append_extra_logo() Geert Uytterhoeven 2007-01-31 12:44 ` Geert Uytterhoeven 2007-01-31 12:44 ` [PATCH 6/7] fbdev: SPE helper penguin logo Geert Uytterhoeven 2007-01-31 12:44 ` Geert Uytterhoeven 2007-01-31 12:44 ` [PATCH 7/7] Cell: Draw SPE helper penguin logos Geert Uytterhoeven 2007-01-31 12:44 ` Geert Uytterhoeven 2007-02-01 16:51 ` [Cbe-oss-dev] [PATCH 0/7] RFC: Cell SPE logos Geoff Levand 2007-02-01 16:51 ` Geoff Levand 2007-02-04 13:32 ` Pavel Machek 2007-02-04 13:32 ` Pavel Machek 2007-02-04 17:44 ` [Linux-fbdev-devel] " Geert Uytterhoeven 2007-02-04 17:44 ` Geert Uytterhoeven 2007-02-05 2:14 ` [Cbe-oss-dev] " Benjamin Herrenschmidt 2007-02-05 2:14 ` Benjamin Herrenschmidt 2007-02-06 21:42 ` [Linux-fbdev-devel] " James Simmons 2007-02-06 21:42 ` James Simmons 2007-02-07 12:44 ` Pavel Machek 2007-02-07 12:44 ` Pavel Machek 2007-02-06 22:06 ` James Simmons 2007-02-06 22:06 ` James Simmons 2007-02-12 13:54 ` Geert Uytterhoeven 2007-02-12 13:54 ` Geert Uytterhoeven 2007-02-13 20:51 ` James Simmons 2007-02-13 20:51 ` James Simmons 2007-02-14 17:33 ` Geert Uytterhoeven 2007-02-14 17:33 ` Geert Uytterhoeven
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=Pine.LNX.4.62.0701311338180.15066@pademelon.sonytel.be \ --to=geert.uytterhoeven@sonycom.com \ --cc=cbe-oss-dev@ozlabs.org \ --cc=jsimmons@infradead.org \ --cc=linux-fbdev-devel@lists.sourceforge.net \ --cc=linux-kernel@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.