public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Bug in cfb_console driver
@ 2012-01-14  3:32 Pali Rohár
  2012-03-04 21:12 ` Pali Rohár
  0 siblings, 1 reply; 8+ messages in thread
From: Pali Rohár @ 2012-01-14  3:32 UTC (permalink / raw)
  To: u-boot

Hello,

commit 03d31fcf4c37d90a00e66f06b38742960139f090 break video framebuffer output 
on Nokia N900. After this commit is video output garbaged and not readable on 
display. Problem is in function video_invertchar() - when I commented it, 
video output is OK, but without cursor. Problem is only on real N900 device, 
not in qemu.

-- 
Pali Roh?r
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120114/016d4d2e/attachment.pgp>

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

* [U-Boot] Bug in cfb_console driver
  2012-01-14  3:32 [U-Boot] Bug in cfb_console driver Pali Rohár
@ 2012-03-04 21:12 ` Pali Rohár
  2012-03-05 10:16   ` Anatolij Gustschin
  0 siblings, 1 reply; 8+ messages in thread
From: Pali Rohár @ 2012-03-04 21:12 UTC (permalink / raw)
  To: u-boot

On Saturday 14 January 2012 04:32:04 Pali Roh?r wrote:
> Hello,
> 
> commit 03d31fcf4c37d90a00e66f06b38742960139f090 break video framebuffer
> output on Nokia N900. After this commit is video output garbaged and not
> readable on display. Problem is in function video_invertchar() - when I
> commented it, video output is OK, but without cursor. Problem is only on
> real N900 device, not in qemu.

This is simple preview how to fix output on N900 display:

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index eb013b8..7cd3cc5 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -624,6 +624,7 @@ static void video_set_cursor(void)
 
 static void video_invertchar(int xx, int yy)
 {
+	/* Disabled on RX51
 	int firstx = xx * VIDEO_PIXEL_SIZE;
 	int lastx = (xx + VIDEO_FONT_WIDTH) * VIDEO_PIXEL_SIZE;
 	int firsty = yy * VIDEO_LINE_LEN;
@@ -635,6 +636,7 @@ static void video_invertchar(int xx, int yy)
 			*dest = ~*dest;
 		}
 	}
+	*/
 }
 
 void console_cursor(int state)

But I think that function video_invertchar which is needed for rendering cursor should be fixed properly.

Can somebody check if current implementaion of function video_invertchar is correct? I do not properly understand that code, so I cannot debug it.

-- 
Pali Roh?r
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120304/3a3f5e0f/attachment.pgp>

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

* [U-Boot] Bug in cfb_console driver
  2012-03-04 21:12 ` Pali Rohár
@ 2012-03-05 10:16   ` Anatolij Gustschin
  2012-03-05 10:42     ` Pali Rohár
  0 siblings, 1 reply; 8+ messages in thread
From: Anatolij Gustschin @ 2012-03-05 10:16 UTC (permalink / raw)
  To: u-boot

Hi,

On Sun, 04 Mar 2012 22:12:20 +0100
Pali Roh?r <pali.rohar@gmail.com> wrote:

> On Saturday 14 January 2012 04:32:04 Pali Roh?r wrote:
> > Hello,
> > 
> > commit 03d31fcf4c37d90a00e66f06b38742960139f090 break video framebuffer
> > output on Nokia N900. After this commit is video output garbaged and not
> > readable on display. Problem is in function video_invertchar() - when I
> > commented it, video output is OK, but without cursor. Problem is only on
> > real N900 device, not in qemu.
> 
> This is simple preview how to fix output on N900 display:
...
> But I think that function video_invertchar which is needed for rendering
> cursor should be fixed properly.
> 
> Can somebody check if current implementaion of function video_invertchar
> is correct? I do not properly understand that code, so I cannot debug it.

I hoped that Gabe will look at the issue. Gabe, any idea what could be
wrong here? I'll also look at it later today.

