summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/mxsfb/mxsfb_regs.h
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2016-12-15 04:28:41 +0300
committerDave Airlie <airlied@redhat.com>2017-03-10 04:10:42 +0300
commit10f2889ba35aeb251b9945ec4c461af8c124c41f (patch)
tree295bf7d747e8d74653df3230c1a013665a665637 /drivers/gpu/drm/mxsfb/mxsfb_regs.h
parent9813527abc558415dbe4dc0bb5bfbd12aab2c457 (diff)
downloadlinux-10f2889ba35aeb251b9945ec4c461af8c124c41f.tar.xz
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>
Diffstat (limited to 'drivers/gpu/drm/mxsfb/mxsfb_regs.h')
-rw-r--r--drivers/gpu/drm/mxsfb/mxsfb_regs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_regs.h b/drivers/gpu/drm/mxsfb/mxsfb_regs.h
index 31d62cd0d3d7..66a6ba9ec533 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_regs.h
+++ b/drivers/gpu/drm/mxsfb/mxsfb_regs.h
@@ -44,6 +44,7 @@
#define CTRL_DATA_SELECT (1 << 16)
#define CTRL_SET_BUS_WIDTH(x) (((x) & 0x3) << 10)
#define CTRL_GET_BUS_WIDTH(x) (((x) >> 10) & 0x3)
+#define CTRL_BUS_WIDTH_MASK (0x3 << 10)
#define CTRL_SET_WORD_LENGTH(x) (((x) & 0x3) << 8)
#define CTRL_GET_WORD_LENGTH(x) (((x) >> 8) & 0x3)
#define CTRL_MASTER (1 << 5)