drm: mxsfb: use bus_format to determine LCD bus width
authorStefan Agner <stefan@agner.ch>
Thu, 15 Dec 2016 01:28:41 +0000 (17:28 -0800)
committerDave Airlie <airlied@redhat.com>
Fri, 10 Mar 2017 01:10:42 +0000 (11:10 +1000)
commit10f2889ba35aeb251b9945ec4c461af8c124c41f
tree295bf7d747e8d74653df3230c1a013665a665637
parent9813527abc558415dbe4dc0bb5bfbd12aab2c457
drm: mxsfb: use bus_format to determine LCD bus width

The LCD bus width does not need to align with the pixel format. The
LCDIF controller automatically converts between pixel formats and
bus width by padding or dropping LSBs.

The DRM subsystem has the notion of bus_format which allows to
determine what bus_formats are supported by the display. Choose the
first available or fallback to 24 bit if none are available.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/mxsfb/mxsfb_crtc.c
drivers/gpu/drm/mxsfb/mxsfb_regs.h