From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Cedric Le Goater <clg@fr.ibm.com>,
linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] offb: Fix little-endian support
Date: Mon, 16 Jun 2014 07:35:35 +0000 [thread overview]
Message-ID: <1402904135.7661.34.camel@pasglop> (raw)
In-Reply-To: <1400073709-15012-1-git-send-email-tiwai@suse.de>
On Wed, 2014-05-14 at 15:21 +0200, Takashi Iwai wrote:
> case 16: /* RGB 565 */
> var->bits_per_pixel = 16;
> - var->red.offset = 11;
> + if (fb_be_math(info)) {
> + var->red.offset = 11;
> + var->green.offset = 5;
> + var->blue.offset = 0;
> + } else {
> + var->red.offset = 0;
> + var->green.offset = 5;
> + var->blue.offset = 11;
> + }
> var->red.length = 5;
> - var->green.offset = 5;
> var->green.length = 6;
> - var->blue.offset = 0;
> var->blue.length = 5;
> var->transp.offset = 0;
> var->transp.length = 0;
> break;
I somewhat doubt that this (and 5:5:5) actually work, do they ? the
green gets split into two separate fields, which we can't express
properly here...
Cheers,
Ben.
WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Cedric Le Goater <clg@fr.ibm.com>,
linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] offb: Fix little-endian support
Date: Mon, 16 Jun 2014 17:35:35 +1000 [thread overview]
Message-ID: <1402904135.7661.34.camel@pasglop> (raw)
In-Reply-To: <1400073709-15012-1-git-send-email-tiwai@suse.de>
On Wed, 2014-05-14 at 15:21 +0200, Takashi Iwai wrote:
> case 16: /* RGB 565 */
> var->bits_per_pixel = 16;
> - var->red.offset = 11;
> + if (fb_be_math(info)) {
> + var->red.offset = 11;
> + var->green.offset = 5;
> + var->blue.offset = 0;
> + } else {
> + var->red.offset = 0;
> + var->green.offset = 5;
> + var->blue.offset = 11;
> + }
> var->red.length = 5;
> - var->green.offset = 5;
> var->green.length = 6;
> - var->blue.offset = 0;
> var->blue.length = 5;
> var->transp.offset = 0;
> var->transp.length = 0;
> break;
I somewhat doubt that this (and 5:5:5) actually work, do they ? the
green gets split into two separate fields, which we can't express
properly here...
Cheers,
Ben.
next prev parent reply other threads:[~2014-06-16 7:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-14 13:21 [PATCH] offb: Fix little-endian support Takashi Iwai
2014-05-14 13:21 ` Takashi Iwai
2014-05-14 14:01 ` Cedric Le Goater
2014-05-14 14:01 ` Cedric Le Goater
2014-05-14 14:24 ` Takashi Iwai
2014-05-14 14:24 ` Takashi Iwai
2014-05-14 17:04 ` Cedric Le Goater
2014-05-14 17:04 ` Cedric Le Goater
2014-05-14 17:57 ` Takashi Iwai
2014-05-14 17:57 ` Takashi Iwai
2014-06-16 7:23 ` Benjamin Herrenschmidt
2014-06-16 7:23 ` Benjamin Herrenschmidt
2014-06-16 7:32 ` Benjamin Herrenschmidt
2014-06-16 7:32 ` Benjamin Herrenschmidt
2014-05-14 16:56 ` Geert Uytterhoeven
2014-05-14 16:56 ` Geert Uytterhoeven
2014-06-16 7:35 ` Benjamin Herrenschmidt [this message]
2014-06-16 7:35 ` Benjamin Herrenschmidt
2014-06-16 23:54 ` Benjamin Herrenschmidt
2014-06-16 23:54 ` Benjamin Herrenschmidt
2014-06-17 10:01 ` Takashi Iwai
2014-06-17 10:01 ` Takashi Iwai
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=1402904135.7661.34.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=clg@fr.ibm.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=plagnioj@jcrosoft.com \
--cc=tiwai@suse.de \
--cc=tomi.valkeinen@ti.com \
/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.