aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/omap2/displays/panel-taal.c6
-rw-r--r--drivers/video/omap2/dss/apply.c6
-rw-r--r--drivers/video/omap2/dss/dsi.c73
3 files changed, 49 insertions, 36 deletions
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index dd64bd13f4f8..00c5c615585f 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -1182,6 +1182,10 @@ static int taal_power_on(struct omap_dss_device *dssdev)
1182 if (r) 1182 if (r)
1183 goto err; 1183 goto err;
1184 1184
1185 r = dsi_enable_video_output(dssdev, td->channel);
1186 if (r)
1187 goto err;
1188
1185 td->enabled = 1; 1189 td->enabled = 1;
1186 1190
1187 if (!td->intro_printed) { 1191 if (!td->intro_printed) {
@@ -1211,6 +1215,8 @@ static void taal_power_off(struct omap_dss_device *dssdev)
1211 struct taal_data *td = dev_get_drvdata(&dssdev->dev); 1215 struct taal_data *td = dev_get_drvdata(&dssdev->dev);
1212 int r; 1216 int r;
1213 1217
1218 dsi_disable_video_output(dssdev, td->channel);
1219
1214 r = taal_dcs_write_0(td, MIPI_DCS_SET_DISPLAY_OFF); 1220 r = taal_dcs_write_0(td, MIPI_DCS_SET_DISPLAY_OFF);
1215 if (!r) 1221 if (!r)
1216 r = taal_sleep_in(td); 1222 r = taal_sleep_in(td);
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index eafa80846365..936571b7aace 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -648,7 +648,8 @@ void dss_mgr_enable(struct omap_overlay_manager *mgr)
648{ 648{
649 mutex_lock(&apply_lock); 649 mutex_lock(&apply_lock);
650 650
651 dispc_mgr_enable(mgr->id, true); 651 if (!mgr_manual_update(mgr))
652 dispc_mgr_enable(mgr->id, true);
652 mgr->enabled = true; 653 mgr->enabled = true;
653 654
654 mutex_unlock(&apply_lock); 655 mutex_unlock(&apply_lock);
@@ -658,7 +659,8 @@ void dss_mgr_disable(struct omap_overlay_manager *mgr)
658{ 659{
659 mutex_lock(&apply_lock); 660 mutex_lock(&apply_lock);
660 661
661 dispc_mgr_enable(mgr->id, false); 662 if (!mgr_manual_update(mgr))
663 dispc_mgr_enable(mgr->id, false);
662 mgr->enabled = false; 664 mgr->enabled = false;
663 665
664 mutex_unlock(&apply_lock); 666 mutex_unlock(&apply_lock);
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 9358afa2a77e..9cb2e827c001 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -3973,65 +3973,70 @@ static void dsi_proto_timings(struct omap_dss_device *dssdev)
3973 } 3973 }
3974} 3974}
3975 3975
3976int dsi_video_mode_enable(struct omap_dss_device *dssdev, int channel) 3976int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
3977{ 3977{
3978 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); 3978 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
3979 int bpp = dsi_get_pixel_size(dssdev->panel.dsi_pix_fmt); 3979 int bpp = dsi_get_pixel_size(dssdev->panel.dsi_pix_fmt);
3980 u8 data_type; 3980 u8 data_type;
3981 u16 word_count; 3981 u16 word_count;
3982 3982
3983 switch (dssdev->panel.dsi_pix_fmt) { 3983 if (dssdev->panel.dsi_mode == OMAP_DSS_DSI_VIDEO_MODE) {
3984 case OMAP_DSS_DSI_FMT_RGB888: 3984 switch (dssdev->panel.dsi_pix_fmt) {
3985 data_type = MIPI_DSI_PACKED_PIXEL_STREAM_24; 3985 case OMAP_DSS_DSI_FMT_RGB888:
3986 break; 3986 data_type = MIPI_DSI_PACKED_PIXEL_STREAM_24;
3987 case OMAP_DSS_DSI_FMT_RGB666: 3987 break;
3988 data_type = MIPI_DSI_PIXEL_STREAM_3BYTE_18; 3988 case OMAP_DSS_DSI_FMT_RGB666:
3989 break; 3989 data_type = MIPI_DSI_PIXEL_STREAM_3BYTE_18;
3990 case OMAP_DSS_DSI_FMT_RGB666_PACKED: 3990 break;
3991 data_type = MIPI_DSI_PACKED_PIXEL_STREAM_18; 3991 case OMAP_DSS_DSI_FMT_RGB666_PACKED:
3992 break; 3992 data_type = MIPI_DSI_PACKED_PIXEL_STREAM_18;
3993 case OMAP_DSS_DSI_FMT_RGB565: 3993 break;
3994 data_type = MIPI_DSI_PACKED_PIXEL_STREAM_16; 3994 case OMAP_DSS_DSI_FMT_RGB565:
3995 break; 3995 data_type = MIPI_DSI_PACKED_PIXEL_STREAM_16;
3996 default: 3996 break;
3997 BUG(); 3997 default:
3998 }; 3998 BUG();
3999 };
3999 4000
4000 dsi_if_enable(dsidev, false); 4001 dsi_if_enable(dsidev, false);
4001 dsi_vc_enable(dsidev, channel, false); 4002 dsi_vc_enable(dsidev, channel, false);
4002 4003
4003 /* MODE, 1 = video mode */ 4004 /* MODE, 1 = video mode */
4004 REG_FLD_MOD(dsidev, DSI_VC_CTRL(channel), 1, 4, 4); 4005 REG_FLD_MOD(dsidev, DSI_VC_CTRL(channel), 1, 4, 4);
4005 4006
4006 word_count = DIV_ROUND_UP(dssdev->panel.timings.x_res * bpp, 8); 4007 word_count = DIV_ROUND_UP(dssdev->panel.timings.x_res * bpp, 8);
4007 4008
4008 dsi_vc_write_long_header(dsidev, channel, data_type, word_count, 0); 4009 dsi_vc_write_long_header(dsidev, channel, data_type,
4010 word_count, 0);
4009 4011
4010 dsi_vc_enable(dsidev, channel, true); 4012 dsi_vc_enable(dsidev, channel, true);
4011 dsi_if_enable(dsidev, true); 4013 dsi_if_enable(dsidev, true);
4014 }
4012 4015
4013 dss_mgr_enable(dssdev->manager); 4016 dss_mgr_enable(dssdev->manager);
4014 4017
4015 return 0; 4018 return 0;
4016} 4019}
4017EXPORT_SYMBOL(dsi_video_mode_enable); 4020EXPORT_SYMBOL(dsi_enable_video_output);
4018 4021
4019void dsi_video_mode_disable(struct omap_dss_device *dssdev, int channel) 4022void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel)
4020{ 4023{
4021 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); 4024 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
4022 4025
4023 dsi_if_enable(dsidev, false); 4026 if (dssdev->panel.dsi_mode == OMAP_DSS_DSI_VIDEO_MODE) {
4024 dsi_vc_enable(dsidev, channel, false); 4027 dsi_if_enable(dsidev, false);
4028 dsi_vc_enable(dsidev, channel, false);
4025 4029
4026 /* MODE, 0 = command mode */ 4030 /* MODE, 0 = command mode */
4027 REG_FLD_MOD(dsidev, DSI_VC_CTRL(channel), 0, 4, 4); 4031 REG_FLD_MOD(dsidev, DSI_VC_CTRL(channel), 0, 4, 4);
4028 4032
4029 dsi_vc_enable(dsidev, channel, true); 4033 dsi_vc_enable(dsidev, channel, true);
4030 dsi_if_enable(dsidev, true); 4034 dsi_if_enable(dsidev, true);
4035 }
4031 4036
4032 dss_mgr_disable(dssdev->manager); 4037 dss_mgr_disable(dssdev->manager);
4033} 4038}
4034EXPORT_SYMBOL(dsi_video_mode_disable); 4039EXPORT_SYMBOL(dsi_disable_video_output);
4035 4040
4036static void dsi_update_screen_dispc(struct omap_dss_device *dssdev, 4041static void dsi_update_screen_dispc(struct omap_dss_device *dssdev,
4037 u16 w, u16 h) 4042 u16 w, u16 h)