Thread (22 messages) flat view 22 messages, 4 authors, 2005-08-22

Re: mono, gray and index configs

From: Antonino Daplas <adaplas@gmail.com>
Date: 2005-08-11 11:08:40

On 8/11/05, Geert Uytterhoeven [off-list ref] wrote:
On Thu, 11 Aug 2005, Antonino A. Daplas wrote:
quoted
that all the lengths = 1 and offsets = 0.  Currently, we have no way to
specifically request for mono01, mono10, or 1-bit pseudocolor. Just check
for fix->visual afterwards.
For mono01 or mono10, if the visual is pseudocolor, just set the colormap to
black/white or white/black.

I don't know. If I can change the colormap, I would  advertise this as
1-bit pseudocolor, not monochrome.  Otherwise, why differentiate
between mono01 and mono10 if I can control what color is 0 and what
color is 1.  I think the closest definition of monochrome is 1-bit
static pseudocolor.  And we just have mono01 and mono10 to advertise
how hardware treats 0/1 (background/foreground or reverse).

I have a few things that are still not clear to me.  If I understand
it correctly, monochrome means 2 colors regardless of the bit depth. 
So it's possible, for example, to have 8-bit monochrome that has only
two colors, ie 0x00 and 0xff.   If this was 8-bit static pseudocolor,
then it has 256 different colors.

(Depending on how correct I am with the interpretation, there might be
some bugs in fbdev on how it determines the color depth. No one is
complaining yet though, so greater than 1-bit monochrome is probably
rare if not nonexistent.)
quoted
For directcolor (indexed) vs truecolor, there is currently no way
to specify which visual you want.  You also have to check for fix->visual
afterwards.

One of the reason I also want this sysfs attribute is because in at
least 1 driver (i810fb), it's possible to choose between truecolor and
directcolor but it uses a hack by checking for the var->nonstd flag.
So the driver should use directcolor instead of truecolor if the hardware
supports it. The application can always set a linear colormap if it needs
truecolor.

A few years ago, I discovered that there are several fbdev apps that
make ssumptions which are not necessarily correct.  For example, if
bits_per_pixel > 8, the app assumes the format is truecolor. So the
app produces wrong colors if fbdev is in directcolor mode (because it
failed to set the cmap).

So, it is useful to have the capability to choose between truecolor
and directcolor when dealing with those apps without rebooting or
recompiling.

Tony


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help