From: "Urs Fässler" <urs.fassler@bytesatwork.ch>
To: daniel.vetter@ffwll.ch, linux-fbdev@vger.kernel.org,
linux-kernel@vger.kernel.org, oliver.staebler@bytesatwork.ch,
plagnioj@jcrosoft.com, tomi.valkeinen@ti.com,
urs.fassler@bytesatwork.ch
Subject: [PATCH 3/3] fbdev: use largest logo if possible
Date: Fri, 03 Jul 2015 08:38:16 +0000 [thread overview]
Message-ID: <1435912696-17546-4-git-send-email-urs.fassler@bytesatwork.ch> (raw)
In-Reply-To: <1435912696-17546-1-git-send-email-urs.fassler@bytesatwork.ch>
If CONFIG_FB_LOGO_LARGEST is set, fbdev uses the largest boot logo to
display.
Signed-off-by: Urs Fässler <urs.fassler@bytesatwork.ch>
---
drivers/video/fbdev/core/fbmem.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 0705d88..319f168 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -595,7 +595,7 @@ static inline int fb_show_extra_logos(struct fb_info *info, int y, int rotate)
int fb_prepare_logo(struct fb_info *info, int rotate)
{
int depth = fb_get_color_depth(&info->var, &info->fix);
- unsigned int yres;
+ unsigned int xres, yres;
memset(&fb_logo, 0, sizeof(struct logo_data));
@@ -616,18 +616,25 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
depth = 4;
}
- /* Return if no suitable logo was found */
+ if (rotate = FB_ROTATE_UR || rotate = FB_ROTATE_UD) {
+ xres = info->var.xres;
+ yres = info->var.yres;
+ } else {
+ xres = info->var.yres;
+ yres = info->var.xres;
+ }
+
+#ifdef CONFIG_FB_LOGO_LARGEST
+ fb_logo.logo = fb_find_logo_largest(depth, xres, yres);
+#else
fb_logo.logo = fb_find_logo(depth);
+#endif
+ /* Return if no suitable logo was found */
if (!fb_logo.logo) {
return 0;
}
- if (rotate = FB_ROTATE_UR || rotate = FB_ROTATE_UD)
- yres = info->var.yres;
- else
- yres = info->var.xres;
-
if (fb_logo.logo->height > yres) {
fb_logo.logo = NULL;
return 0;
--
2.1.4
prev parent reply other threads:[~2015-07-03 8:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-03 8:38 [PATCH 0/3] video/logo: add option to return largest logo for a given resolution Urs Fässler
2015-07-03 8:38 ` [PATCH 1/3] video/logo: use list of logos to find logo Urs Fässler
2015-07-03 9:13 ` Geert Uytterhoeven
2015-07-03 8:38 ` [PATCH 2/3] logo: add option to return largest logo for a given resolution Urs Fässler
2015-07-03 8:38 ` Urs Fässler [this message]
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=1435912696-17546-4-git-send-email-urs.fassler@bytesatwork.ch \
--to=urs.fassler@bytesatwork.ch \
--cc=daniel.vetter@ffwll.ch \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oliver.staebler@bytesatwork.ch \
--cc=plagnioj@jcrosoft.com \
--cc=tomi.valkeinen@ti.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).