From: Hitesh K. Patel <[email protected]> The graphics driver can now dynamically determine whether a video mode or command mode MIPI panel is attached based off of kernel command line options or the values stored in the GCT instead of requiring a change to the kernel config and subsequently a recompile of the kernel.
Fix TPO Panel Initilization where Video mode was commented out. Change-Id: Ia9149a002aa67adaf500236433168e82ea225a69 Signed-off-by: Thomas G Eaton <[email protected]> Signed-off-by: Hitesh K. Patel <[email protected]> --- drivers/staging/mrst/drv/mdfld_dsi_output.c | 13 +------------ drivers/staging/mrst/drv/mdfld_output.c | 21 ++++++++++++++++++++- drivers/staging/mrst/drv/mdfld_output.h | 2 ++ 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/drivers/staging/mrst/drv/mdfld_dsi_output.c b/drivers/staging/mrst/drv/mdfld_dsi_output.c index f3abc01..5ec1102 100644 --- a/drivers/staging/mrst/drv/mdfld_dsi_output.c +++ b/drivers/staging/mrst/drv/mdfld_dsi_output.c @@ -32,17 +32,6 @@ #define MDFLD_DSI_BRIGHTNESS_MAX_LEVEL 100 /*use command mode by default*/ -#ifdef CONFIG_MDFLD_DSI_DBI -#define MDFLD_DSI_ENCODER_TYPE MDFLD_DSI_ENCODER_DBI -#endif - -#ifdef CONFIG_MDFLD_DSI_DPI -#define MDFLD_DSI_ENCODER_TYPE MDFLD_DSI_ENCODER_DPI -#endif - -#ifndef MDFLD_DSI_ENCODER_TYPE -#define MDFLD_DSI_ENCODER_TYPE MDFLD_DSI_ENCODER_DBI -#endif /** * make these MCS command global @@ -680,7 +669,7 @@ static int mdfld_dsi_get_default_config(struct drm_device * dev, } config->bpp = 24; - config->type = MDFLD_DSI_ENCODER_TYPE; + config->type = is_panel_vid_or_cmd(dev); config->lane_count = 2; config->channel_num = 0; /*NOTE: video mode is ignored when type is MDFLD_DSI_ENCODER_DBI*/ diff --git a/drivers/staging/mrst/drv/mdfld_output.c b/drivers/staging/mrst/drv/mdfld_output.c index 59c3a1f..294791a 100644 --- a/drivers/staging/mrst/drv/mdfld_output.c +++ b/drivers/staging/mrst/drv/mdfld_output.c @@ -90,6 +90,25 @@ enum panel_type get_panel_type(struct drm_device *dev, int pipe) } } +int is_panel_vid_or_cmd(struct drm_device *dev) +{ + int ret = 0; + switch(PanelID) { + case TMD_VID: + case TPO_VID: + case PYR_VID: + ret = MDFLD_DSI_ENCODER_DPI; + break; + case TMD_CMD: + case TPO_CMD: + case PYR_CMD: + default: + ret = MDFLD_DSI_ENCODER_DBI; + break; + } + return ret; +} + void mdfld_output_init(struct drm_device* dev) { enum panel_type p_type1, p_type2; @@ -127,7 +146,7 @@ void init_panel(struct drm_device* dev, int mipi_pipe, enum panel_type p_type) mdfld_dsi_output_init(dev, mipi_pipe, NULL, p_cmd_funcs, NULL); break; case TPO_VID: - /*tpo_vid_init(dev, p_vid_funcs);*/ + tpo_vid_init(dev, p_vid_funcs); mdfld_dsi_output_init(dev, mipi_pipe, NULL, NULL, p_vid_funcs); break; case TMD_CMD: diff --git a/drivers/staging/mrst/drv/mdfld_output.h b/drivers/staging/mrst/drv/mdfld_output.h index 2d1b4aa..ada5bb8 100644 --- a/drivers/staging/mrst/drv/mdfld_output.h +++ b/drivers/staging/mrst/drv/mdfld_output.h @@ -62,6 +62,8 @@ void mdfld_output_init(struct drm_device* dev); void init_panel(struct drm_device* dev, int mipi_pipe, enum panel_type p_type); enum panel_type get_panel_type(struct drm_device *dev, int pipe); +int is_panel_vid_or_cmd(struct drm_device *dev); + #endif -- 1.7.1 _______________________________________________ MeeGo-kernel mailing list [email protected] http://lists.meego.com/listinfo/meego-kernel