Thanks,
Anatolij

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

* [U-Boot] Bug in cfb_console driver
  2012-03-05 10:16   ` Anatolij Gustschin
@ 2012-03-05 10:42     ` Pali Rohár
  2012-03-06  9:25       ` Anatolij Gustschin
  0 siblings, 1 reply; 8+ messages in thread
From: Pali Rohár @ 2012-03-05 10:42 UTC (permalink / raw)
  To: u-boot

On Monday 05 March 2012 11:16:53 Anatolij Gustschin wrote:
> Hi,
> 
> On Sun, 04 Mar 2012 22:12:20 +0100
> 
> Pali Roh?r <pali.rohar@gmail.com> wrote:
> > On Saturday 14 January 2012 04:32:04 Pali Roh?r wrote:
> > > Hello,
> > > 
> > > commit 03d31fcf4c37d90a00e66f06b38742960139f090 break video framebuffer
> > > output on Nokia N900. After this commit is video output garbaged and not
> > > readable on display. Problem is in function video_invertchar() - when I
> > > commented it, video output is OK, but without cursor. Problem is only on
> > > real N900 device, not in qemu.
> > 
> > This is simple preview how to fix output on N900 display:
> ...
> 
> > But I think that function video_invertchar which is needed for rendering
> > cursor should be fixed properly.
> > 
> > Can somebody check if current implementaion of function video_invertchar
> > is correct? I do not properly understand that code, so I cannot debug it.
> 
> I hoped that Gabe will look at the issue. Gabe, any idea what could be
> wrong here? I'll also look at it later today.
> 
> Thanks,
> Anatolij

Hi, thanks. If you need some more info write me.

-- 
Pali Roh?r
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120305/6b5995f3/attachment.pgp>

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

* [U-Boot] Bug in cfb_console driver
  2012-03-05 10:42     ` Pali Rohár
@ 2012-03-06  9:25       ` Anatolij Gustschin
  2012-03-10 13:06         ` Pali Rohár
  0 siblings, 1 reply; 8+ messages in thread
From: Anatolij Gustschin @ 2012-03-06  9:25 UTC (permalink / raw)
  To: u-boot

Hi,

On Mon, 05 Mar 2012 11:42:13 +0100
Pali Roh?r <pali.rohar@gmail.com> wrote:
...
> Hi, thanks. If you need some more info write me.

Can you please test with attached patch? Does it help to solve
your problem on N900?

Thanks,
Anatolij
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cfb_console-cursor-fix.diff
Type: text/x-patch
Size: 1599 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120306/a098b5e4/attachment.bin>

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

* [U-Boot] Bug in cfb_console driver
  2012-03-06  9:25       ` Anatolij Gustschin
@ 2012-03-10 13:06         ` Pali Rohár
  2012-03-21  9:54           ` Pali Rohár
  0 siblings, 1 reply; 8+ messages in thread
From: Pali Rohár @ 2012-03-10 13:06 UTC (permalink / raw)
  To: u-boot

On Tuesday 06 March 2012 10:25:57 Anatolij Gustschin wrote:
> Hi,
> 
> On Mon, 05 Mar 2012 11:42:13 +0100
> Pali Roh?r <pali.rohar@gmail.com> wrote:
> ...
> 
> > Hi, thanks. If you need some more info write me.
> 
> Can you please test with attached patch? Does it help to solve
> your problem on N900?
> 
> Thanks,
> Anatolij

Hi! This patch solving problem on my N900.

-- 
Pali Roh?r
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120310/21d16776/attachment.pgp>

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

* [U-Boot] Bug in cfb_console driver
  2012-03-10 13:06         ` Pali Rohár
@ 2012-03-21  9:54           ` Pali Rohár
  2012-03-21 12:18             ` Anatolij Gustschin
  0 siblings, 1 reply; 8+ messages in thread
