]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: host: Reorder job completion
authorArto Merilainen <amerilainen@nvidia.com>
Wed, 14 May 2014 10:42:04 +0000 (13:42 +0300)
committerMandar Padmawar <mpadmawar@nvidia.com>
Tue, 20 May 2014 09:27:11 +0000 (02:27 -0700)
Job completion currently first turns off the hardware and then
checks which jobs were completed . This is vulnerable as we
cannot turn off the hardware until jobs have been completed.

This ordering was introduced to avoid race between channel release
and devfreq callbacks. At the time the ordering was selected, it
worked correctly as we were not relying on runtime pm and therefore
we did not start power down sequence at that point.

However, with runtime pm we may start powering down the device at
this point. As we no longer have the race for scaling (it does not
use .deinit()/.init() callbacks) it is safe to reorder this sequence
back to the original form.

Bug 200002762

Change-Id: Ida6022b6878d2fa7868ac3369a95240f895fb2ac
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/409598
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
drivers/video/tegra/host/nvhost_intr.c

index adba307c47d3c8a0c2c2bcbc92c00a72b17bffa3..18b714c7e482d1c7d9847a3591cf81e63062230b 100644 (file)
@@ -165,8 +165,8 @@ static void action_submit_complete(struct nvhost_waitlist *waiter)
                return;
        }
 
-       nvhost_module_idle_mult(channel->dev, nr_completed);
        nvhost_cdma_update(&channel->cdma);
+       nvhost_module_idle_mult(channel->dev, nr_completed);
 
        /*  Add nr_completed to trace */
        trace_nvhost_channel_submit_complete(channel->dev->name,