[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdX_uyEznHy5vYwS8Q=+bBKPddeJa41KTWi4Fwh3tjX+zQ@mail.gmail.com>
Date: Tue, 1 Feb 2022 12:07:07 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Pekka Paalanen <ppaalanen@...il.com>
Cc: Javier Martinez Canillas <javierm@...hat.com>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Simon Ser <contact@...rsion.fr>,
Linux PWM List <linux-pwm@...r.kernel.org>,
Linux Fbdev development list <linux-fbdev@...r.kernel.org>,
Noralf Trønnes <noralf@...nnes.org>,
David Airlie <airlied@...ux.ie>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
DRI Development <dri-devel@...ts.freedesktop.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Maxime Ripard <maxime@...no.tech>,
Thomas Zimmermann <tzimmermann@...e.de>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Thierry Reding <thierry.reding@...il.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Lee Jones <lee.jones@...aro.org>
Subject: Re: [PATCH 0/4] drm/tiny: Add driver for Solomon SSD1307 OLED displays
Hi Pekka,
On Tue, Feb 1, 2022 at 11:42 AM Pekka Paalanen <ppaalanen@...il.com> wrote:
> On Tue, 1 Feb 2022 10:49:03 +0100
> Javier Martinez Canillas <javierm@...hat.com> wrote:
> > On 2/1/22 09:38, Daniel Vetter wrote:
> > > On Tue, Feb 1, 2022 at 9:34 AM Simon Ser <contact@...rsion.fr> wrote:
> > >> On Tuesday, February 1st, 2022 at 09:26, Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> > >>> 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@...ux-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
Powered by blists - more mailing lists