]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
gpu: nvgpu: disable channel before adjusting syncpoints
authorDeepak Nibade <dnibade@nvidia.com>
Thu, 10 Sep 2015 08:50:53 +0000 (14:20 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Thu, 5 Nov 2015 07:19:18 +0000 (23:19 -0800)
As per current sequence in gk20a_channel_abort(),
we first balance the syncpoint values associated with
failing channel, and then abort it

Reverse this sequence so that we first disable the channel
and then only balance the syncpoints

Bug 200133289

Change-Id: I5a748afce437e728a5ff6c8a030a75d0f627c622
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/797071
(cherry picked from commit d797ddb230ed94ac565fc42377f6653fb94610a8)
Reviewed-on: http://git-master/r/806565
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: http://git-master/r/815929
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
drivers/gpu/nvgpu/gk20a/channel_gk20a.c

index 21c23988dd6619bb86ec9440e6bb608083dec600..7fe4be1fa9686b81d873c032b1bdf34a74cef2db 100644 (file)
@@ -384,6 +384,8 @@ void gk20a_channel_abort(struct channel_gk20a *ch)
        /* make sure new kickoffs are prevented */
        ch->has_timedout = true;
 
+       ch->g->ops.fifo.disable_channel(ch);
+
        /* ensure no fences are pending */
        mutex_lock(&ch->submit_lock);
        if (ch->sync)
@@ -401,8 +403,6 @@ void gk20a_channel_abort(struct channel_gk20a *ch)
        }
        mutex_unlock(&ch->jobs_lock);
 
-       ch->g->ops.fifo.disable_channel(ch);
-
        if (released_job_semaphore) {
                wake_up_interruptible_all(&ch->semaphore_wq);
                gk20a_channel_update(ch, 0);