All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@gmail.com>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: Jon Smirl <jonsmirl@gmail.com>
Subject: Re: mono, gray and index configs
Date: Thu, 11 Aug 2005 13:36:56 +0800	[thread overview]
Message-ID: <42FAE3F8.8080902@gmail.com> (raw)
In-Reply-To: <9e47339105081020216574ac7e@mail.gmail.com>

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

  reply	other threads:[~2005-08-11  5:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-11  3:21 mono, gray and index configs Jon Smirl
2005-08-11  5:36 ` Antonino A. Daplas [this message]
2005-08-11  8:22   ` Geert Uytterhoeven
2005-08-11 11:08     ` Antonino Daplas
2005-08-11 11:49       ` Geert Uytterhoeven
2005-08-11 17:34         ` Antonino A. Daplas
2005-08-11 19:14           ` Jon Smirl
2005-08-20  1:13             ` Jon Smirl
2005-08-20  2:56               ` Antonino A. Daplas
2005-08-20  3:09                 ` Jon Smirl
2005-08-22 10:17                   ` Geert Uytterhoeven
2005-08-22 13:30                     ` Richard Smith
2005-08-22 14:06                       ` Geert Uytterhoeven
2005-08-22 14:36                         ` Richard Smith
2005-08-22 15:47                           ` Antonino A. Daplas
2005-08-22 17:19                           ` Geert Uytterhoeven
2005-08-22 19:00                             ` Richard Smith
2005-08-22 19:44                               ` Richard Smith
2005-08-22 15:57                     ` Jon Smirl
2005-08-12  7:24           ` Geert Uytterhoeven
2005-08-12 10:28             ` Antonino A. Daplas
2005-08-11  8:20 ` Geert Uytterhoeven

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=42FAE3F8.8080902@gmail.com \
    --to=adaplas@gmail.com \
    --cc=jonsmirl@gmail.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.