* [PATCH] video: ssd1307fb: Fix bit order bug in the byte translation function
@ 2012-12-18 13:49 Maxime Ripard
0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2012-12-18 13:49 UTC (permalink / raw)
To: linux-fbdev
This was leading to a strange behaviour when using the fbcon driver on
top of this one: the letter were in the right order, but each letter was
having a vertical symmetry.
This was because the addressing was right for the byte, but the
addressing of each individual bit was inverted.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Brian Lilly <brian@crystalfontz.com>
Cc: Greg Kroah-Hartman <gregkh@linux-foundation.org>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Thomas Petazzoni <thomas@free-electrons.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/video/ssd1307fb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/ssd1307fb.c b/drivers/video/ssd1307fb.c
index 9e46633..7f5f824 100644
--- a/drivers/video/ssd1307fb.c
+++ b/drivers/video/ssd1307fb.c
@@ -145,8 +145,8 @@ static void ssd1307fb_update_display(struct ssd1307fb_par *par)
u32 page_length = SSD1307FB_WIDTH * i;
u32 index = page_length + (SSD1307FB_WIDTH * k + j) / 8;
u8 byte = *(vmem + index);
- u8 bit = byte & (1 << (7 - (j % 8)));
- bit = bit >> (7 - (j % 8));
+ u8 bit = byte & (1 << (j % 8));
+ bit = bit >> (j % 8);
buf |= bit << k;
}
ssd1307fb_write_data(par->client, buf);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] video: ssd1307fb: Fix bit order bug in the byte translation function
@ 2013-01-07 16:06 Maxime Ripard
0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2013-01-07 16:06 UTC (permalink / raw)
To: linux-fbdev
Hi,
Le 18/12/2012 14:49, Maxime Ripard (by way of Thomas Petazzoni
<thomas.petazzoni@free-electrons.com>) a écrit :
> This was leading to a strange behaviour when using the fbcon driver on
> top of this one: the letter were in the right order, but each letter was
> having a vertical symmetry.
>
> This was because the addressing was right for the byte, but the
> addressing of each individual bit was inverted.
I'd really like to see this patch merged into one of 3.8-rc's.
Is this ok for you?
--
Maxime Ripard, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-07 16:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-18 13:49 [PATCH] video: ssd1307fb: Fix bit order bug in the byte translation function Maxime Ripard
-- strict thread matches above, loose matches on Subject: below --
2013-01-07 16:06 Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox