diff options
author | Mayuresh Kulkarni <mkulkarni@nvidia.com> | 2012-02-24 15:46:51 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-02-28 19:16:06 -0800 |
commit | e3ca4aa394e90579fc34fff8565c05640a7534e5 (patch) | |
tree | b615c8661fb0311ca48453023b11ab2e595328df /drivers/video/tegra/host/host1x/host1x_syncpt.c | |
parent | 90b79e5712300baab889772a5af348559ac95836 (diff) |
video: tegra: host: Merge tegra_grhost and host1x devices
- tegra_grhost is a platform device that represents host1x
- nvhost has device host1x which represents the same hardware
- merge these two device structs
- as the new struct is a nvhost_device, platform_driver
is also converted into a nvhost_driver
- register nvhost device before other graphics devices.
this ensures that nvhost_probe() is called as soon as
nvhost_driver is registered with the core.
- this also ensures that nvmap is probed first, followed
by nvhost, followed by tegra-dc and nvavp (if they
are enabled).
Change-Id: Ic420a6516a9cb20d6f481692a4db10fa6053dd90
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: http://git-master/r/82631
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/host/host1x/host1x_syncpt.c')
-rw-r--r-- | drivers/video/tegra/host/host1x/host1x_syncpt.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/video/tegra/host/host1x/host1x_syncpt.c b/drivers/video/tegra/host/host1x/host1x_syncpt.c index d2fe006ec85a..1cb0db5b428c 100644 --- a/drivers/video/tegra/host/host1x/host1x_syncpt.c +++ b/drivers/video/tegra/host/host1x/host1x_syncpt.c @@ -73,10 +73,11 @@ static u32 t20_syncpt_update_min(struct nvhost_syncpt *sp, u32 id) } while ((u32)atomic_cmpxchg(&sp->min_val[id], old, live) != old); if (!nvhost_syncpt_check_max(sp, id, live)) - dev_err(&syncpt_to_dev(sp)->pdev->dev, + dev_err(&syncpt_to_dev(sp)->dev->dev, "%s failed: id=%u\n", __func__, id); + return live; } @@ -89,7 +90,7 @@ static void t20_syncpt_cpu_incr(struct nvhost_syncpt *sp, u32 id) struct nvhost_master *dev = syncpt_to_dev(sp); BUG_ON(!nvhost_module_powered(dev->dev)); if (!client_managed(id) && nvhost_syncpt_min_eq_max(sp, id)) { - dev_err(&syncpt_to_dev(sp)->pdev->dev, + dev_err(&syncpt_to_dev(sp)->dev->dev, "Trying to increment syncpoint id %d beyond max\n", id); nvhost_debug_dump(syncpt_to_dev(sp)); @@ -146,7 +147,7 @@ static int t20_syncpt_wait_check(struct nvhost_syncpt *sp, * syncpt with a matching threshold value of 0, so * is guaranteed to be popped by the host HW. */ - dev_dbg(&syncpt_to_dev(sp)->pdev->dev, + dev_dbg(&syncpt_to_dev(sp)->dev->dev, "drop WAIT id %d (%s) thresh 0x%x, syncpt 0x%x\n", wait->syncpt_id, syncpt_op(sp).name(sp, wait->syncpt_id), @@ -200,7 +201,7 @@ static void t20_syncpt_debug(struct nvhost_syncpt *sp) u32 min = nvhost_syncpt_update_min(sp, i); if (!max && !min) continue; - dev_info(&syncpt_to_dev(sp)->pdev->dev, + dev_info(&syncpt_to_dev(sp)->dev->dev, "id %d (%s) min %d max %d\n", i, syncpt_op(sp).name(sp, i), min, max); @@ -212,7 +213,7 @@ static void t20_syncpt_debug(struct nvhost_syncpt *sp) t20_syncpt_read_wait_base(sp, i); base_val = sp->base_val[i]; if (base_val) - dev_info(&syncpt_to_dev(sp)->pdev->dev, + dev_info(&syncpt_to_dev(sp)->dev->dev, "waitbase id %d val %d\n", i, base_val); |