public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Reinhard Arlt <reinhard.arlt@esd.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] Wired cursor colors....
Date: Fri, 21 Mar 2014 13:17:33 +0100	[thread overview]
Message-ID: <532C2DDD.8020905@esd.eu> (raw)

Hello,

if have updated the u-boot for the cpci750 recently.

If i use the console on the CPCI-DVI VGA graphic board, i now get 
strange coursor colors.

I have investigated the problem, and find out, that with commit

03d31fcf4c37d90a00e66f06b38742960139f090

video: cfb_console: Make the software cursor non-destructive

the software cursor handling is change dramatic.

I my opinion, it is broken now for most pixel format.

The routine

static void video_invertchar(int xx, int yy)

handle only framebuffer with 8 bit data per pixel, and if even in 8 bit 
per pixel mode, it do not work for, if you use GDF__8BIT_332RGB mode.

In GDF__8BIT_INDEX mode, there are only entries in the CLUT for index 
0x00  and 0x01. So inverting a pixel from 0x00 to 0xff results in 
displaying typical uninitialized CLUT entry, so we get a cursor with a 
random color.

I do not have graphic hardware to test all possible cases for a tested 
patch, so how can we proceed fix this problem?

In GDF__8BIT_INDEX mode, the correct handling would be

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 904caf7..344d2b6 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -620,7 +620,11 @@ static void video_invertchar(int xx, int yy)
  	for (y = firsty; y < lasty; y += VIDEO_LINE_LEN) {
  		for (x = firstx; x < lastx; x++) {
  			u8 *dest = (u8 *)(video_fb_address) + x + y;
+#if 0
  			*dest = ~*dest;
+#else
+			*dest ^= 0x01;
+#endif
  		}
  	}
  }

but this break all other graphic mode of course.

Kind regards

Reinhard Arlt

             reply	other threads:[~2014-03-21 12:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-21 12:17 Reinhard Arlt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-03-21 13:54 [U-Boot] Wired cursor colors Reinhard Arlt

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=532C2DDD.8020905@esd.eu \
    --to=reinhard.arlt@esd.eu \
    --cc=u-boot@lists.denx.de \
    /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