Thread (27 messages) 27 messages, 4 authors, 2019-08-14

Re: [PATCH v2 06/15] drm/mxsfb: Update mxsfb with additional pixel formats

From: Daniel Stone <hidden>
Date: 2019-08-14 11:46:31
Also in: dri-devel, linux-devicetree, lkml

Hi Robert,

On Wed, 14 Aug 2019 at 11:49, Robert Chiras [off-list ref] wrote:
+       case DRM_FORMAT_BGR565: /* BG16 */
+               if (mxsfb->devdata->ipversion < 4)
+                       goto err;
+               writel(CTRL2_ODD_LINE_PATTERN(CTRL2_LINE_PATTERN_BGR) |
+                       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.

Same goes for all the other BGR/RGB format pairs below.

Cheers,
Daniel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help