aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/displays/panel-taal.c
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-08-09 05:53:43 -0400
committerArchit Taneja <archit@ti.com>2012-08-13 06:14:39 -0400
commite352574db53a15789339cf09527604f7e23de2e4 (patch)
tree5318edcf76aa2516d8079e1ba95dd78705684e28 /drivers/video/omap2/displays/panel-taal.c
parente67458a831e280d346c87d22eed87e3e8697e077 (diff)
OMAPDSS: DSI: Add function to set panel size for command mode panels
DSI command mode panels don't need to configure a full set of timings to configure DSI, they only require the width and the height of the panel in pixels. Use omapdss_dsi_set_size for command mode panels, omapdss_dsi_set_timings is meant for video mode panels. When performing rotation via chaning the address mode of the panel, we would need to swap width and height when doing 90 or 270 rotation. Make sure that omapdss_dsi_set_size() makes the new width and height visible to DSI. Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/displays/panel-taal.c')
-rw-r--r--drivers/video/omap2/displays/panel-taal.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index 3f5acc7771da..c3bca2fb15d4 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -1060,6 +1060,9 @@ static int taal_power_on(struct omap_dss_device *dssdev)
1060 goto err0; 1060 goto err0;
1061 }; 1061 };
1062 1062
1063 omapdss_dsi_set_size(dssdev, dssdev->panel.timings.x_res,
1064 dssdev->panel.timings.y_res);
1065
1063 r = omapdss_dsi_display_enable(dssdev); 1066 r = omapdss_dsi_display_enable(dssdev);
1064 if (r) { 1067 if (r) {
1065 dev_err(&dssdev->dev, "failed to enable DSI\n"); 1068 dev_err(&dssdev->dev, "failed to enable DSI\n");
@@ -1487,6 +1490,7 @@ static int taal_get_te(struct omap_dss_device *dssdev)
1487static int taal_rotate(struct omap_dss_device *dssdev, u8 rotate) 1490static int taal_rotate(struct omap_dss_device *dssdev, u8 rotate)
1488{ 1491{
1489 struct taal_data *td = dev_get_drvdata(&dssdev->dev); 1492 struct taal_data *td = dev_get_drvdata(&dssdev->dev);
1493 u16 dw, dh;
1490 int r; 1494 int r;
1491 1495
1492 dev_dbg(&dssdev->dev, "rotate %d\n", rotate); 1496 dev_dbg(&dssdev->dev, "rotate %d\n", rotate);
@@ -1508,6 +1512,16 @@ static int taal_rotate(struct omap_dss_device *dssdev, u8 rotate)
1508 goto err; 1512 goto err;
1509 } 1513 }
1510 1514
1515 if (rotate == 0 || rotate == 2) {
1516 dw = dssdev->panel.timings.x_res;
1517 dh = dssdev->panel.timings.y_res;
1518 } else {
1519 dw = dssdev->panel.timings.y_res;
1520 dh = dssdev->panel.timings.x_res;
1521 }
1522
1523 omapdss_dsi_set_size(dssdev, dw, dh);
1524
1511 td->rotate = rotate; 1525 td->rotate = rotate;
1512 1526
1513 dsi_bus_unlock(dssdev); 1527 dsi_bus_unlock(dssdev);