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

Re: mono, gray and index configs

From: "Antonino A. Daplas" <adaplas@gmail.com>
Date: 2005-08-11 05:38:01

Jon Smirl wrote:
When filling in a fb_var_screeninfo how do I ask for mono, gray and
index configs? Is is always request length red and green/blue length =
zero to indicate a mono, gray or index config? Then grayscale is used
to differentiate gray/mono from indexed?
For pseudocolor (indexed), just indicate all offsets = 0 and all
lengths equal to each other.

For monochrome, usually set bits_per_pixel = 1. (This is however not always
true, as it's possible to have 2-color display with bits_per_pixel > 1).
It's also possible to have mono01, mono10, 1-bit pseudocolor, 1-bit truecolor.
For 1-bit truecolor, you can only use a primary color for the "foreground".
So only one of the rgba will have a length = 1, the rest are zero. For
monochrome/1-bit pseudocolor, it's similar to setting for pseudocolor except
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 grayscale, you use whatever format you want but you have to set
var->grayscale to nonzero. (Grayscale just means that r=g=b, for those
drivers that want to emulate grayscale).

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.

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