Thread (26 messages) 26 messages, 6 authors, 2022-03-14

Re: [PATCH 0/4] drm/tiny: Add driver for Solomon SSD1307 OLED displays

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2022-02-01 11:07:25
Also in: dri-devel, linux-pwm, lkml

Hi Pekka,

On Tue, Feb 1, 2022 at 11:42 AM Pekka Paalanen [off-list ref] wrote:
On Tue, 1 Feb 2022 10:49:03 +0100
Javier Martinez Canillas [off-list ref] wrote:
quoted
On 2/1/22 09:38, Daniel Vetter wrote:
quoted
On Tue, Feb 1, 2022 at 9:34 AM Simon Ser [off-list ref] wrote:
quoted
On Tuesday, February 1st, 2022 at 09:26, Geert Uytterhoeven [off-list ref] wrote:
quoted
What's the story with the Rn formats?

The comments say "n bpp Red", while this is a monochrome (even
inverted) display?
I don't think the color matters that much. "Red" was picked just because it was
an arbitrary color, to make the difference with e.g. C8. Or am I mistaken?
The red comes from gl, where with shaders it really doesn't matter
what meaning you attach to channels, but really just how many you
have. So 2-channel formats are called RxGx, 3-channel RxGxBx,
4-channel RxGxBxAx and single-channel Rx. And we use drm_fourcc for
interop in general, hence why these exist.

We should probably make a comment that this really isn't a red channel
when used for display it's a greyscale/intensity format. Aside from
that documentation gap I think reusing Rx formats for
greyscale/intensity for display makes perfect sense.
-Daniel
To sump up the conversation in the #dri-devel channel, these drivers
should support the following formats:

1) Dx (Daniel suggested that for darkness, but inverted mono)
Did you consider format C1 instead?
That would be a 2-color display, which is not necessarily black
and white. Cfr. Amiga or Atari bit planes with bpp=1.
That's why fbdev has separate visuals for monochrome.
I have no idea how this would map to fbdev API though.
    #define FB_VISUAL_MONO01                0       /* Monochr.
1=Black 0=White */
    #define FB_VISUAL_MONO10                1       /* Monochr.
1=White 0=Black */
    #define FB_VISUAL_TRUECOLOR             2       /* True color   */

The above is RGB (or grayscale, see below).

    #define FB_VISUAL_PSEUDOCOLOR           3       /* Pseudo color
(like atari) */

Palette

    #define FB_VISUAL_DIRECTCOLOR           4       /* Direct color */

Usually used as RGB with gamma correction, but the actual hardware
is more flexible.

    #define FB_VISUAL_STATIC_PSEUDOCOLOR    5       /* Pseudo color readonly */

Fixed palette

And:

    struct fb_var_screeninfo {
            ...
            __u32 grayscale;                /* 0 = color, 1 = grayscale,    */

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help