diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2011-10-24 15:08:43 +0300 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:49:52 -0800 |
commit | f52488034b6e1c1dd7a110dca1d9b89a9fbb6cd8 (patch) | |
tree | 1048dcc333855a5ac4bf669e4421c239397340df /drivers/video/tegra/host/nvhost_syncpt.h | |
parent | 0d4fbfce61e987643280cd75ac341a58315a4f83 (diff) |
video: tegra: host: Add extra syncpt debug info
Add extra syncpt debug info and kernel panic when device stuck
waiting at syncpts.
Tested by inducing syncpt stuck-wait by bypassing nvhost_syncpt-
_cpu_incr.
Bug 822880
Bug 820056
Bug 818058
Bug 810463
Bug 803452
Reviewed-on: http://git-master/r/60206
(cherry picked from commit e73caae974f43ac5bf30589fc3cbc1fa66df926e)
Conflicts:
drivers/video/tegra/host/nvhost_syncpt.h
Change-Id: I648d92931cd26fddface2be557bffe8759c22753
Reviewed-on: http://git-master/r/62357
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Rebase-Id: R62d49b050f565e0a581530bf2342eb65931da9a8
Diffstat (limited to 'drivers/video/tegra/host/nvhost_syncpt.h')
-rw-r--r-- | drivers/video/tegra/host/nvhost_syncpt.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/video/tegra/host/nvhost_syncpt.h b/drivers/video/tegra/host/nvhost_syncpt.h index d3191ba10bd7..2e9f0bbd04e3 100644 --- a/drivers/video/tegra/host/nvhost_syncpt.h +++ b/drivers/video/tegra/host/nvhost_syncpt.h @@ -50,15 +50,6 @@ int nvhost_syncpt_init(struct nvhost_syncpt *); #define syncpt_to_dev(sp) container_of(sp, struct nvhost_master, syncpt) #define syncpt_op(sp) (syncpt_to_dev(sp)->op.syncpt) #define SYNCPT_CHECK_PERIOD (2*HZ) -static inline bool nvhost_syncpt_check_max(struct nvhost_syncpt *sp, u32 id, u32 real) -{ - u32 max; - if (client_managed(id)) - return true; - smp_rmb(); - max = (u32)atomic_read(&sp->max_val[id]); - return ((s32)(max - real) >= 0); -} /** @@ -93,6 +84,16 @@ static inline u32 nvhost_syncpt_read_min(struct nvhost_syncpt *sp, u32 id) return (u32)atomic_read(&sp->min_val[id]); } +static inline bool nvhost_syncpt_check_max(struct nvhost_syncpt *sp, + u32 id, u32 real) +{ + u32 max; + if (client_managed(id)) + return true; + max = nvhost_syncpt_read_max(sp, id); + return (s32)(max - real) >= 0; +} + /** * Returns true if syncpoint has reached threshold */ |