video: early exit from update_cdma
Pranav Chaturvedi [Mon, 16 Apr 2012 03:39:44 +0000 (08:39 +0530)]
when update_cdma_locked() is invoked, CDMA is not running
implies that the queue is cleared and we can return immediately.

Bug 960487

Change-Id: I599027906dc405f4490590443d4f4d5a3202b5b0
Reviewed-on: http://git-master/r/96650
(cherry picked from commit f297b4812d15540f4b14c87178662a7ca6575ce9)
Reviewed-on: http://git-master/r/99994
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

drivers/video/tegra/host/nvhost_cdma.c

index 7ebb0c8..f1f4405 100644 (file)
@@ -156,7 +156,9 @@ static void update_cdma_locked(struct nvhost_cdma *cdma)
        struct nvhost_syncpt *sp = &dev->syncpt;
        struct nvhost_job *job, *n;
 
-       BUG_ON(!cdma->running);
+       /* If CDMA is stopped, queue is cleared and we can return */
+       if (!cdma->running)
+               return;
 
        /*
         * Walk the sync queue, reading the sync point registers as necessary,