mono, gray and index configs

22 messages, 4 authors, 2005-08-22 · open the first message on its own page

mono, gray and index configs

From: Jon Smirl <hidden>
Date: 2005-08-11 03:21:10

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?

Are there any more tricks to asking for a config? One trick I see is
if bpp is set to a value where the hardware only supports one format
at that bpp, ignore rbgt and set the config.

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
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

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

Re: mono, gray and index configs

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2005-08-11 08:22:48

On Thu, 11 Aug 2005, Antonino A. Daplas wrote:
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.
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.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
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

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

Re: mono, gray and index configs

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2005-08-11 11:49:46

On Thu, 11 Aug 2005, Antonino Daplas wrote:
On 8/11/05, Geert Uytterhoeven [off-list ref] wrote:
quoted
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).
Yes, for advertisement, that's true (cfr. amifb with bpp = 1, which is
pseudocolor).

But when the app needs monochrome, it can ask for 1 bpp. If it returns a mono
visual, fine. If it returns a pseudocolor visual, set the colormap to
black/white.
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. 
Monochrome means 2 colors, which are black and white (or white and black). If
the colors are different, it's (static) pseudocolor.

In fact monochrome is a special case of static pseudocolor.
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,
Yes, cfr. old HP9000/300 graphics hardware.
then it has 256 different colors.
Yes.
(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.)
There definitely are bugs w.r.t. this, especially in the 2.4 logo code ;-)
quoted
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).
That's true. Many apps handle only a very limited subset of all capabilities,
and fail miserably if the assumptions they make are not valid.
So, it is useful to have the capability to choose between truecolor
and directcolor when dealing with those apps without rebooting or
recompiling.
Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
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

Re: mono, gray and index configs

From: "Antonino A. Daplas" <adaplas@gmail.com>
Date: 2005-08-11 17:35:15

Geert Uytterhoeven wrote:
On Thu, 11 Aug 2005, Antonino Daplas wrote:
quoted
On 8/11/05, Geert Uytterhoeven [off-list ref] wrote:
quoted
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).
Yes, for advertisement, that's true (cfr. amifb with bpp = 1, which is
pseudocolor).
Ok.
But when the app needs monochrome, it can ask for 1 bpp. If it returns a mono
visual, fine. If it returns a pseudocolor visual, set the colormap to
black/white.
quoted
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. 
Monochrome means 2 colors, which are black and white (or white and black). If
the colors are different, it's (static) pseudocolor.

In fact monochrome is a special case of static pseudocolor.
Ok.
quoted
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,
Yes, cfr. old HP9000/300 graphics hardware.
Hmm.  Yes, there's a bug in fbdev then with regards to this hardware.
quoted
then it has 256 different colors.
Yes.
quoted
(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.)
There definitely are bugs w.r.t. this, especially in the 2.4 logo code ;-)
Yes, I would agree.  Do you know of any outstanding bugs on color handling
in 2.6 code, especially for hardware with bitdepths < 8? I would like to
fix them.

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

Re: mono, gray and index configs

From: Jon Smirl <hidden>
Date: 2005-08-11 19:14:34

Here's a new version that actually lets me set all possible scanout
configs on radeonfb. I can even set I4 but I don't think the code is
correct for it yet everywhere in radeonfb. The core code in the patch
should be ok. My further changes should be restricted to the radeonfb
code. For example, I haven't added the logic to radeonfb to "round up"
to the next config.

You get two new sysfs attributes:
configs - optional, but really nice to have, list of all configs
supported by the driver
config - current config the hardware is set to.

example syntax...
[root@jonsmirl fb0]# cat configs
I4
I8
A1R5G5B5
R5G6B5
R8G8B8
A8R8G8B8
A4R4G4B4
A8I8
A2R10G10B10

Offsets are computed from the field widths. So if a card sets BGR vs
RGB and you cat its config you will see RGB or BGR in the config
string. M is used for a grayscale field.

So give the patch a try and start expanding it to handle other cards.

-- 
Jon Smirl
jonsmirl@gmail.com

Re: mono, gray and index configs

From: Jon Smirl <hidden>
Date: 2005-08-20 01:14:20

