From: David Lechner <david@lechnology.com>
To: linux-fbdev@vger.kernel.org
Cc: David Lechner <david@lechnology.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] fbdev: fix 1bpp logo for unusual width
Date: Fri, 28 Jul 2017 20:33:53 +0000 [thread overview]
Message-ID: <1501274033-6978-1-git-send-email-david@lechnology.com> (raw)
This check is needed in the case where the width of the framebuffer
is not a multiple of 8 pixels. For example, LEGO MINDSTORMS EV3 has
a 178x128 1bpp display.
Signed-off-by: David Lechner <david@lechnology.com>
---
drivers/video/fbdev/core/fbmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 7a42238..805a42c 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -315,7 +315,7 @@ static void fb_set_logo(struct fb_info *info,
for (i = 0; i < logo->height; i++) {
for (j = 0; j < logo->width; src++) {
d = *src ^ xor;
- for (k = 7; k >= 0; k--) {
+ for (k = 7; k >= 0 && j < logo->width; k--) {
*dst++ = ((d >> k) & 1) ? fg : 0;
j++;
}
--
2.7.4
next reply other threads:[~2017-07-28 20:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170728203405epcas5p3c58c5c8d751b74f94f73520a8108358b@epcas5p3.samsung.com>
2017-07-28 20:33 ` David Lechner [this message]
2017-08-18 17:24 ` [PATCH] fbdev: fix 1bpp logo for unusual width Bartlomiej Zolnierkiewicz
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=1501274033-6978-1-git-send-email-david@lechnology.com \
--to=david@lechnology.com \
--cc=b.zolnierkie@samsung.com \
--cc=linux-fbdev@vger.kernel.org \
--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: 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).