aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-08-09 06:11:13 -0400
committerArchit Taneja <archit@ti.com>2012-08-13 06:14:40 -0400
commit55cd63acf6855cd45a183fdfca6d22450b8d1d47 (patch)
tree0fccfc9a124933a871171bfcda4d3c1c4d943983
parente352574db53a15789339cf09527604f7e23de2e4 (diff)
OMAPDSS: DSI: Update manager timings on a manual update
During a command mode update using DISPC video port, we may need to swap the connected overlay manager's width and height when 90 or 270 degree rotation is done via the panel by changing it's address mode. Call dss_mgr_set_timings() in update_screen_dispc() before starting the manager update. The new manager size is updated in the 'timings' field of DSI driver's private data via omapdss_dsi_set_size(). A panel driver is expected to call this when performing rotation. Signed-off-by: Archit Taneja <archit@ti.com>
-rw-r--r--drivers/video/omap2/dss/dsi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index da68a2f93104..36e2aa79bca6 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -4178,8 +4178,7 @@ void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel)
4178} 4178}
4179EXPORT_SYMBOL(dsi_disable_video_output); 4179EXPORT_SYMBOL(dsi_disable_video_output);
4180 4180
4181static void dsi_update_screen_dispc(struct omap_dss_device *dssdev, 4181static void dsi_update_screen_dispc(struct omap_dss_device *dssdev)
4182 u16 w, u16 h)
4183{ 4182{
4184 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); 4183 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
4185 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); 4184 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
@@ -4193,6 +4192,8 @@ static void dsi_update_screen_dispc(struct omap_dss_device *dssdev,
4193 int r; 4192 int r;
4194 const unsigned channel = dsi->update_channel; 4193 const unsigned channel = dsi->update_channel;
4195 const unsigned line_buf_size = dsi_get_line_buf_size(dsidev); 4194 const unsigned line_buf_size = dsi_get_line_buf_size(dsidev);
4195 u16 w = dsi->timings.x_res;
4196 u16 h = dsi->timings.y_res;
4196 4197
4197 DSSDBG("dsi_update_screen_dispc(%dx%d)\n", w, h); 4198 DSSDBG("dsi_update_screen_dispc(%dx%d)\n", w, h);
4198 4199
@@ -4242,6 +4243,8 @@ static void dsi_update_screen_dispc(struct omap_dss_device *dssdev,
4242 msecs_to_jiffies(250)); 4243 msecs_to_jiffies(250));
4243 BUG_ON(r == 0); 4244 BUG_ON(r == 0);
4244 4245
4246 dss_mgr_set_timings(dssdev->manager, &dsi->timings);
4247
4245 dss_mgr_start_update(dssdev->manager); 4248 dss_mgr_start_update(dssdev->manager);
4246 4249
4247 if (dsi->te_enabled) { 4250 if (dsi->te_enabled) {
@@ -4335,7 +4338,7 @@ int omap_dsi_update(struct omap_dss_device *dssdev, int channel,
4335 dsi->update_bytes = dw * dh * 4338 dsi->update_bytes = dw * dh *
4336 dsi_get_pixel_size(dssdev->panel.dsi_pix_fmt) / 8; 4339 dsi_get_pixel_size(dssdev->panel.dsi_pix_fmt) / 8;
4337#endif 4340#endif
4338 dsi_update_screen_dispc(dssdev, dw, dh); 4341 dsi_update_screen_dispc(dssdev);
4339 4342
4340 return 0; 4343 return 0;
4341} 4344}