From: Pali Rohár @ 2012-03-21  9:54 UTC (permalink / raw)
  To: u-boot

On Saturday 10 March 2012 14:06:23 Pali Roh?r wrote:
> On Tuesday 06 March 2012 10:25:57 Anatolij Gustschin wrote:
> > Hi,
> > 
> > On Mon, 05 Mar 2012 11:42:13 +0100
> > Pali Roh?r <pali.rohar@gmail.com> wrote:
> > ...
> > 
> > > Hi, thanks. If you need some more info write me.
> > 
> > Can you please test with attached patch? Does it help to solve
> > your problem on N900?
> > 
> > Thanks,
> > Anatolij
> 
> Hi! This patch solving problem on my N900.

Hi, I found a problem why code (without) this patch garbage display 
output. I played with code in function video_draw_cursor and every 
time when I tried to only read what is stored in *dest, on n900 
dispaly was show some random white or blue pixel. This code not 
working on n900:

static u8 foo;
...
for (y = firsty; y < lasty; y += VIDEO_LINE_LEN) {
	for (x = firstx; x < lastx; x++) {
		u8 *dest = (u8 *)(video_fb_address) + x + y;
		foo = *dest;
		*dest = 0xff;
	}
}

But if I commented assign foo = *dest; everything is OK.

So I think that reading memory of framebuffer on n900 does not working 
(it also write something somewhere...) What do you think, where can be 
problem?

-- 
Pali Roh?r
pali.rohar@gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120321/1269dc27/attachment.pgp>

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

* [U-Boot] Bug in cfb_console driver
  2012-03-21  9:54           ` Pali Rohár
@ 2012-03-21 12:18             ` Anatolij Gustschin
  0 siblings, 0 replies; 8+ messages in thread
From: Anatolij Gustschin @ 2012-03-21 12:18 UTC (permalink / raw)
  To: u-boot

On Wed, 21 Mar 2012 02:54:02 -0700 (PDT)
Pali Roh?r <pali.rohar@gmail.com> wrote:

> On Saturday 10 March 2012 14:06:23 Pali Roh?r wrote:
> > On Tuesday 06 March 2012 10:25:57 Anatolij Gustschin wrote:
> > > Hi,
> > > 
> > > On Mon, 05 Mar 2012 11:42:13 +0100
> > > Pali Roh?r <pali.rohar@gmail.com> wrote:
> > > ...
> > > 
> > > > Hi, thanks. If you need some more info write me.
> > > 
> > > Can you please test with attached patch? Does it help to solve
> > > your problem on N900?
> > > 
> > > Thanks,
> > > Anatolij
> > 
> > Hi! This patch solving problem on my N900.
> 
> Hi, I found a problem why code (without) this patch garbage display 
> output. I played with code in function video_draw_cursor and every 
> time when I tried to only read what is stored in *dest, on n900 
> dispaly was show some random white or blue pixel. This code not 
> working on n900:
> 
> static u8 foo;
> ...
> for (y 	for (x 		u8 *dest 		foo 		*dest 	}
> }
> 
> But if I commented assign foo 
> So I think that reading memory of framebuffer on n900 does not working 
> (it also write something somewhere...) What do you think, where can be 
> problem?

I have a suspicion that your framebuffer area configured for the
display controller is not exclusively used. In another email [1]
to Marek I explained where the problem could be.

Thanks,
Anatolij

[1] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/123527/focus=127720

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

end of thread, other threads:[~2012-03-21 12:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-14  3:32 [U-Boot] Bug in cfb_console driver Pali Rohár
2012-03-04 21:12 ` Pali Rohár
2012-03-05 10:16   ` Anatolij Gustschin
2012-03-05 10:42     ` Pali Rohár
2012-03-06  9:25       ` Anatolij Gustschin
2012-03-10 13:06         ` Pali Rohár
2012-03-21  9:54           ` Pali Rohár
2012-03-21 12:18             ` Anatolij Gustschin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox