aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/displays/panel-taal.c14
-rw-r--r--drivers/video/omap2/dss/dsi.c23
2 files changed, 30 insertions, 7 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);
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 4787e469131b..da68a2f93104 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -4328,7 +4328,8 @@ int omap_dsi_update(struct omap_dss_device *dssdev, int channel,
4328 dsi->framedone_callback = callback; 4328 dsi->framedone_callback = callback;
4329 dsi->framedone_data = data; 4329 dsi->framedone_data = data;
4330 4330
4331 dssdev->driver->get_resolution(dssdev, &dw, &dh); 4331 dw = dsi->timings.x_res;
4332 dh = dsi->timings.y_res;
4332 4333
4333#ifdef DEBUG 4334#ifdef DEBUG
4334 dsi->update_bytes = dw * dh * 4335 dsi->update_bytes = dw * dh *
@@ -4374,12 +4375,6 @@ static int dsi_display_init_dispc(struct omap_dss_device *dssdev)
4374 u32 irq = 0; 4375 u32 irq = 0;
4375 4376
4376 if (dssdev->panel.dsi_mode == OMAP_DSS_DSI_CMD_MODE) { 4377 if (dssdev->panel.dsi_mode == OMAP_DSS_DSI_CMD_MODE) {
4377 u16 dw, dh;
4378
4379 dssdev->driver->get_resolution(dssdev, &dw, &dh);
4380
4381 dsi->timings.x_res = dw;
4382 dsi->timings.y_res = dh;
4383 dsi->timings.hsw = 1; 4378 dsi->timings.hsw = 1;
4384 dsi->timings.hfp = 1; 4379 dsi->timings.hfp = 1;
4385 dsi->timings.hbp = 1; 4380 dsi->timings.hbp = 1;
@@ -4667,6 +4662,20 @@ void omapdss_dsi_set_timings(struct omap_dss_device *dssdev,
4667} 4662}
4668EXPORT_SYMBOL(omapdss_dsi_set_timings); 4663EXPORT_SYMBOL(omapdss_dsi_set_timings);
4669 4664
4665void omapdss_dsi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h)
4666{
4667 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
4668 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
4669
4670 mutex_lock(&dsi->lock);
4671
4672 dsi->timings.x_res = w;
4673 dsi->timings.y_res = h;
4674
4675 mutex_unlock(&dsi->lock);
4676}
4677EXPORT_SYMBOL(omapdss_dsi_set_size);
4678
4670static int __init dsi_init_display(struct omap_dss_device *dssdev) 4679static int __init dsi_init_display(struct omap_dss_device *dssdev)
4671{ 4680{
4672 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); 4681 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);