diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-01 06:13:05 -1000 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-01 06:13:05 -1000 |
commit | 965e32b18d6b6bbcb79f4a7308fc8bdb4d03e813 (patch) | |
tree | 5d558d0b194f51fb27976a5df2a03b73fb41bb4d /drivers/video/omap2/dss/sdi.c | |
parent | e10b87d2b5b4574cdf3a5a19b22ca88b91ba7151 (diff) | |
parent | df5d3ed23cf73ee0763a8963003bda9b69d9620f (diff) |
Merge branch 'for-3.1-rc1' of git://gitorious.org/linux-omap-dss2/linux
* 'for-3.1-rc1' of git://gitorious.org/linux-omap-dss2/linux: (31 commits)
OMAP: DSS2: HDMI: fix hdmi clock name
HACK: OMAP: DSS2: clk hack for OMAP2/3
OMAP: DSS2: DSS: Fix context save/restore
OMAP: DSS2: DISPC: Fix context save/restore
OMAP: DSS2: Remove ctx loss count from dss.c
OMAP: DSS2: Remove unused code from display.c
OMAP: DSS2: DISPC: remove finegrained clk enables/disables
OMAP: DSS2: Remove unused opt_clock_available
OMAP: DSS2: Use PM runtime & HWMOD support
OMAP: DSS2: Remove CONFIG_OMAP2_DSS_SLEEP_BEFORE_RESET
OMAP: DSS2: Remove core_dump_clocks
OMAP: DSS2: DPI: remove unneeded SYSCK enable/disable
OMAP: DSS2: Use omap_pm_get_dev_context_loss_count to get ctx loss count
OMAP: DSS2: rewrite use of context_loss_count
OMAP: DSS2: Remove clk optimization at dss init
OMAP: DSS2: Fix init and unit sequence
OMAP: DSS2: Clean up probe for DSS & DSI
OMAP: DSS2: Handle dpll4_m4_ck in dss_get/put_clocks
OMAP: DSS2: Fix FIFO threshold and burst size for OMAP4
OMAP: DSS2: DSI: sync when disabling a display
...
Diffstat (limited to 'drivers/video/omap2/dss/sdi.c')
-rw-r--r-- | drivers/video/omap2/dss/sdi.c | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index 0bd4b0350f8..3a688c871a4 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c @@ -20,13 +20,11 @@ #define DSS_SUBSYS_NAME "SDI" #include <linux/kernel.h> -#include <linux/clk.h> #include <linux/delay.h> #include <linux/err.h> #include <linux/regulator/consumer.h> #include <video/omapdss.h> -#include <plat/cpu.h> #include "dss.h" static struct { @@ -60,14 +58,20 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) r = omap_dss_start_device(dssdev); if (r) { DSSERR("failed to start device\n"); - goto err0; + goto err_start_dev; } r = regulator_enable(sdi.vdds_sdi_reg); if (r) - goto err1; + goto err_reg_enable; - dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK); + r = dss_runtime_get(); + if (r) + goto err_get_dss; + + r = dispc_runtime_get(); + if (r) + goto err_get_dispc; sdi_basic_init(dssdev); @@ -80,7 +84,7 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) r = dss_calc_clock_div(1, t->pixel_clock * 1000, &dss_cinfo, &dispc_cinfo); if (r) - goto err2; + goto err_calc_clock_div; fck = dss_cinfo.fck; lck_div = dispc_cinfo.lck_div; @@ -101,27 +105,34 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) r = dss_set_clock_div(&dss_cinfo); if (r) - goto err2; + goto err_set_dss_clock_div; r = dispc_set_clock_div(dssdev->manager->id, &dispc_cinfo); if (r) - goto err2; + goto err_set_dispc_clock_div; dss_sdi_init(dssdev->phy.sdi.datapairs); r = dss_sdi_enable(); if (r) - goto err1; + goto err_sdi_enable; mdelay(2); dssdev->manager->enable(dssdev->manager); return 0; -err2: - dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK); + +err_sdi_enable: +err_set_dispc_clock_div: +err_set_dss_clock_div: +err_calc_clock_div: + dispc_runtime_put(); +err_get_dispc: + dss_runtime_put(); +err_get_dss: regulator_disable(sdi.vdds_sdi_reg); -err1: +err_reg_enable: omap_dss_stop_device(dssdev); -err0: +err_start_dev: return r; } EXPORT_SYMBOL(omapdss_sdi_display_enable); @@ -132,7 +143,8 @@ void omapdss_sdi_display_disable(struct omap_dss_device *dssdev) dss_sdi_disable(); - dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK); + dispc_runtime_put(); + dss_runtime_put(); regulator_disable(sdi.vdds_sdi_reg); |