All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@gmail.com>
To: Ian Romanick <idr@us.ibm.com>
Cc: Jon Smirl <jonsmirl@gmail.com>,
	linux-fbdev-devel@lists.sourceforge.net,
	DRI developer's list <dri-devel@lists.sourceforge.net>
Subject: Re: CRTC scanout buffer types
Date: Mon, 08 Aug 2005 05:45:41 +0800	[thread overview]
Message-ID: <42F68105.1080207@pol.net> (raw)
In-Reply-To: <42F67719.9050805@us.ibm.com>

Ian Romanick wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Jon Smirl wrote:
>> I'm trying to work out a syntax for the sysfs attribute that will
>> control the config. My first idea is to use a alpha/red/blue/green
>> syntax. When red is set and blue/green are missing index mode is set.
>> When green is set and red/blue are missing gray scale is set.
>>
>> Are there chips that can scanout from buffers not packed at a power of two?
>> How should I work different color spaces (YCbCr) into this?
>>
>> 4bpp Index = /4
>> 4bpp greyscale = //4
>> 8bpp Index = /8
>> 8bpp RGB 332 = /3/3/2
>> 8bpp greyscale = //8
>> 16bpp aRGB 1555 = 1/5/5/5
>> 16bpp RGB 565 = /5/6/5
>> 16bpp aRGB 4444 = 4/4/4/4
>> 16bpp aIndex 88 = 8/8
>> 24bpp RGB 888 = /8/8/8
>> 24bpp aRGB 6666 = 6/6/6/6
>> 32bpp aRGB 8888 = 8/8/8/8
>> 32bpp aRGB 2:10:10:10 = 2/10/10/10
> 
> What would be wrong with using a letter, a colon, and a number to
> describe the field?  So, instead of 2/10/10/10 you'd have
> A:2/R:10/G:10/B:10.  Or A:8/I:8 for aIndex 88.  I'm not familiar with
> how sysfs attributes work, so this may be pure nonsense.

I agree that something like the above is acceptable, exept that we need
an extra field for offset and another if indexed color or not. So something like:

A:2/0/R:10/2/G:10/12/B:10/22//I

is ARGB2888. The I means it's indexed (directcolor), differentiating it from
truecolor.

A:8/0/R:8/0/G:8/0/B:8/0//I

is ARGB8 indexed, because offset's are all equal to 0 and len's are all
equal to 8.  The 'I' here is probably redundant, but it can be used to
differentiate it from static pseudocolor.

From here, you can get the color depth which usually translates to bpp:

if (offset's = 0 && red.len == green.len && green.len == blue.len)
	if (transp.offset == 0) //ARGB8 bpp8
		depth = green.len ; 
	else			//A8_RGB8 bpp16
		depth = green.len + transp.len
else
	depth = red.len + green.len + blue.len + transp.len

If depth returns 15 (RGB555), the driver can easily round that up to bpp16.

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-07 21:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-05 20:19 CRTC scanout buffer types Jon Smirl
2005-08-06 23:23 ` Patrick McFarland
2005-08-06 23:27   ` Jon Smirl
2005-08-06 23:45   ` Dave Airlie
2005-08-07  9:43 ` Geert Uytterhoeven
2005-08-07 13:41   ` [Linux-fbdev-devel] " Jon Smirl
2005-08-07 20:42     ` Geert Uytterhoeven
2005-08-07 21:03     ` [Linux-fbdev-devel] " Ian Romanick
2005-08-07 21:45       ` Antonino A. Daplas [this message]
2005-08-07 22:31         ` Vladimir Dergachev
2005-08-08  1:15           ` Antonino A. Daplas
2005-08-08  2:05             ` [Linux-fbdev-devel] " Vladimir Dergachev
2005-08-08  2:33             ` Jon Smirl
2005-08-08  5:52               ` Antonino A. Daplas
2005-08-08  8:39               ` Geert Uytterhoeven
2005-08-08 13:14                 ` [Linux-fbdev-devel] " Jon Smirl
2005-08-07 21:10     ` Antonino A. Daplas
2005-08-08  8:41       ` 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=42F68105.1080207@pol.net \
    --to=adaplas@gmail.com \
    --cc=dri-devel@lists.sourceforge.net \
    --cc=idr@us.ibm.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.