nanogui: Arm device with 4bpp and planes==0


Previous by date: 16 Jul 2009 09:15:55 -0000 Nano-X Browser, Bajimohanreddy Bandi
Next by date: 16 Jul 2009 09:15:55 -0000 Re: Arm device with 4bpp and planes==0, Aaron J. Grier
Previous in thread:
Next in thread: 16 Jul 2009 09:15:55 -0000 Re: Arm device with 4bpp and planes==0, Aaron J. Grier

Subject: Arm device with 4bpp and planes==0
From: "Yair, Oren" ####@####.####
Date: 16 Jul 2009 09:15:55 -0000
Message-Id: <6385EF5E30011E42B75895D851412B2A5F616F6C20@ILMA1.IL.NDS.COM>

Hi,

I have an ARM device that works with 4bpp.  When I first ran the nano-X I got the message:

Unsupported 16 color (4 bpp) truecolor framebuffer

Cannot initialise screen
I check the code and found out that in ./drivers/scr_fb.c function fb_open, there is a need to deal with case 4.  so I added the lines:

        if(visual == FB_VISUAL_TRUECOLOR || visual == FB_VISUAL_DIRECTCOLOR) {
                switch(psd->bpp) {
                case 4:
                        psd->pixtype = MWPF_PALETTE;
                        break;
After doing that I got the message:

No driver for screen type 1 visual 4 bpp 4

Cannot initialise screen

So I found out that my device has psd->planes == 0 (I do not know what it means), so in ./drivers/fb.c select_fb_subdriver I added:

        if(psd->planes == 1 || psd->planes == 0) {
                switch(psd->bpp) {

After these two changes nano-X runs with no errors.  I ran the sample.c code but I got no output on the display, the log is:

[root@ebr oren]$ ./bin/nano-X & sleep 1 ; ./test/sample
start set cmap !
get cmap option !
0  100  200  300
set cmap ok
start set cmap !
get cmap option !
0  1100  2200  3300
set cmap ok
createfont: (height == 0) found builtin font System (0)
createfont: (height == 0) found builtin font System (0)


My questions are:
1. Are my two changes above correct?  Is there a better way to do that?
2. Can someone see what the problem is that the device display nothing on the screen?

Thanks,
Oren.


________________________________
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the ####@####.#### and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes.
To protect the environment please do not print this e-mail unless necessary.

An NDS Group Limited company. www.nds.com

Previous by date: 16 Jul 2009 09:15:55 -0000 Nano-X Browser, Bajimohanreddy Bandi
Next by date: 16 Jul 2009 09:15:55 -0000 Re: Arm device with 4bpp and planes==0, Aaron J. Grier
Previous in thread:
Next in thread: 16 Jul 2009 09:15:55 -0000 Re: Arm device with 4bpp and planes==0, Aaron J. Grier


Powered by ezmlm-browse 0.20.