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>
Cette révision appartient à :
@@ -1060,6 +1060,9 @@ static int taal_power_on(struct omap_dss_device *dssdev)
|
||||
goto err0;
|
||||
};
|
||||
|
||||
omapdss_dsi_set_size(dssdev, dssdev->panel.timings.x_res,
|
||||
dssdev->panel.timings.y_res);
|
||||
|
||||
r = omapdss_dsi_display_enable(dssdev);
|
||||
if (r) {
|
||||
dev_err(&dssdev->dev, "failed to enable DSI\n");
|
||||
@@ -1487,6 +1490,7 @@ static int taal_get_te(struct omap_dss_device *dssdev)
|
||||
static int taal_rotate(struct omap_dss_device *dssdev, u8 rotate)
|
||||
{
|
||||
struct taal_data *td = dev_get_drvdata(&dssdev->dev);
|
||||
u16 dw, dh;
|
||||
int r;
|
||||
|
||||
dev_dbg(&dssdev->dev, "rotate %d\n", rotate);
|
||||
@@ -1508,6 +1512,16 @@ static int taal_rotate(struct omap_dss_device *dssdev, u8 rotate)
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (rotate == 0 || rotate == 2) {
|
||||
dw = dssdev->panel.timings.x_res;
|
||||
dh = dssdev->panel.timings.y_res;
|
||||
} else {
|
||||
dw = dssdev->panel.timings.y_res;
|
||||
dh = dssdev->panel.timings.x_res;
|
||||
}
|
||||
|
||||
omapdss_dsi_set_size(dssdev, dw, dh);
|
||||
|
||||
td->rotate = rotate;
|
||||
|
||||
dsi_bus_unlock(dssdev);
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur