gpu: nvgpu: check power_on before checking gp_get/put
authorDeepak Nibade <dnibade@nvidia.com>
Mon, 11 Jan 2016 10:52:26 +0000 (15:52 +0530)
committerRoopa Ranganathan <rranganathan@nvidia.com>
Tue, 12 Jan 2016 23:12:10 +0000 (15:12 -0800)
commit43bef369993b76e4d343c8d48a06315f399b576c
tree89d4459add581682099b11af9631d3a9ee9e3b61
parent4d1baeff1ace5a03ee15ec1c27081d328c21f739
gpu: nvgpu: check power_on before checking gp_get/put

gk20a_channel_update() runs in worker thread, and it is possible
that we shutdown GPU while this funtion is still running

Hence, check if GPU is on with flag g->power_on before accessing
gp_get/put

Bug 200165480

Change-Id: Ifcff7c60212923966e36f792f550524275aede22
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/931039
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Tested-by: Roopa Ranganathan <rranganathan@nvidia.com>
drivers/gpu/nvgpu/gk20a/channel_gk20a.c