[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1565794726.3209.77.camel@nxp.com>
Date: Wed, 14 Aug 2019 14:58:47 +0000
From: Robert Chiras <robert.chiras@....com>
To: "daniel@...ishbar.org" <daniel@...ishbar.org>
CC: dl-linux-imx <linux-imx@....com>, "marex@...x.de" <marex@...x.de>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"stefan@...er.ch" <stefan@...er.ch>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"agx@...xcpu.org" <agx@...xcpu.org>,
"festevam@...il.com" <festevam@...il.com>,
"daniel@...ll.ch" <daniel@...ll.ch>,
"mark.rutland@....com" <mark.rutland@....com>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"shawnguo@...nel.org" <shawnguo@...nel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"airlied@...ux.ie" <airlied@...ux.ie>,
"kernel@...gutronix.de" <kernel@...gutronix.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>
Subject: Re: [EXT] Re: [PATCH v2 06/15] drm/mxsfb: Update mxsfb with
additional pixel formats
Hi Daniel,
On Mi, 2019-08-14 at 12:44 +0100, Daniel Stone wrote:
> Hi Robert,
>
> On Wed, 14 Aug 2019 at 11:49, Robert Chiras <robert.chiras@....com>
> wrote:
> >
> > + case DRM_FORMAT_BGR565: /* BG16 */
> > + if (mxsfb->devdata->ipversion < 4)
> > + goto err;
> > + writel(CTRL2_ODD_LINE_PATTERN(CTRL2_LINE_PATTERN_BG
> > R) |
> > + CTRL2_EVEN_LINE_PATTERN(CTRL2_LINE_PATTERN_
> > BGR),
> > + mxsfb->base + LCDC_V4_CTRL2 + REG_SET);
> > + /* Fall through */
> > + case DRM_FORMAT_RGB565: /* RG16 */
> > + ctrl |= CTRL_SET_WORD_LENGTH(0);
> > + ctrl &= ~CTRL_DF16;
> > + ctrl1 |= CTRL1_SET_BYTE_PACKAGING(0xf);
> > + break;
> For non-BGR formats, do you need to write RGB line-pattern back to
> the
> CTRL2 register? Otherwise, if you start with BGR565 then switch back
> to RGB565, presumably CTRL2 would still be programmed for BGR so you
> would display inverted channels.
The LINE_PATTERN from LCDC_V4_CTRL2 register is cleared above, with
this code:
+ if (mxsfb->devdata->ipversion >= 4)
+ writel(CTRL2_ODD_LINE_PATTERN(CTRL2_LINE_PATTERN_CLR) |
+ CTRL2_EVEN_LINE_PATTERN(CTRL2_LINE_PATTERN_CLR),
+ mxsfb->base + LCDC_V4_CTRL2 + REG_CLR);
>
> Same goes for all the other BGR/RGB format pairs below.
>
> Cheers,
> Daniel
Thanks,
Robert
Powered by blists - more mailing lists