public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: swarren@wwwdotorg•org (Stephen Warren)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH V2] video: implement a simple framebuffer driver
Date: Mon, 20 May 2013 09:25:46 -0600	[thread overview]
Message-ID: <519A407A.4040006@wwwdotorg.org> (raw)
In-Reply-To: <CAAVeFuJ5q4Y0QtvJX2iVmq_O2ofs1B9=MB_aA8VdcEBdM4zf2Q@mail.gmail.com>

On 05/18/2013 04:29 AM, Alexandre Courbot wrote:
> On Thu, Apr 4, 2013 at 11:39 AM, Stephen Warren <swarren@wwwdotorg•org> wrote:
>> +struct simplefb_format {
>> +       const char *name;
>> +       u32 bits_per_pixel;
>> +       struct fb_bitfield red;
>> +       struct fb_bitfield green;
>> +       struct fb_bitfield blue;
>> +       struct fb_bitfield transp;
>> +};
>> +
>> +struct simplefb_format simplefb_formats[] = {
>> +       { "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0} },
>> +};
> 
> I have been adding a few extra formats to this list, and I wonder if
> this could not simply be turned into a function that would directly
> convert the name string into the corresponding right format. The
> mapping between name and format seems to be a 1:1 and this would
> probably avoid errors in the future. I'm especially thinking about
> color order here - I started adding a mode that reads
> 
>     { "r8g8b8a8", 32, {0, 8}, {8, 8}, {16, 8}, {24, 8} },
> 
> while it should probably be called "a8b8g8r8" as the order of colors
> is not the same as your r5g6b5.
> 
> I can submit a patch if there is no issue with that idea.

I chose r5g6b5 rather than rgb565 specifically to make that format
trivially name machine-parsable. So, I'm not opposed to converting that
table to code. I'm not 100% sure if it's worth it or necessary by the
time we get to just 2 formats in the array, but I don't see any big
disadvantage, so why not. The DT binding documentation might want
enhancing with a more general description of how formats should be
represented if this is implemented.

      reply	other threads:[~2013-05-20 15:25 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-04  2:39 [PATCH V2] video: implement a simple framebuffer driver Stephen Warren
2013-04-09  0:16 ` Andrew Morton
2013-04-09  3:16   ` Stephen Warren
2013-04-09  8:08   ` Geert Uytterhoeven
2013-04-11  9:56   ` Laurent Pinchart
2013-04-11 16:06     ` Stephen Warren
2013-04-11 20:06       ` Laurent Pinchart
2013-04-11 20:38         ` Stephen Warren
2013-04-29 20:56           ` Laurent Pinchart
2013-04-29 21:15     ` Tomasz Figa
2013-04-29 21:20       ` Laurent Pinchart
2013-04-29 21:31         ` Tomasz Figa
2013-04-29 21:40           ` Laurent Pinchart
2013-04-29 22:04             ` Arnd Bergmann
2013-04-29 22:23               ` Laurent Pinchart
2013-04-29 22:40                 ` Olof Johansson
2013-04-30  9:50                   ` Laurent Pinchart
2013-05-02 18:25               ` Stephen Warren
2013-05-02 18:35                 ` Geert Uytterhoeven
2013-05-03 10:06                 ` Laurent Pinchart
2013-05-07 21:33                   ` Andrew Morton
2013-05-08  2:36                     ` Stephen Warren
2013-05-08 19:28                       ` Olof Johansson
2013-05-08 20:58                       ` Rob Landley
2013-04-30  7:28       ` Tomi Valkeinen
2013-04-11 10:42 ` Geert Uytterhoeven
2013-04-11 16:10   ` Stephen Warren
2013-04-30  7:27 ` Tomi Valkeinen
2013-04-30 10:28   ` Arnd Bergmann
2013-04-30 11:42     ` Laurent Pinchart
2013-04-30 11:48       ` Tomi Valkeinen
2013-04-30 11:49         ` Laurent Pinchart
2013-04-30 11:46     ` Tomi Valkeinen
2013-05-03  5:40       ` Dave Airlie
2013-04-30  7:39 ` Tomi Valkeinen
2013-04-30 10:34   ` Arnd Bergmann
2013-04-30 14:38   ` Re[2]: " Alexander Shiyan
2013-04-30 15:07     ` Arnd Bergmann
2013-05-18 10:29 ` Alexandre Courbot
2013-05-20 15:25   ` Stephen Warren [this message]

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=519A407A.4040006@wwwdotorg.org \
    --to=swarren@wwwdotorg$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox