From a3b3cc2b883aac18a3388a405db809a99d66e3cf Mon Sep 17 00:00:00 2001 From: Archit Taneja Date: Thu, 8 Sep 2011 18:42:16 +0530 Subject: OMAP: DSS2: Create an enum for DSI pixel formats Currently, DSI pixel info is only represented by the pixel size in bits using the pixel_size parameter in omap_dss_device struct's ctrl member. This is not sufficient information for DSI video mode usage, as two of the supported formats(RGB666 loosely packed, and RGB888) have the same pixel container size, but different data_type values for the video mode packet header. Create enum "omap_dss_dsi_pixel_format" which describes the pixel data format the panel is configured for. Create helper function dsi_get_pixel_size() which returns the pixel size of the given pixel format. Modify functions omapdss_default_get_recommended_bpp() and dss_use_replication() to use dsi_get_pixel_size(). Signed-off-by: Archit Taneja Signed-off-by: Tomi Valkeinen --- include/video/omapdss.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/video') diff --git a/include/video/omapdss.h b/include/video/omapdss.h index abe8b1e..89a9c29 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -129,6 +129,13 @@ enum omap_dss_venc_type { OMAP_DSS_VENC_TYPE_SVIDEO, }; +enum omap_dss_dsi_pixel_format { + OMAP_DSS_DSI_FMT_RGB888, + OMAP_DSS_DSI_FMT_RGB666, + OMAP_DSS_DSI_FMT_RGB666_PACKED, + OMAP_DSS_DSI_FMT_RGB565, +}; + enum omap_dss_dsi_mode { OMAP_DSS_DSI_CMD_MODE = 0, OMAP_DSS_DSI_VIDEO_MODE, @@ -496,6 +503,7 @@ struct omap_dss_device { enum omap_panel_config config; + enum omap_dss_dsi_pixel_format dsi_pix_fmt; enum omap_dss_dsi_mode dsi_mode; } panel; -- cgit v1.1