linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fbdev: fix 1bpp logo for unusual width
@ 2017-07-28 20:33 ` David Lechner
  2017-08-18 17:24   ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 2+ messages in thread
From: David Lechner @ 2017-07-28 20:33 UTC (permalink / raw)
  To: linux-fbdev; +Cc: David Lechner, Bartlomiej Zolnierkiewicz, linux-kernel

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fbdev: fix 1bpp logo for unusual width
  2017-07-28 20:33 ` [PATCH] fbdev: fix 1bpp logo for unusual width David Lechner
@ 2017-08-18 17:24   ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-08-18 17:24 UTC (permalink / raw)
  To: David Lechner; +Cc: linux-fbdev, linux-kernel

On Friday, July 28, 2017 03:33:53 PM David Lechner wrote:
> 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>

Patch queued for 4.14, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-18 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170728203405epcas5p3c58c5c8d751b74f94f73520a8108358b@epcas5p3.samsung.com>
2017-07-28 20:33 ` [PATCH] fbdev: fix 1bpp logo for unusual width David Lechner
2017-08-18 17:24   ` Bartlomiej Zolnierkiewicz

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).