gpu: nvgpu: gk20a: check ctx valid bit
When determining the chid for the current context, first check
the ctx valid bit.
Bug
1485555
Change-Id: I6c3096d800a6cef38b656d525437a2c4f8b45774
Signed-off-by: Mayank Kaushik <mkaushik@nvidia.com>
Reviewed-on: http://git-master/r/496140
(cherry picked from commit
20a7a9635e9f969782da6695d99bc99c4ed8fa32)
Reviewed-on: http://git-master/r/555054
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>