]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
Revert "video: tegra: host: Reduce timeout on close"
authorShridhar Rasal <srasal@nvidia.com>
Mon, 9 Jun 2014 03:07:20 +0000 (20:07 -0700)
committerTerje Bergstrom <tbergstrom@nvidia.com>
Mon, 9 Jun 2014 09:07:53 +0000 (02:07 -0700)
This reverts commit a9d577adba2bb03439cd4148fae5f95498fdd69e.

Original change reduce cdma timeout from 10s to 500ms
which creates race during channel close in dynamic channel map/unmap.

Bug 1519638
Bug 1521513

Change-Id: I90b7957559776a90035a93afa39f99a4680c2946
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/420412
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
drivers/video/tegra/host/bus_client.c
drivers/video/tegra/host/nvhost_cdma.c
drivers/video/tegra/host/nvhost_cdma.h

index 08ff16a00bae54a07f31b86170630d055fc9096d..42345065bb0eaaa3579975f9c5b42074e48076b1 100644 (file)
@@ -174,7 +174,6 @@ struct nvhost_channel_userctx {
 static int nvhost_channelrelease(struct inode *inode, struct file *filp)
 {
        struct nvhost_channel_userctx *priv = filp->private_data;
-       struct nvhost_cdma *cdma = &priv->ch->cdma;
 
        mutex_lock(&channel_lock);
        if (!priv->ch || !priv->ch->dev) {
@@ -183,9 +182,6 @@ static int nvhost_channelrelease(struct inode *inode, struct file *filp)
        }
        trace_nvhost_channel_release(dev_name(&priv->ch->dev->dev));
 
-       /* reduce timeout of the remaining jobs */
-       nvhost_cdma_update_client_timeout(cdma, priv->clientid, 500);
-
        filp->private_data = NULL;
 
        nvhost_module_remove_client(priv->ch->dev, priv);
@@ -208,7 +204,6 @@ static int nvhost_channelrelease(struct inode *inode, struct file *filp)
        mutex_unlock(&channel_lock);
        nvhost_putchannel(priv->ch);
        kfree(priv);
-
        return 0;
 }
 
index ec2661995477afc021e795760e4aedbee91c4237..ad4243715e7779a5b34d830b8629c33cf7f82fdc 100644 (file)
@@ -245,31 +245,6 @@ static void update_cdma_locked(struct nvhost_cdma *cdma)
        }
 }
 
-/*
- * nvhost_cdma_update_timeout(cdma, clientid, timeout) - Update timeout of
- * the given client. The caller must not hold cdma lock
- */
-void nvhost_cdma_update_client_timeout(struct nvhost_cdma *cdma, int clientid,
-                                      int timeout)
-{
-       struct nvhost_job *job;
-
-       mutex_lock(&cdma->lock);
-
-       list_for_each_entry(job, &cdma->sync_queue, list)
-               if (job->clientid == cdma->timeout.clientid)
-                       job->timeout = timeout;
-
-       /* if the first job in the queue is from this client, restart
-        * the timer */
-       job = list_first_entry(&cdma->sync_queue, struct nvhost_job, list);
-       if (job->clientid == clientid) {
-               stop_cdma_timer_locked(cdma);
-               cdma_start_timer_locked(cdma, job);
-       }
-
-       mutex_unlock(&cdma->lock);
-}
 
 static void nvhost_cdma_finalize_job_incrs(struct nvhost_syncpt *syncpt,
                                        struct nvhost_job_syncpt *sp)
index e35c7108ba297ae2076ff4acac77114a614c7133..49dc594f1ee5923d728bf29ec70c39a75748ab59 100644 (file)
@@ -114,6 +114,4 @@ unsigned int nvhost_cdma_wait_locked(struct nvhost_cdma *cdma,
                enum cdma_event event);
 void nvhost_cdma_update_sync_queue(struct nvhost_cdma *cdma,
                struct nvhost_syncpt *syncpt, struct platform_device *dev);
-void nvhost_cdma_update_client_timeout(struct nvhost_cdma *cdma, int clientid,
-                                      int timeout);
 #endif