Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251035
b: refs/heads/master
c: 2a89dc1
h: refs/heads/master
i:
  251033: 1f7ed41
  251031: 130bc8b
v: v3
  • Loading branch information
Tomi Valkeinen committed May 11, 2011
1 parent 31e607e commit 56668a8
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40885ab31f754426c2e9a40362e568778baa5e82
refs/heads/master: 2a89dc15331983621b772240ebef9dea2cbe5322
4 changes: 2 additions & 2 deletions trunk/drivers/video/omap2/displays/panel-taal.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ static int taal_power_on(struct omap_dss_device *dssdev)

taal_hw_reset(dssdev);

omapdss_dsi_display_disable(dssdev);
omapdss_dsi_display_disable(dssdev, true);
err0:
return r;
}
Expand All @@ -955,7 +955,7 @@ static void taal_power_off(struct omap_dss_device *dssdev)
taal_hw_reset(dssdev);
}

omapdss_dsi_display_disable(dssdev);
omapdss_dsi_display_disable(dssdev, true);

td->enabled = 0;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/video/omap2/dss/dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev)

err4:
if (dpi_use_dsi_pll(dssdev))
dsi_pll_uninit();
dsi_pll_uninit(true);
err3:
if (dpi_use_dsi_pll(dssdev))
dss_clk_disable(DSS_CLK_SYSCK);
Expand All @@ -227,7 +227,7 @@ void omapdss_dpi_display_disable(struct omap_dss_device *dssdev)

if (dpi_use_dsi_pll(dssdev)) {
dss_select_dispc_clk_source(OMAP_DSS_CLK_SRC_FCK);
dsi_pll_uninit();
dsi_pll_uninit(true);
dss_clk_disable(DSS_CLK_SYSCK);
}

Expand Down
35 changes: 24 additions & 11 deletions trunk/drivers/video/omap2/dss/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ static struct

struct dsi_clock_info current_cinfo;

bool vdds_dsi_enabled;
struct regulator *vdds_dsi_reg;

struct {
Expand Down Expand Up @@ -1445,9 +1446,12 @@ int dsi_pll_init(struct omap_dss_device *dssdev, bool enable_hsclk,
enable_clocks(1);
dsi_enable_pll_clock(1);

r = regulator_enable(dsi.vdds_dsi_reg);
if (r)
goto err0;
if (!dsi.vdds_dsi_enabled) {
r = regulator_enable(dsi.vdds_dsi_reg);
if (r)
goto err0;
dsi.vdds_dsi_enabled = true;
}

/* XXX PLL does not come out of reset without this... */
dispc_pck_free_enable(1);
Expand Down Expand Up @@ -1481,21 +1485,28 @@ int dsi_pll_init(struct omap_dss_device *dssdev, bool enable_hsclk,

return 0;
err1:
regulator_disable(dsi.vdds_dsi_reg);
if (dsi.vdds_dsi_enabled) {
regulator_disable(dsi.vdds_dsi_reg);
dsi.vdds_dsi_enabled = false;
}
err0:
enable_clocks(0);
dsi_enable_pll_clock(0);
return r;
}

void dsi_pll_uninit(void)
void dsi_pll_uninit(bool disconnect_lanes)
{
enable_clocks(0);
dsi_enable_pll_clock(0);

dsi.pll_locked = 0;
dsi_pll_power(DSI_PLL_POWER_OFF);
regulator_disable(dsi.vdds_dsi_reg);
if (disconnect_lanes) {
WARN_ON(!dsi.vdds_dsi_enabled);
regulator_disable(dsi.vdds_dsi_reg);
dsi.vdds_dsi_enabled = false;
}
DSSDBG("PLL uninit done\n");
}

Expand Down Expand Up @@ -3642,12 +3653,13 @@ static int dsi_display_init_dsi(struct omap_dss_device *dssdev)
dss_select_dispc_clk_source(OMAP_DSS_CLK_SRC_FCK);
dss_select_dsi_clk_source(OMAP_DSS_CLK_SRC_FCK);
err1:
dsi_pll_uninit();
dsi_pll_uninit(true);
err0:
return r;
}

static void dsi_display_uninit_dsi(struct omap_dss_device *dssdev)
static void dsi_display_uninit_dsi(struct omap_dss_device *dssdev,
bool disconnect_lanes)
{
if (!dsi.ulps_enabled)
dsi_enter_ulps();
Expand All @@ -3662,7 +3674,7 @@ static void dsi_display_uninit_dsi(struct omap_dss_device *dssdev)
dss_select_dispc_clk_source(OMAP_DSS_CLK_SRC_FCK);
dss_select_dsi_clk_source(OMAP_DSS_CLK_SRC_FCK);
dsi_complexio_uninit();
dsi_pll_uninit();
dsi_pll_uninit(disconnect_lanes);
}

static int dsi_core_init(void)
Expand Down Expand Up @@ -3731,7 +3743,8 @@ int omapdss_dsi_display_enable(struct omap_dss_device *dssdev)
}
EXPORT_SYMBOL(omapdss_dsi_display_enable);

void omapdss_dsi_display_disable(struct omap_dss_device *dssdev)
void omapdss_dsi_display_disable(struct omap_dss_device *dssdev,
bool disconnect_lanes)
{
DSSDBG("dsi_display_disable\n");

Expand All @@ -3741,7 +3754,7 @@ void omapdss_dsi_display_disable(struct omap_dss_device *dssdev)

dsi_display_uninit_dispc(dssdev);

dsi_display_uninit_dsi(dssdev);
dsi_display_uninit_dsi(dssdev, disconnect_lanes);

enable_clocks(0);
dsi_enable_pll_clock(0);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/video/omap2/dss/dss.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ int dsi_pll_calc_clock_div_pck(bool is_tft, unsigned long req_pck,
struct dispc_clock_info *dispc_cinfo);
int dsi_pll_init(struct omap_dss_device *dssdev, bool enable_hsclk,
bool enable_hsdiv);
void dsi_pll_uninit(void);
void dsi_pll_uninit(bool disconnect_lanes);
void dsi_get_overlay_fifo_thresholds(enum omap_plane plane,
u32 fifo_size, enum omap_burst_size *burst_size,
u32 *fifo_low, u32 *fifo_high);
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/video/omapdss.h
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,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_display_enable(struct omap_dss_device *dssdev);
void omapdss_dsi_display_disable(struct omap_dss_device *dssdev);
void omapdss_dsi_display_disable(struct omap_dss_device *dssdev,
bool disconnect_lanes);

int omapdss_dpi_display_enable(struct omap_dss_device *dssdev);
void omapdss_dpi_display_disable(struct omap_dss_device *dssdev);
Expand Down

0 comments on commit 56668a8

Please sign in to comment.