Could everyone give this a try and give me some feedback?

On 8/11/05, Jon Smirl [off-list ref] wrote:
Here's a new version that actually lets me set all possible scanout
configs on radeonfb. I can even set I4 but I don't think the code is
correct for it yet everywhere in radeonfb. The core code in the patch
should be ok. My further changes should be restricted to the radeonfb
code. For example, I haven't added the logic to radeonfb to "round up"
to the next config.

You get two new sysfs attributes:
configs - optional, but really nice to have, list of all configs
supported by the driver
config - current config the hardware is set to.

example syntax...
[root@jonsmirl fb0]# cat configs
I4
I8
A1R5G5B5
R5G6B5
R8G8B8
A8R8G8B8
A4R4G4B4
A8I8
A2R10G10B10

Offsets are computed from the field widths. So if a card sets BGR vs
RGB and you cat its config you will see RGB or BGR in the config
string. M is used for a grayscale field.

So give the patch a try and start expanding it to handle other cards.

--
Jon Smirl
jonsmirl@gmail.com


-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
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

Re: mono, gray and index configs

From: "Antonino A. Daplas" <adaplas@gmail.com>
Date: 2005-08-20 02:56:51

Jon Smirl wrote:
Could everyone give this a try and give me some feedback?
Just merging your patch in my tree.  Will give you feedback in a
day or so.

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

Re: mono, gray and index configs

From: Jon Smirl <hidden>
Date: 2005-08-20 03:10:04

The patch is just for testing, don't send it on. The radeonfb portion
is definitely not finished.

This adds an optional function to each driver that advertises what
configs it offers.

