nanogui: Thread: nano-X with 8 bit greyscale


[<<] [<] Page 1 of 1 [>] [>>]
Subject: nano-X with 8 bit greyscale
From: James Steward ####@####.####
Date: 1 Apr 2006 22:21:22 +0100
Message-Id: <1143927265.5188.24.camel@localhost.localdomain>

Hi folks,

I'm rather fresh to nano-X and GUI programming, so please excuse my
ignorance.  I will learn given half a chance though!

We have an ARM based custom board that has its LCD controller connected
4bits to a 320x240 mono lcd, setup for 8 bit palette.

If I manually set all 256 entries in the palette and cat a tux 8bit
greyscale image to /dev/fb0 it looks fine.

When I start nano-X I see it saves and sets the first 16 color map
entries, not the entire 256 entry color map.  Why is this?  Shouldn't it
use the whole palette?  Did I compile it with wrong options?

If I run wish and add a button with text then pack the button, the wish
window is there, but the button has no text.  I wonder if I need to
specify colours for tk to use?  Or is this more likely because nano-X
isn't using the whole palette?

Will nano-X run over a network as X11 does?  Will it be happy with a tcp
connection?  If so, what do I need to tell it (command line or config
file??) to allow connections forwarded via ssh?

I did google for some of this stuff but turned up very little.

Any help appreciated.

Regards,
James.

Subject: Re: nano-X with 8 bit greyscale
From: "Jordan Crouse" ####@####.####
Date: 3 Apr 2006 15:34:35 +0100
Message-Id: <20060403150605.GB18568@cosmic.amd.com>

On 02/04/06 07:34 +1000, James Steward wrote:
> Hi folks,
> 
> I'm rather fresh to nano-X and GUI programming, so please excuse my
> ignorance.  I will learn given half a chance though!
> 
> We have an ARM based custom board that has its LCD controller connected
> 4bits to a 320x240 mono lcd, setup for 8 bit palette.
> 
> If I manually set all 256 entries in the palette and cat a tux 8bit
> greyscale image to /dev/fb0 it looks fine.
> 
> When I start nano-X I see it saves and sets the first 16 color map
> entries, not the entire 256 entry color map.  Why is this?  Shouldn't it
> use the whole palette?  Did I compile it with wrong options?

If you are using the framebuffer, everything Nano-X knows comes from
the kernel framebuffer driver.  It sounds like your driver is reporting that
it is in 4 bit mode.  Run 'fbset' to make sure that the framebuffer driver
is reporting all the information correctly (width, height, bit depth, etc,
etc).

> Will nano-X run over a network as X11 does?  Will it be happy with a tcp
> connection?  If so, what do I need to tell it (command line or config
> file??) to allow connections forwarded via ssh?

Nano-X will not run over a network out of the box, but there are patches
available that will enable that for you.  Where, I can't remember, but
I'm sure somebody else on the list will point you in the right direction.

Jordan
-- 
Jordan Crouse
Senior Linux Engineer
AMD - Personal Connectivity Solutions Group
<www.amd.com/embeddedprocessors>

Subject: Re: [nanogui] Re: nano-X with 8 bit greyscale
From: James Steward ####@####.####
Date: 4 Apr 2006 00:01:28 +0100
Message-Id: <1144105136.4176.23.camel@JS2-LINUX>

On Mon, 2006-04-03 at 09:06 -0600, Jordan Crouse wrote:
> On 02/04/06 07:34 +1000, James Steward wrote:
> > Hi folks,
> > 
> > I'm rather fresh to nano-X and GUI programming, so please excuse my
> > ignorance.  I will learn given half a chance though!
> > 
> > We have an ARM based custom board that has its LCD controller connected
> > 4bits to a 320x240 mono lcd, setup for 8 bit palette.
> > 
> > If I manually set all 256 entries in the palette and cat a tux 8bit
> > greyscale image to /dev/fb0 it looks fine.
> > 
> > When I start nano-X I see it saves and sets the first 16 color map
> > entries, not the entire 256 entry color map.  Why is this?  Shouldn't it
> > use the whole palette?  Did I compile it with wrong options?
> 
> If you are using the framebuffer, everything Nano-X knows comes from
> the kernel framebuffer driver.  It sounds like your driver is reporting that
> it is in 4 bit mode.  Run 'fbset' to make sure that the framebuffer driver
> is reporting all the information correctly (width, height, bit depth, etc,
> etc).

Hi Jordan,

I grabbed Debians ARM version of fbset and ran it.

mode "320x240-20"
    # D: 1.555 MHz, H: 4.815 kHz, V: 19.652 Hz
    geometry 320 240 320 240 8
    timings 643023 1 1 1 1 1 3
    hsync high
    vsync high
    rgba 8/0,8/0,8/0,0/0
endmode

Getting further frame buffer information
Frame buffer device information:
    Name        : PXA
    Address     : 0xa70a1000
    Size        : 76800
    Type        : PACKED PIXELS
    Visual      : PSEUDOCOLOR
    XPanStep    : 0
    YPanStep    : 0
    YWrapStep   : 0
    LineLength  : 320
    Accelerator : No

This looks fine to me.  Am I missing something?

Actually I told a fib.  Upon further investigation, it does seem to set
all 256 entries, but then overwrites the first 16!

Does nano-X set the palette differently if the greyscale flag is set in
the frame buffer device?

I've tried running wish.  I get a wish window, add a button with text,
but the text isn't visible I guess because the color map is a bit NQR.

> > Will nano-X run over a network as X11 does?  Will it be happy with a tcp
> > connection?  If so, what do I need to tell it (command line or config
> > file??) to allow connections forwarded via ssh?
> 
> Nano-X will not run over a network out of the box, but there are patches
> available that will enable that for you.  Where, I can't remember, but
> I'm sure somebody else on the list will point you in the right direction.

Thanks!  I'll look.

Regards,
James.

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.