From: troy.kisky@boundarydevices•com (Troy Kisky)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCHv4][ 3/7] staging: imx-drm: Add RGB666 support for parallel display.
Date: Wed, 13 Nov 2013 11:43:44 -0700 [thread overview]
Message-ID: <5283C860.3020103@boundarydevices.com> (raw)
In-Reply-To: <1384334603-14208-3-git-send-email-denis@eukrea.com>
On 11/13/2013 2:23 AM, Denis Carikli wrote:
>
> + /* rgb666 */
> + ipu_dc_map_clear(priv, IPU_DC_MAP_RGB666);
> + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */
> + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */
> + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */
> +
> return 0;
> }
>
>
Since, rgb24 and bgr24 reverse the byte numbers
/* rgb24 */
ipu_dc_map_clear(priv, IPU_DC_MAP_RGB24);
ipu_dc_map_config(priv, IPU_DC_MAP_RGB24, 0, 7, 0xff); /* blue */
ipu_dc_map_config(priv, IPU_DC_MAP_RGB24, 1, 15, 0xff); /* green */
ipu_dc_map_config(priv, IPU_DC_MAP_RGB24, 2, 23, 0xff); /* red */
/* bgr24 */
ipu_dc_map_clear(priv, IPU_DC_MAP_BGR24);
ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 2, 7, 0xff); /* red */
ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green */
ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */
Shouldn't rgb666 and bgr666 do the same?
Currently we have,
/* bgr666 */
ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666);
ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 5, 0xfc); /* blue */
ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /*
green */
ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */
Where I'd expect to see
/* bgr666 */
ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666);
ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 17, 0xfc); /* blue */
ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /*
green */
ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 5, 0xfc); /* red */
So, it looks like you are adding a duplicate of bgr666 because bgr666 is
wrong.
Also, I'd prefer to keep the entries in 0,1,2 byte number order(blue,
green, red,
assuming byte 0 is always blue) so that duplicates are easier to spot.
Not related to this patch, but the comments on gbr24 appear wrong as well.
/* gbr24 */
ipu_dc_map_clear(priv, IPU_DC_MAP_GBR24);
ipu_dc_map_config(priv, IPU_DC_MAP_GBR24, 2, 15, 0xff); /* green */
ipu_dc_map_config(priv, IPU_DC_MAP_GBR24, 1, 7, 0xff); /* blue */
ipu_dc_map_config(priv, IPU_DC_MAP_GBR24, 0, 23, 0xff); /* red */
Should be
/* brg24 */
ipu_dc_map_clear(priv, IPU_DC_MAP_BRG24);
ipu_dc_map_config(priv, IPU_DC_MAP_BRG24, 0, 23, 0xff); /* blue*/
ipu_dc_map_config(priv, IPU_DC_MAP_BRG24, 1, 7, 0xff); /* green */
ipu_dc_map_config(priv, IPU_DC_MAP_BRG24, 2, 15, 0xff); /* red */
Of course, my understanding may be totally wrong. If so, please show me
the light!
Troy
next prev parent reply other threads:[~2013-11-13 18:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 9:23 [PATCHv4][ 1/7] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format Denis Carikli
2013-11-13 9:23 ` [PATCHv4][ 2/7] staging: imx-drm: Use de-active and pixelclk-active display-timings Denis Carikli
2013-11-13 9:23 ` [PATCHv4][ 3/7] staging: imx-drm: Add RGB666 support for parallel display Denis Carikli
2013-11-13 18:43 ` Troy Kisky [this message]
2013-11-13 19:12 ` Russell King - ARM Linux
2013-11-13 19:48 ` Laurent Pinchart
2013-11-13 9:23 ` [PATCHv4][ 4/7] staging: imx-drm: parallel display: add regulator support Denis Carikli
2013-11-13 9:32 ` Alexander Shiyan
2013-11-13 9:23 ` [PATCHv4][ 5/7] ARM: dts: mbimx51sd: Add display support Denis Carikli
2013-11-13 9:23 ` [PATCHv4][ 6/7] ARM: dts: mbimx51sd: Add CMO-QVGA backlight support Denis Carikli
2013-11-13 9:23 ` [PATCHv4][ 7/7] ARM: imx_v6_v7_defconfig: Enable backlight gpio support Denis Carikli
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=5283C860.3020103@boundarydevices.com \
--to=troy.kisky@boundarydevices$(echo .)com \
--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