summaryrefslogtreecommitdiff
path: root/drivers/media/video
diff options
context:
space:
mode:
authorMayuresh Kulkarni <mkulkarni@nvidia.com>2012-06-18 12:35:40 +0530
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-06-26 07:14:03 -0700
commit7bef3f71fa38cc3c39953ec479dcfdcfa725be4d (patch)
treedb00c32ad7633f8ded1896d15eec8a6878b472fb /drivers/media/video
parent81a8d469a7e9d70d0a2cc0345ddf509038bb620a (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/media/video')
-rw-r--r--drivers/media/video/tegra/nvavp/nvavp_dev.c22
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");