Skip to content

Commit

Permalink
Merge branch 'for-3.1-rc1' of git://gitorious.org/linux-omap-dss2/linux
Browse files Browse the repository at this point in the history
* '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
  ...
  • Loading branch information
Linus Torvalds committed Aug 1, 2011
2 parents e10b87d + df5d3ed commit 965e32b
Show file tree
Hide file tree
Showing 23 changed files with 1,639 additions and 1,355 deletions.
26 changes: 3 additions & 23 deletions arch/arm/mach-omap2/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <video/omapdss.h>
#include <plat/omap_hwmod.h>
#include <plat/omap_device.h>
#include <plat/omap-pm.h>

static struct platform_device omap_display_device = {
.name = "omapdss",
Expand All @@ -42,20 +43,6 @@ static struct omap_device_pm_latency omap_dss_latency[] = {
},
};

/* oh_core is used for getting opt-clocks */
static struct omap_hwmod *oh_core;

static bool opt_clock_available(const char *clk_role)
{
int i;

for (i = 0; i < oh_core->opt_clks_cnt; i++) {
if (!strcmp(oh_core->opt_clks[i].role, clk_role))
return true;
}
return false;
}

struct omap_dss_hwmod_data {
const char *oh_name;
const char *dev_name;
Expand Down Expand Up @@ -109,16 +96,9 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
oh_count = ARRAY_SIZE(omap4_dss_hwmod_data);
}

/* opt_clks are always associated with dss hwmod */
oh_core = omap_hwmod_lookup("dss_core");
if (!oh_core) {
pr_err("Could not look up dss_core.\n");
return -ENODEV;
}

pdata.board_data = board_data;
pdata.board_data->get_last_off_on_transaction_id = NULL;
pdata.opt_clock_available = opt_clock_available;
pdata.board_data->get_context_loss_count =
omap_pm_get_dev_context_loss_count;

for (i = 0; i < oh_count; i++) {
oh = omap_hwmod_lookup(curr_dss_hwmod[i].oh_name);
Expand Down
55 changes: 22 additions & 33 deletions drivers/video/omap2/displays/panel-taal.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,14 +504,18 @@ static int taal_exit_ulps(struct omap_dss_device *dssdev)
return 0;

r = omapdss_dsi_display_enable(dssdev);
if (r)
goto err;
if (r) {
dev_err(&dssdev->dev, "failed to enable DSI\n");
goto err1;
}

omapdss_dsi_vc_enable_hs(dssdev, td->channel, true);

r = _taal_enable_te(dssdev, true);
if (r)
goto err;
if (r) {
dev_err(&dssdev->dev, "failed to re-enable TE");
goto err2;
}

enable_irq(gpio_to_irq(panel_data->ext_te_gpio));

Expand All @@ -521,13 +525,15 @@ static int taal_exit_ulps(struct omap_dss_device *dssdev)

return 0;

err:
dev_err(&dssdev->dev, "exit ULPS failed");
r = taal_panel_reset(dssdev);

enable_irq(gpio_to_irq(panel_data->ext_te_gpio));
td->ulps_enabled = false;
err2:
dev_err(&dssdev->dev, "failed to exit ULPS");

r = taal_panel_reset(dssdev);
if (!r) {
enable_irq(gpio_to_irq(panel_data->ext_te_gpio));
td->ulps_enabled = false;
}
err1:
taal_queue_ulps_work(dssdev);

return r;
Expand Down Expand Up @@ -1241,11 +1247,8 @@ static void taal_power_off(struct omap_dss_device *dssdev)
int r;

r = taal_dcs_write_0(td, DCS_DISPLAY_OFF);
if (!r) {
if (!r)
r = taal_sleep_in(td);
/* HACK: wait a bit so that the message goes through */
msleep(10);
}

if (r) {
dev_err(&dssdev->dev,
Expand Down Expand Up @@ -1317,8 +1320,11 @@ static void taal_disable(struct omap_dss_device *dssdev)
dsi_bus_lock(dssdev);

if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
taal_wake_up(dssdev);
taal_power_off(dssdev);
int r;

r = taal_wake_up(dssdev);
if (!r)
taal_power_off(dssdev);
}

dsi_bus_unlock(dssdev);
Expand Down Expand Up @@ -1897,20 +1903,6 @@ static void taal_esd_work(struct work_struct *work)
mutex_unlock(&td->lock);
}

static int taal_set_update_mode(struct omap_dss_device *dssdev,
enum omap_dss_update_mode mode)
{
if (mode != OMAP_DSS_UPDATE_MANUAL)
return -EINVAL;
return 0;
}

static enum omap_dss_update_mode taal_get_update_mode(
struct omap_dss_device *dssdev)
{
return OMAP_DSS_UPDATE_MANUAL;
}

static struct omap_dss_driver taal_driver = {
.probe = taal_probe,
.remove = __exit_p(taal_remove),
Expand All @@ -1920,9 +1912,6 @@ static struct omap_dss_driver taal_driver = {
.suspend = taal_suspend,
.resume = taal_resume,

.set_update_mode = taal_set_update_mode,
.get_update_mode = taal_get_update_mode,

.update = taal_update,
.sync = taal_sync,

Expand Down
12 changes: 0 additions & 12 deletions drivers/video/omap2/dss/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,6 @@ config OMAP2_DSS_MIN_FCK_PER_PCK
Max FCK is 173MHz, so this doesn't work if your PCK
is very high.

config OMAP2_DSS_SLEEP_BEFORE_RESET
bool "Sleep 50ms before DSS reset"
default y
help
For some unknown reason we may get SYNC_LOST errors from the display
subsystem at initialization time if we don't sleep before resetting
the DSS. See the source (dss.c) for more comments.

However, 50ms is quite long time to sleep, and with some
configurations the SYNC_LOST may never happen, so the sleep can
be disabled here.

config OMAP2_DSS_SLEEP_AFTER_VENC_RESET
bool "Sleep 20ms after VENC reset"
default y
Expand Down
21 changes: 8 additions & 13 deletions drivers/video/omap2/dss/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,21 +183,18 @@ static int omap_dss_probe(struct platform_device *pdev)
goto err_dss;
}

/* keep clocks enabled to prevent context saves/restores during init */
dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
r = dispc_init_platform_driver();
if (r) {
DSSERR("Failed to initialize dispc platform driver\n");
goto err_dispc;
}

r = rfbi_init_platform_driver();
if (r) {
DSSERR("Failed to initialize rfbi platform driver\n");
goto err_rfbi;
}

r = dispc_init_platform_driver();
if (r) {
DSSERR("Failed to initialize dispc platform driver\n");
goto err_dispc;
}

r = venc_init_platform_driver();
if (r) {
DSSERR("Failed to initialize venc platform driver\n");
Expand Down Expand Up @@ -238,8 +235,6 @@ static int omap_dss_probe(struct platform_device *pdev)
pdata->default_device = dssdev;
}

dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);

return 0;

err_register:
Expand Down Expand Up @@ -268,11 +263,11 @@ static int omap_dss_remove(struct platform_device *pdev)

dss_uninitialize_debugfs();

hdmi_uninit_platform_driver();
dsi_uninit_platform_driver();
venc_uninit_platform_driver();
dispc_uninit_platform_driver();
rfbi_uninit_platform_driver();
dsi_uninit_platform_driver();
hdmi_uninit_platform_driver();
dispc_uninit_platform_driver();
dss_uninit_platform_driver();

dss_uninit_overlays(pdev);
Expand Down
Loading

0 comments on commit 965e32b

Please sign in to comment.