diff options
author | Jon Mayo <jmayo@nvidia.com> | 2011-06-14 15:20:24 -0700 |
---|---|---|
committer | Niket Sirsi <nsirsi@nvidia.com> | 2011-06-15 21:31:07 -0700 |
commit | 3930028cc38247231657963ea6827ceaa5fd22f8 (patch) | |
tree | 5781b158e6d349046e05e8216553369148815e0c | |
parent | c242bcd738fa47f833822f618eff4dbff092bde7 (diff) |
video: tegra: dc: underflow reset is for tegra2
only tegra2 needs dc underflow reset worker, disable worker if tegra2
support is disabled.
bug 836677
Change-Id: I98ba440f1d93c900fa1ce7d1bfd239e3060c437a
Reviewed-on: http://git-master/r/36597
Reviewed-by: Jonathan Mayo <jmayo@nvidia.com>
Tested-by: Jonathan Mayo <jmayo@nvidia.com>
Reviewed-by: Kevin Huang <kevinh@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
-rw-r--r-- | drivers/video/tegra/dc/dc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c index b2acab190569..8d10d4cc0a69 100644 --- a/drivers/video/tegra/dc/dc.c +++ b/drivers/video/tegra/dc/dc.c @@ -1289,8 +1289,10 @@ static irqreturn_t tegra_dc_irq(int irq, void *ptr) if (dc->underflow_mask & (WIN_A_UF_INT <<i)) { dc->windows[i].underflows++; +#ifdef CONFIG_ARCH_TEGRA_2x_SOC if (dc->windows[i].underflows > 4) schedule_work(&dc->reset_work); +#endif } else { dc->windows[i].underflows = 0; } @@ -1526,6 +1528,7 @@ static bool _tegra_dc_controller_enable(struct tegra_dc *dc) return true; } +#ifdef CONFIG_ARCH_TEGRA_2x_SOC static bool _tegra_dc_controller_reset_enable(struct tegra_dc *dc) { if (dc->out->enable) @@ -1578,6 +1581,7 @@ static bool _tegra_dc_controller_reset_enable(struct tegra_dc *dc) return true; } +#endif static bool _tegra_dc_enable(struct tegra_dc *dc) { @@ -1648,6 +1652,7 @@ void tegra_dc_disable(struct tegra_dc *dc) mutex_unlock(&dc->lock); } +#ifdef CONFIG_ARCH_TEGRA_2x_SOC static void tegra_dc_reset_worker(struct work_struct *work) { struct tegra_dc *dc = @@ -1689,6 +1694,7 @@ unlock: mutex_unlock(&dc->lock); mutex_unlock(&shared_lock); } +#endif static ssize_t switch_modeset_print_mode(struct switch_dev *sdev, char *buf) { @@ -1791,7 +1797,9 @@ static int tegra_dc_probe(struct nvhost_device *ndev) mutex_init(&dc->lock); init_completion(&dc->vblank_complete); init_waitqueue_head(&dc->wq); +#ifdef CONFIG_ARCH_TEGRA_2x_SOC INIT_WORK(&dc->reset_work, tegra_dc_reset_worker); +#endif INIT_WORK(&dc->vblank_work, tegra_dc_vblank); dc->n_windows = DC_N_WINDOWS; |