]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
gpu: nvgpu: Clear channel class on open
authorTerje Bergstrom <tbergstrom@nvidia.com>
Thu, 26 Jun 2014 10:26:19 +0000 (13:26 +0300)
committerMandar Padmawar <mpadmawar@nvidia.com>
Fri, 27 Jun 2014 06:39:39 +0000 (23:39 -0700)
Channel class needs to be cleared when a channel is opened. Otherwise
previously used channel remains, and we can accidentally use KEPLER_C
methods even if KEPLER_C is not allocated.

Bug 1487928
Bug 200000669

Change-Id: I3e1ae8d5edbdd82fa569b38a89a89dedb69ee773
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/428868
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
drivers/gpu/nvgpu/gk20a/channel_gk20a.c

index cecdc667509cf01befc8ec2241cec81a8d2cc26c..dbbd04909f3f35076f9ffe22e056fecb7b337419 100644 (file)
@@ -730,6 +730,7 @@ static struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g)
        ch->timeout_ms_max = gk20a_get_gr_idle_timeout(g);
        ch->timeout_debug_dump = true;
        ch->has_timedout = false;
+       ch->obj_class = 0;
 
        /* The channel is *not* runnable at this point. It still needs to have
         * an address space bound and allocate a gpfifo and grctx. */