From 68a6fedcd4991ff644aac67f7bf38bbffe0d1bb4 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 12 Dec 2013 12:05:28 +0100 Subject: video: ipufb: make disp_data_fmt configurable With the IPU the way the display is connected is completely independent of the framebuffer pixel format. So instead of specifying a pixel width in platform_data we have to specify how the display is connected. Signed-off-by: Sascha Hauer --- arch/arm/mach-imx/include/mach/imx-ipu-fb.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'arch/arm/mach-imx/include/mach/imx-ipu-fb.h') diff --git a/arch/arm/mach-imx/include/mach/imx-ipu-fb.h b/arch/arm/mach-imx/include/mach/imx-ipu-fb.h index 74a1a88b56..43b3bda98b 100644 --- a/arch/arm/mach-imx/include/mach/imx-ipu-fb.h +++ b/arch/arm/mach-imx/include/mach/imx-ipu-fb.h @@ -21,6 +21,20 @@ #define FB_SYNC_SWAP_RGB 0x04000000 #define FB_SYNC_CLK_SEL_EN 0x02000000 +/* + * Specify the way your display is connected. The IPU can arbitrarily + * map the internal colors to the external data lines. We only support + * the following mappings at the moment. + */ +enum disp_data_mapping { + /* blue -> d[0..5], green -> d[6..11], red -> d[12..17] */ + IPU_DISP_DATA_MAPPING_RGB666, + /* blue -> d[0..4], green -> d[5..10], red -> d[11..15] */ + IPU_DISP_DATA_MAPPING_RGB565, + /* blue -> d[0..7], green -> d[8..15], red -> d[16..23] */ + IPU_DISP_DATA_MAPPING_RGB888, +}; + /* * struct mx3fb_platform_data - mx3fb platform data */ @@ -28,6 +42,7 @@ struct imx_ipu_fb_platform_data { struct fb_videomode *mode; unsigned char bpp; u_int num_modes; + enum disp_data_mapping disp_data_fmt; void __iomem *framebuffer; void __iomem *framebuffer_ovl; /** hook to enable backlight and stuff */ -- cgit v1.2.3