+char *radeonfb_getconfigs(struct fb_info *info)
+{
+	return "I4\nI8\nA1R5G5B5\nR5G6B5\nR8G8B8\nA8R8G8B8\nA4R4G4B4\nA8I8\nA2R10G10B10\n";
+}
 
  static struct fb_ops radeonfb_ops = {
 	.owner			= THIS_MODULE,
@@ -1873,6 +1909,7 @@ static struct fb_ops radeonfb_ops = {
 	.fb_fillrect		= radeonfb_fillrect,
 	.fb_copyarea		= radeonfb_copyarea,
 	.fb_imageblit		= radeonfb_imageblit,
+	.fb_get_configs		= radeonfb_getconfigs,
 };
If you know what configs the driver support try setting them via the
sysfs attribute. You can also check out your config match code by
putting in non-supported configs and setting what gets returned in the
attribute.

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
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

Re: mono, gray and index configs

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2005-08-22 10:18:02

On Fri, 19 Aug 2005, Jon Smirl wrote:
quoted hunk
The patch is just for testing, don't send it on. The radeonfb portion
is definitely not finished.

This adds an optional function to each driver that advertises what
configs it offers.

+char *radeonfb_getconfigs(struct fb_info *info)
+{
+	return "I4\nI8\nA1R5G5B5\nR5G6B5\nR8G8B8\nA8R8G8B8\nA4R4G4B4\nA8I8\nA2R10G10B10\n";
+}
 
  static struct fb_ops radeonfb_ops = {
 	.owner			= THIS_MODULE,
@@ -1873,6 +1909,7 @@ static struct fb_ops radeonfb_ops = {
 	.fb_fillrect		= radeonfb_fillrect,
 	.fb_copyarea		= radeonfb_copyarea,
 	.fb_imageblit		= radeonfb_imageblit,
+	.fb_get_configs		= radeonfb_getconfigs,
 };
Do we really need this?

You can easily write a `probe loop' to find out about all supported configs for
a driver like this:

    for_all_possible_configs(config) {
	struct fb_var_screeninfo var;
	set_up_var(var, config);
	var.activate |= FB_ACTIVATE_TEST;
	if (ioctl(FBIOPUT_VSCREENINFO)) {
	    /* config not supported */
	} else if (config_has_changed(var, config) {
	    /* config not supported */
	} else {
	    /* config is supported */
	}
    }

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
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

Re: mono, gray and index configs

From: Richard Smith <hidden>
Date: 2005-08-22 13:30:59

quoted
This adds an optional function to each driver that advertises what
configs it offers.
Do we really need this?

You can easily write a `probe loop' to find out about all supported configs for
a driver like this:

    for_all_possible_configs(config) {
        struct fb_var_screeninfo var;
This will actually try to set the mode right?

SDL does it this way and its caused me some pain dealing with
framebuffers on hardware that has issues with certain modes.  Its also
a good bit slower for the app to startup while the code crunches out
the pll settings.

From a users perspective I think advertising valid modes is a good thing.

-- 
Richard A. Smith


-------------------------------------------------------
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

Re: mono, gray and index configs

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2005-08-22 14:07:08

On Mon, 22 Aug 2005, Richard Smith wrote:
quoted
quoted
This adds an optional function to each driver that advertises what
configs it offers.
Do we really need this?

You can easily write a `probe loop' to find out about all supported configs for
a driver like this:

    for_all_possible_configs(config) {
        struct fb_var_screeninfo var;
This will actually try to set the mode right?
No, you cut the following line:

| var.activate |= FB_ACTIVATE_TEST;

which will cause the driver to check whether the mode is valid (or can be made
valid by rounding up).
SDL does it this way and its caused me some pain dealing with
framebuffers on hardware that has issues with certain modes.  Its also
a good bit slower for the app to startup while the code crunches out
the pll settings.
quoted
From a users perspective I think advertising valid modes is a good thing.
Except that on most hardware the list of valid modes is _very_ large...
How many combinations of resolution, color depth, and timings do you think you
can have? I guess the complete list can easily fill up all your RAM...

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
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

Re: mono, gray and index configs

From: Richard Smith <hidden>
Date: 2005-08-22 14:36:27

No, you cut the following line:

| var.activate |= FB_ACTIVATE_TEST;
Sorry. I was shorting and I went too far.
which will cause the driver to check whether the mode is valid (or can be made
valid by rounding up).
Ah well that sounds more like was thinking of.  Is FB_ACTIVATE_TEST
new from 2.4 -> 2.6?
Be nice if SDL (and other apps) did it that way rather than actually
makeing the driver try to switch to the mode.
  
-- 
Richard A. Smith


-------------------------------------------------------
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

Re: mono, gray and index configs

From: "Antonino A. Daplas" <adaplas@gmail.com>
Date: 2005-08-22 15:48:17

Richard Smith wrote:
Ah well that sounds more like was thinking of.  Is FB_ACTIVATE_TEST
new from 2.4 -> 2.6?
Be nice if SDL (and other apps) did it that way rather than actually
makeing the driver try to switch to the mode.
  
2.4 has this also.

I agree with Geert though. Just too many combinations, and this is just
for RGB.

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

Re: mono, gray and index configs

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2005-08-22 17:20:18

On Mon, 22 Aug 2005, Richard Smith wrote:
quoted
No, you cut the following line:

| var.activate |= FB_ACTIVATE_TEST;
Sorry. I was shorting and I went too far.
quoted
which will cause the driver to check whether the mode is valid (or can be made
valid by rounding up).
Ah well that sounds more like was thinking of.  Is FB_ACTIVATE_TEST
new from 2.4 -> 2.6?
It's been there from the beginning (i.e. from 1994). In fact very little was
changed in the public (userspace) fbdev interface since then :-)

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
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

Re: mono, gray and index configs

From: Richard Smith <hidden>
Date: 2005-08-22 19:00:23

quoted
Ah well that sounds more like was thinking of.  Is FB_ACTIVATE_TEST
new from 2.4 -> 2.6?
It's been there from the beginning (i.e. from 1994). In fact very little was
changed in the public (userspace) fbdev interface since then :-)
Hmmm.. I just went and looked at the SDL code and indeed thats what
its doing so I was mistaken.  Untill now I was just assuming that SDL
was doing that.

The stpcfb (from ST) code must be totally messing that IOCTL up then. 
I guess thats not so suprising since the stpcfb was broken in a couple
of other ways.  That device has been responsible for the bulk of my
pain.

I'll go compare it to a few of the other drivers and see what its
doing wrong now that I know its a bug and not a feature.

Thanks.  

-- 
Richard A. Smith


-------------------------------------------------------
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

Re: mono, gray and index configs

From: Richard Smith <hidden>
Date: 2005-08-22 19:45:05

Hmmm.. I just went and looked at the SDL code and indeed thats what
its doing so I was mistaken.  Untill now I was just assuming that SDL
was doing that.
I think what led me to believe this is that SDL has a setting for
broken modes.  If you set this then it dosen't do a mode scan and only
tries to set what you request.  Normall it tries to match the nearest
mode if it can't find what you request.

So I glarked out that the ioctl must be trying to apply the settings
but I bet its for the other graphics backends that SDL supports.

-- 
Richard A. Smith


-------------------------------------------------------
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

Re: mono, gray and index configs

From: Jon Smirl <hidden>
Date: 2005-08-22 15:57:22

On 8/22/05, Geert Uytterhoeven [off-list ref] wrote:
On Fri, 19 Aug 2005, Jon Smirl wrote:
quoted
The patch is just for testing, don't send it on. The radeonfb portion
is definitely not finished.

This adds an optional function to each driver that advertises what
configs it offers.

+char *radeonfb_getconfigs(struct fb_info *info)
+{
+     return "I4\nI8\nA1R5G5B5\nR5G6B5\nR8G8B8\nA8R8G8B8\nA4R4G4B4\nA8I8\nA2R10G10B10\n";
+}

  static struct fb_ops radeonfb_ops = {
      .owner                  = THIS_MODULE,
@@ -1873,6 +1909,7 @@ static struct fb_ops radeonfb_ops = {
      .fb_fillrect            = radeonfb_fillrect,
      .fb_copyarea            = radeonfb_copyarea,
      .fb_imageblit           = radeonfb_imageblit,
+     .fb_get_configs         = radeonfb_getconfigs,
 };
Do we really need this?
It is optional. It's used in sysfs, where you cat the config variable
to get a list of valid configs. Once in sysfs a program could then use
it to generate a list to pick from, etc...

It seems hard to use the search method if you are looking for a config
that is in the middle of the list.

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
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

Re: mono, gray and index configs

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2005-08-12 07:24:42

On Fri, 12 Aug 2005, Antonino A. Daplas wrote:
Geert Uytterhoeven wrote:
quoted
On Thu, 11 Aug 2005, Antonino Daplas wrote:
quoted
(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.)
There definitely are bugs w.r.t. this, especially in the 2.4 logo code ;-)
Yes, I would agree.  Do you know of any outstanding bugs on color handling
in 2.6 code, especially for hardware with bitdepths < 8? I would like to
fix them.
Unfortunately not. Due to personel reasons, I temporarily don't have much
time left to do real coding.

You can always try vgafb's 16 color mode and check for yourself.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
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

Re: mono, gray and index configs

From: "Antonino A. Daplas" <adaplas@gmail.com>
Date: 2005-08-12 10:29:36

Geert Uytterhoeven wrote:
On Fri, 12 Aug 2005, Antonino A. Daplas wrote:
quoted
Geert Uytterhoeven wrote:
quoted
On Thu, 11 Aug 2005, Antonino Daplas wrote:
quoted
(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.)
There definitely are bugs w.r.t. this, especially in the 2.4 logo code ;-)
Yes, I would agree.  Do you know of any outstanding bugs on color handling
in 2.6 code, especially for hardware with bitdepths < 8? I would like to
fix them.
Unfortunately not. Due to personel reasons, I temporarily don't have much
time left to do real coding.

You can always try vgafb's 16 color mode and check for yourself.
That's okay. I'm actually emulating these low bit depths using pseudocolor whenever
I look for bugs for depths < 4 (ie monochrome text attributes). I haven't found
any yet except for the greater than 1-bit monochrome color handling which I've
already fixed in my tree.

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

Re: mono, gray and index configs

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2005-08-11 08:20:56

On Wed, 10 Aug 2005, Jon Smirl wrote:
Are there any more tricks to asking for a config? One trick I see is
if bpp is set to a value where the hardware only supports one format
at that bpp, ignore rbgt and set the config.
Ignoring is not allowed, but rounding up is.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
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