diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-08-10 15:50:51 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-09-07 19:02:05 +0200 |
commit | ee144e645a081daad5de1ccac77f0a0e98e6a67b (patch) | |
tree | 183396b4aab719b9bece60190885a3d8e5e99676 /include/video | |
parent | OMAPDSS: Add DSI fclk maximum to dss_features (diff) | |
download | linux-ee144e645a081daad5de1ccac77f0a0e98e6a67b.tar.xz linux-ee144e645a081daad5de1ccac77f0a0e98e6a67b.zip |
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 'include/video')
-rw-r--r-- | include/video/omapdss.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index a5572d5ee8d1..24a7fa196651 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -738,6 +738,8 @@ int omap_dsi_set_vc_id(struct omap_dss_device *dssdev, int channel, int vc_id); void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel); int omapdss_dsi_configure_pins(struct omap_dss_device *dssdev, const struct omap_dsi_pin_config *pin_cfg); +int omapdss_dsi_set_clocks(struct omap_dss_device *dssdev, + unsigned long ddr_clk, unsigned long lp_clk); int omapdss_dsi_display_enable(struct omap_dss_device *dssdev); void omapdss_dsi_display_disable(struct omap_dss_device *dssdev, |