diff options
author | Mayuresh Kulkarni <mkulkarni@nvidia.com> | 2012-06-18 12:35:40 +0530 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-06-26 07:14:03 -0700 |
commit | 7bef3f71fa38cc3c39953ec479dcfdcfa725be4d (patch) | |
tree | db00c32ad7633f8ded1896d15eec8a6878b472fb /drivers/video/tegra/dc/dc.c | |
parent | 81a8d469a7e9d70d0a2cc0345ddf509038bb620a (diff) |
video: tegra: use public APIs exposed by host1x driver
Bug 961009
Change-Id: Ifdcc7bc8a40d270e70a63329f46caff541bf01e2
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: http://git-master/r/109461
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/dc.c')
-rw-r--r-- | drivers/video/tegra/dc/dc.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c index 834637db0f3a..39470e18215e 100644 --- a/drivers/video/tegra/dc/dc.c +++ b/drivers/video/tegra/dc/dc.c @@ -34,13 +34,13 @@ #include <linux/seq_file.h> #include <linux/backlight.h> #include <linux/gpio.h> +#include <linux/nvhost.h> #include <video/tegrafb.h> #include <drm/drm_fixed.h> #ifdef CONFIG_SWITCH #include <linux/switch.h> #endif - #include <mach/clk.h> #include <mach/dc.h> #include <mach/fb.h> @@ -51,8 +51,6 @@ #include "dc_reg.h" #include "dc_config.h" #include "dc_priv.h" -#include "host1x/host1x.h" -#include "host1x/host1x_syncpt.h" #include "nvsd.h" #define TEGRA_CRC_LATCHED_DELAY 34 @@ -1109,7 +1107,7 @@ u32 tegra_dc_incr_syncpt_max(struct tegra_dc *dc, int i) u32 max; mutex_lock(&dc->lock); - max = nvhost_syncpt_incr_max(&nvhost_get_host(dc->ndev)->syncpt, + max = nvhost_syncpt_incr_max_ext(dc->ndev, dc->syncpt[i].id, ((dc->enabled) ? 1 : 0)); dc->syncpt[i].max = max; mutex_unlock(&dc->lock); @@ -1123,9 +1121,7 @@ void tegra_dc_incr_syncpt_min(struct tegra_dc *dc, int i, u32 val) if ( dc->enabled ) while (dc->syncpt[i].min < val) { dc->syncpt[i].min++; - nvhost_syncpt_cpu_incr( - &nvhost_get_host(dc->ndev)->syncpt, - dc->syncpt[i].id); + nvhost_syncpt_cpu_incr_ext(dc->ndev, dc->syncpt[i].id); } mutex_unlock(&dc->lock); } @@ -2076,7 +2072,7 @@ static irqreturn_t tegra_dc_irq(int irq, void *ptr) unsigned long underflow_mask; u32 val; - if (!nvhost_module_powered(nvhost_get_host(dc->ndev)->dev)) { + if (!nvhost_module_powered_ext(nvhost_get_parent(dc->ndev))) { WARN(1, "IRQ when DC not powered!\n"); tegra_dc_io_start(dc); status = tegra_dc_readl(dc, DC_CMD_INT_STATUS); @@ -2286,8 +2282,7 @@ static int tegra_dc_init(struct tegra_dc *dc) dc->syncpt[i].id = syncpt; dc->syncpt[i].min = dc->syncpt[i].max = - nvhost_syncpt_read(&nvhost_get_host(dc->ndev)->syncpt, - syncpt); + nvhost_syncpt_read_ext(dc->ndev, syncpt); } print_mode(dc, &dc->mode, __func__); @@ -2487,9 +2482,7 @@ static void _tegra_dc_controller_disable(struct tegra_dc *dc) trace_printk("%s:syncpt flush id=%d\n", dc->ndev->name, dc->syncpt[i].id); dc->syncpt[i].min++; - nvhost_syncpt_cpu_incr( - &nvhost_get_host(dc->ndev)->syncpt, - dc->syncpt[i].id); + nvhost_syncpt_cpu_incr_ext(dc->ndev, dc->syncpt[i].id); } } trace_printk("%s:disabled\n", dc->ndev->name); |