diff options
Diffstat (limited to 'drivers/media/video/tegra/nvavp/nvavp_dev.c')
-rw-r--r-- | drivers/media/video/tegra/nvavp/nvavp_dev.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/drivers/media/video/tegra/nvavp/nvavp_dev.c b/drivers/media/video/tegra/nvavp/nvavp_dev.c index cfe033249809..e0a3d897bcca 100644 --- a/drivers/media/video/tegra/nvavp/nvavp_dev.c +++ b/drivers/media/video/tegra/nvavp/nvavp_dev.c @@ -42,10 +42,6 @@ #include <mach/legacy_irq.h> #include <linux/nvmap.h> -#include "../../../../video/tegra/host/host1x/host1x_syncpt.h" -#include "../../../../video/tegra/host/dev.h" -#include "../../../../video/tegra/host/nvhost_acm.h" - #if defined(CONFIG_TEGRA_AVP_KERNEL_ON_MMU) #include "../avp/headavp.h" #endif @@ -135,7 +131,6 @@ struct nvavp_info { struct nvavp_channel channel_info[NVAVP_NUM_CHANNELS]; - struct nvhost_syncpt *nvhost_syncpt; u32 syncpt_id; u32 syncpt_value; @@ -243,7 +238,7 @@ static struct clk *nvavp_clk_get(struct nvavp_info *nvavp, int id) static void nvavp_clks_enable(struct nvavp_info *nvavp) { if (nvavp->clk_enabled++ == 0) { - nvhost_module_busy(nvhost_get_host(nvavp->nvhost_dev)->dev); + nvhost_module_busy_ext(nvhost_get_parent(nvavp->nvhost_dev)); clk_enable(nvavp->bsev_clk); clk_enable(nvavp->vde_clk); clk_set_rate(nvavp->emc_clk, nvavp->emc_clk_rate); @@ -262,7 +257,7 @@ static void nvavp_clks_disable(struct nvavp_info *nvavp) clk_disable(nvavp->vde_clk); clk_set_rate(nvavp->emc_clk, 0); clk_set_rate(nvavp->sclk, 0); - nvhost_module_idle(nvhost_get_host(nvavp->nvhost_dev)->dev); + nvhost_module_idle_ext(nvhost_get_parent(nvavp->nvhost_dev)); dev_dbg(&nvavp->nvhost_dev->dev, "%s: resetting emc_clk " "and sclk\n", __func__); } @@ -518,9 +513,8 @@ static int nvavp_pushbuffer_init(struct nvavp_info *nvavp) nvavp_set_channel_control_area(nvavp, channel_id); if (IS_VIDEO_CHANNEL_ID(channel_id)) { nvavp->syncpt_id = NVSYNCPT_AVP_0; - nvavp->syncpt_value = nvhost_syncpt_read( - nvavp->nvhost_syncpt, - nvavp->syncpt_id); + nvavp->syncpt_value = nvhost_syncpt_read_ext( + nvavp->nvhost_dev, nvavp->syncpt_id); } } @@ -1412,7 +1406,6 @@ static int tegra_nvavp_probe(struct nvhost_device *ndev, return -EINVAL; } - nvavp = kzalloc(sizeof(struct nvavp_info), GFP_KERNEL); if (!nvavp) { dev_err(&ndev->dev, "cannot allocate avp_info\n"); @@ -1421,13 +1414,6 @@ static int tegra_nvavp_probe(struct nvhost_device *ndev, memset(nvavp, 0, sizeof(*nvavp)); - nvavp->nvhost_syncpt = &nvhost_get_host(ndev)->syncpt; - if (!nvavp->nvhost_syncpt) { - dev_err(&ndev->dev, "cannot get syncpt handle\n"); - ret = -ENOENT; - goto err_get_syncpt; - } - nvavp->nvmap = nvmap_create_client(nvmap_dev, "nvavp_drv"); if (IS_ERR_OR_NULL(nvavp->nvmap)) { dev_err(&ndev->dev, "cannot create nvmap client\n"); |