]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
gpu: nvgpu: Power on platform deps for wfi
authorArto Merilainen <amerilainen@nvidia.com>
Tue, 15 Apr 2014 07:58:59 +0000 (10:58 +0300)
committerSeema Khowala <seemaj@nvidia.com>
Wed, 23 Apr 2014 21:05:03 +0000 (14:05 -0700)
Currently gk20a_channel_idle() drops pm_runtime references to gk20a
and then drops platform dependencies. As we usually delay powering down
gk20a, we may end up to case where the platform dependencies are
turned off at the moment we start powering down gk20a. Power off
sequence may use platform dependencies for informing completion of
the last work, wait-for-idle, and therefore we may simply drop the
information about job completion.

This patch adds missing calls to power up platform dependencies for
the time we submit the last work.

Bug 1484824

Change-Id: I058febc717a1cb1cf96964ce20fb807bc876be6c
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/396286
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Tested-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
drivers/gpu/nvgpu/gk20a/channel_gk20a.c

index 8f850abac88698933969c71489d5c2ae5e06c700..b4c1fff2415b40a60011b28f964b3467011c7633 100644 (file)
@@ -1850,6 +1850,7 @@ int gk20a_channel_suspend(struct gk20a *g)
        for (chid = 0; chid < f->num_channels; chid++) {
                struct channel_gk20a *c = &f->channel[chid];
                if (c->in_use && c->obj_class != KEPLER_C) {
+                       gk20a_platform_channel_busy(g->dev);
                        err = gk20a_channel_submit_wfi(c);
                        if (err) {
                                gk20a_err(d, "cannot idle channel %d\n",
@@ -1859,6 +1860,7 @@ int gk20a_channel_suspend(struct gk20a *g)
 
                        c->sync->wait_cpu(c->sync, &c->last_submit_fence,
                                          500000);
+                       gk20a_platform_channel_idle(g->dev);
                        break;
                }
        }