aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/displays/panel-taal.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-08-10 09:50:51 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-09-07 13:02:05 -0400
commitee144e645a081daad5de1ccac77f0a0e98e6a67b (patch)
tree183396b4aab719b9bece60190885a3d8e5e99676 /drivers/video/omap2/displays/panel-taal.c
parentbc63f3044155fe90e76c9bb6dd2538b586ee02bc (diff)
OMAPDSS: DSI: calculate dsi clock
Currently the way to configure clocks related to DSI (both DSI and DISPC clocks) happens via omapdss platform data. The reason for this is that configuring the DSS clocks is a very complex problem, and it's impossible for the SW to know requirements about things like interference. However, for general cases it should be fine to calculate the dividers for clocks in the SW. The calculated clocks are probably not perfect, but should work. This patch adds support to calculate the dividers when using DSI command mode panels. The panel gives the required DDR clock rate and LP clock rate, and the DSI driver configures itself and DISPC accordingly. This patch is somewhat ugly, though. The code does its job by modifying the platform data where the clock dividers would be if the board file gave them. This is not how it's going to be in the future, but allows us to have quite simple patch and keep the backward compatibility. It also allows the developer to still give the exact dividers from the board file when there's need for that, as long as the panel driver does not override them. There are also other areas for improvement. For example, it would be better if the panel driver could ask for a DSI clock in a certain range, as, at least command mode panels, the panel can work fine with many different clock speeds. While the patch is not perfect, it allows us to remove the hardcoded clock dividers from the board file, making it easier to bring up a new panel and to use device tree from omapdss. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/displays/panel-taal.c')
-rw-r--r--drivers/video/omap2/displays/panel-taal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index 77aed0e51f9b..ddda96a52d06 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -1065,6 +1065,12 @@ static int taal_power_on(struct omap_dss_device *dssdev)
1065 omapdss_dsi_set_pixel_format(dssdev, OMAP_DSS_DSI_FMT_RGB888); 1065 omapdss_dsi_set_pixel_format(dssdev, OMAP_DSS_DSI_FMT_RGB888);
1066 omapdss_dsi_set_operation_mode(dssdev, OMAP_DSS_DSI_CMD_MODE); 1066 omapdss_dsi_set_operation_mode(dssdev, OMAP_DSS_DSI_CMD_MODE);
1067 1067
1068 r = omapdss_dsi_set_clocks(dssdev, 216000000, 10000000);
1069 if (r) {
1070 dev_err(&dssdev->dev, "failed to set HS and LP clocks\n");
1071 goto err0;
1072 }
1073
1068 r = omapdss_dsi_display_enable(dssdev); 1074 r = omapdss_dsi_display_enable(dssdev);
1069 if (r) { 1075 if (r) {
1070 dev_err(&dssdev->dev, "failed to enable DSI\n"); 1076 dev_err(&dssdev->dev, "failed to enable DSI\n");