summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2012-03-26 14:07:41 +0300
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-03-30 09:19:07 -0700
commit99e3bd5e5573cea2491cb39bb58e19e26eb854b8 (patch)
tree8d81b9695cde6027d32558e6deea2fbffabc68f9
parentfbf900574906f9f721b40381ae6fae9e65517161 (diff)
video: tegra: host: Remove pre-check in syncpt wait
Remove the check and debug dump for cases where we compare against an old syncpt value. Also removes an extra check that is already done by wait_event_interruptible_timeout(); Bug 941327 Change-Id: Icbaf70b04a8bd070c3fdd3467b981de11219d2b9 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/92283 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
-rw-r--r--drivers/video/tegra/host/nvhost_syncpt.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/drivers/video/tegra/host/nvhost_syncpt.c b/drivers/video/tegra/host/nvhost_syncpt.c
index c41ecd99d909..eb5176ea1bf5 100644
--- a/drivers/video/tegra/host/nvhost_syncpt.c
+++ b/drivers/video/tegra/host/nvhost_syncpt.c
@@ -128,20 +128,11 @@ int nvhost_syncpt_wait_timeout(struct nvhost_syncpt *sp, u32 id,
void *ref;
void *waiter;
int err = 0, check_count = 0, low_timeout = 0;
+ u32 val;
if (value)
*value = 0;
- BUG_ON(!syncpt_op(sp).update_min);
- if (!nvhost_syncpt_check_max(sp, id, thresh)) {
- dev_warn(&syncpt_to_dev(sp)->dev->dev,
- "wait %d (%s) for (%d) wouldn't be met (max %d)\n",
- id, syncpt_op(sp).name(sp, id), thresh,
- nvhost_syncpt_read_max(sp, id));
- nvhost_debug_dump(syncpt_to_dev(sp));
- return -EINVAL;
- }
-
/* first check cache */
if (nvhost_syncpt_is_expired(sp, id, thresh)) {
if (value)
@@ -152,14 +143,12 @@ int nvhost_syncpt_wait_timeout(struct nvhost_syncpt *sp, u32 id,
/* keep host alive */
nvhost_module_busy(syncpt_to_dev(sp)->dev);
- if (client_managed(id) || !nvhost_syncpt_min_eq_max(sp, id)) {
- /* try to read from register */
- u32 val = syncpt_op(sp).update_min(sp, id);
- if ((s32)(val - thresh) >= 0) {
- if (value)
- *value = val;
- goto done;
- }
+ /* try to read from register */
+ val = syncpt_op(sp).update_min(sp, id);
+ if (nvhost_syncpt_is_expired(sp, id, thresh)) {
+ if (value)
+ *value = val;
+ goto done;
}
if (!timeout) {
@@ -192,7 +181,7 @@ int nvhost_syncpt_wait_timeout(struct nvhost_syncpt *sp, u32 id,
int remain = wait_event_interruptible_timeout(wq,
nvhost_syncpt_is_expired(sp, id, thresh),
check);
- if (remain > 0 || nvhost_syncpt_is_expired(sp, id, thresh)) {
+ if (remain > 0) {
if (value)
*value = nvhost_syncpt_read_min(sp, id);
err = 0;