On 2/1/19 18:02, Ahmad Fatoum wrote:

> -     reg &= ~CTRL_BUS_WIDTH_MASK;
> +     ctrl &= ~CTRL_BUS_WIDTH_MASK;
>       switch (bus_format) {

>       default:
> +             pattern = CTRL2_PATTERN_RGB;
>               dev_err(drm->dev, "Unknown media bus format %d\n", bus_format);
>               break;
>       }
> -     writel(reg, mxsfb->base + LCDC_CTRL);
> +     writel(ctrl, mxsfb->base + LCDC_CTRL);

Should the default case explicitly set a value for ctrl?
So far, the appropriate bits stay at zero after the &= ~CTRL_BUS_WIDTH_MASK
which is STMLCDIF_16BIT.

Or maybe skip the LCDC_CTRL register write altogether if dev_err is reached?

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to