Files
linux-nvgpu/drivers/gpu/nvgpu/os/linux
Debarshi Dutta dd70aa47db gpu: nvgpu: fix gk20a_busy_noresume and gk20a_idle_nosuspend
gk20a_idle can still race with gk20a_busy_noresume as the following
pm_runtime's functions can run concurrently. i.e. pm_runtime_suspend and
pm_runtime_get_noresume. pm_runtime_get_noresume simply increments the
refcount without first acquiring the pm_runtime's power_lock. This can
be resolved by the use of pm_runtime_get_if_in_use which acquires a
the power lock of PM runtime. This prevents a potential use of register
after power_off in the l2_ops ioctl path.

We still call pm_runtime_get_noresume even if pm_runtime_get_if_in_use
returns <= 0. This helps in the following ways.

1) The signature of the function gk20a_busy_noresume remains same w.r.t
QNX code

2) Any calls to gk20a_busy_noresume() in the driver is followed by a
check to g->power_on. When pm_runtime_get_if_in_use() returns <=0, 
g->power_on is false and would immediately call gk20a_suspend_noidle()
thus keeping the original 'intent' of the gk20a_busy_noresume intact.

Bug 200507468

Change-Id: Id46bf2124047bb0e9a299fda57441e425195468f
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2180787
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-11-21 09:24:11 -08:00
..
2019-08-15 00:57:45 -07:00
2019-10-14 08:32:07 -07:00
2018-06-27 07:30:06 -07:00
2018-06-27 07:30:06 -07:00
2018-07-05 21:48:44 -07:00
2019-10-28 15:55:10 -07:00
2019-10-25 10:10:30 -07:00
2019-09-12 11:54:17 -07:00
2019-08-30 01:24:52 -07:00