]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
OMAPDSS: DSI: Update manager timings on a manual update
authorArchit Taneja <archit@ti.com>
Thu, 9 Aug 2012 10:11:13 +0000 (15:41 +0530)
committerArchit Taneja <archit@ti.com>
Mon, 13 Aug 2012 10:14:40 +0000 (15:44 +0530)
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>
drivers/video/omap2/dss/dsi.c

index da68a2f93104e2cd86266b47c2c9ec6eba32b845..36e2aa79bca6ed5481f646f04f187f78f4e73992 100644 (file)
@@ -4178,8 +4178,7 @@ void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel)
 }
 EXPORT_SYMBOL(dsi_disable_video_output);
 
-static void dsi_update_screen_dispc(struct omap_dss_device *dssdev,
-               u16 w, u16 h)
+static void dsi_update_screen_dispc(struct omap_dss_device *dssdev)
 {
        struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
        struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
@@ -4193,6 +4192,8 @@ static void dsi_update_screen_dispc(struct omap_dss_device *dssdev,
        int r;
        const unsigned channel = dsi->update_channel;
        const unsigned line_buf_size = dsi_get_line_buf_size(dsidev);
+       u16 w = dsi->timings.x_res;
+       u16 h = dsi->timings.y_res;
 
        DSSDBG("dsi_update_screen_dispc(%dx%d)\n", w, h);
 
@@ -4242,6 +4243,8 @@ static void dsi_update_screen_dispc(struct omap_dss_device *dssdev,
                msecs_to_jiffies(250));
        BUG_ON(r == 0);
 
+       dss_mgr_set_timings(dssdev->manager, &dsi->timings);
+
        dss_mgr_start_update(dssdev->manager);
 
        if (dsi->te_enabled) {
@@ -4335,7 +4338,7 @@ int omap_dsi_update(struct omap_dss_device *dssdev, int channel,
        dsi->update_bytes = dw * dh *
                dsi_get_pixel_size(dssdev->panel.dsi_pix_fmt) / 8;
 #endif
-       dsi_update_screen_dispc(dssdev, dw, dh);
+       dsi_update_screen_dispc(dssdev);
 
        return 0;
 }