diff options
-rw-r--r-- | drivers/video/tegra/host/bus_client.c | 1 | ||||
-rw-r--r-- | drivers/video/tegra/host/mpe/mpe.c | 2 | ||||
-rw-r--r-- | drivers/video/tegra/host/nvhost_syncpt.c | 6 | ||||
-rw-r--r-- | drivers/video/tegra/host/nvhost_syncpt.h | 1 |
4 files changed, 6 insertions, 4 deletions
diff --git a/drivers/video/tegra/host/bus_client.c b/drivers/video/tegra/host/bus_client.c index 9a32e5333d08..4aacde958954 100644 --- a/drivers/video/tegra/host/bus_client.c +++ b/drivers/video/tegra/host/bus_client.c @@ -140,6 +140,7 @@ static int nvhost_channelopen(struct inode *inode, struct file *filp) priv->priority = NVHOST_PRIORITY_MEDIUM; priv->clientid = atomic_add_return(1, &nvhost_get_host(ch->dev)->clientid); + priv->timeout = MAX_STUCK_CHECK_COUNT * SYNCPT_CHECK_PERIOD; priv->job = nvhost_job_alloc(ch, priv->hwctx, &priv->hdr, NULL, priv->priority, priv->clientid); diff --git a/drivers/video/tegra/host/mpe/mpe.c b/drivers/video/tegra/host/mpe/mpe.c index 2b0001058406..f155183613cd 100644 --- a/drivers/video/tegra/host/mpe/mpe.c +++ b/drivers/video/tegra/host/mpe/mpe.c @@ -460,6 +460,7 @@ static struct nvhost_hwctx *ctxmpe_alloc(struct nvhost_hwctx_handler *h, ctx->hwctx.valid = false; ctx->save_incrs = 3; ctx->save_thresh = 2; + ctx->save_slots = p->save_slots; ctx->restore_phys = nvmap_pin(nvmap, ctx->restore); ctx->restore_size = restore_size; ctx->restore_incrs = 1; @@ -566,6 +567,7 @@ struct nvhost_hwctx_handler *nvhost_mpe_ctxhandler_init( } p->save_phys = nvmap_pin(nvmap, p->save_buf); + p->save_slots = 1; setup_save(p, save_ptr); diff --git a/drivers/video/tegra/host/nvhost_syncpt.c b/drivers/video/tegra/host/nvhost_syncpt.c index 93068ec7a4d2..4835d22881b8 100644 --- a/drivers/video/tegra/host/nvhost_syncpt.c +++ b/drivers/video/tegra/host/nvhost_syncpt.c @@ -26,7 +26,6 @@ #include "nvhost_acm.h" #include "dev.h" -#define MAX_STUCK_CHECK_COUNT 15 #define MAX_SYNCPT_LENGTH 5 /* Name of sysfs node for min and max value */ static const char *min_name = "min"; @@ -205,20 +204,19 @@ int nvhost_syncpt_wait_timeout(struct nvhost_syncpt *sp, u32 id, } if (timeout != NVHOST_NO_TIMEOUT) timeout -= check; - if (timeout) { + if (timeout && check_count <= MAX_STUCK_CHECK_COUNT) { dev_warn(&syncpt_to_dev(sp)->dev->dev, "%s: syncpoint id %d (%s) stuck waiting %d, timeout=%d\n", current->comm, id, syncpt_op().name(sp, id), thresh, timeout); syncpt_op().debug(sp); - if (check_count > MAX_STUCK_CHECK_COUNT) { + if (check_count == MAX_STUCK_CHECK_COUNT) { if (low_timeout) { dev_warn(&syncpt_to_dev(sp)->dev->dev, "is timeout %d too low?\n", low_timeout); } nvhost_debug_dump(syncpt_to_dev(sp)); - BUG(); } check_count++; } diff --git a/drivers/video/tegra/host/nvhost_syncpt.h b/drivers/video/tegra/host/nvhost_syncpt.h index 048eeb96ac2b..7625905bfa9c 100644 --- a/drivers/video/tegra/host/nvhost_syncpt.h +++ b/drivers/video/tegra/host/nvhost_syncpt.h @@ -57,6 +57,7 @@ void nvhost_syncpt_deinit(struct nvhost_syncpt *); #define client_managed(id) (BIT(id) & sp->client_managed) #define syncpt_to_dev(sp) container_of(sp, struct nvhost_master, syncpt) #define SYNCPT_CHECK_PERIOD (2 * HZ) +#define MAX_STUCK_CHECK_COUNT 15 /** * Updates the value sent to hardware. |