Sagar Kamble
6c3c360462
gpu: nvgpu: protect nvgpu power state access using spinlock
...
IRQs can get triggered during nvgpu power-on due to MMU fault, invalid
PRIV ring or bus access etc. Handlers for those IRQs can't access the
full state related to the IRQ unless nvgpu is fully powered on.
In order to let the IRQ handlers know about the nvgpu power-on state
gk20a.power_on_state variable has to be protected through spinlock
to avoid the deadlock due to usage of earlier power_lock mutex.
Further the IRQs need to be disabled on local CPU while updating the
power state variable hence use spin_lock_irqsave and spin_unlock_-
irqrestore APIs for protecting the access.
JIRA NVGPU-1592
Change-Id: If5d1b5e2617ad90a68faa56ff47f62bb3f0b232b
Signed-off-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2203860
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:05:52 -06:00
Philip Elcan
4a5ee02291
gpu: nvgpu: unit: init: update to work with new init design
...
To address CCM in nvgpu_finalize_poweron(), some init APIs were updated
and broke the init unit test, so it was disabled. This addresses the
breakage and re-enables the test.
JIRA NVGPU-3980
Change-Id: I61b6595e0903373c36f949a5ec1e85718fd13f32
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2207420
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:05:52 -06:00
Philip Elcan
b21da03432
gpu: nvgpu: clk: remove unused HAL
...
The clk HAL disable_slowboot() is not set for any platform and is thus
unused, so remove it
JIRA NVGPU-3980
Change-Id: Idb61ae35e85d35e852f18d22c076a1e16e723e88
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2196421
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:05:52 -06:00
Philip Elcan
529d40103f
gpu: nvgpu: unit: init: improve branch coverage for nvgpu_put
...
This adds tests for testing some NULL pointer checks in the nvgpu_put()
code paths that weren't covered.
JIRA NVGPU-2239
Change-Id: I7b4e3d26644bab0aadff4d3bf5ecdb951e391ec8
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2184929
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2019-08-28 16:55:29 -07:00
Philip Elcan
373e7e8452
gpu: nvgpu: unit: init: add tests for poweron/poweroff
...
Add unit test cases for nvgpu_finalize_poweron() and
nvgpu_prepare_poweroff().
JIRA NVGPU-2239
Change-Id: I5735b1d04095aae41532750a6ba0f1fb186261ce
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2184928
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2019-08-28 16:55:20 -07:00
Philip Elcan
88e167ad98
gpu: nvgpu: unit: init: cleanup init test header
...
Remove include files and replace with forward declarations.
Remove 'static' modifier in header and source.
JIRA NVGPU-2239
Change-Id: Ie7b6d34be446a7c9a163179c0fc443275278489a
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2184927
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2019-08-28 16:55:10 -07:00
Philip Elcan
bb2aee6d1a
gpu: nvgpu: unit: add nvgpu.common.init unit test
...
This creates the basic test and validates all interfaces besides poweron
and poweroff.
JIRA NVGPU-3642
Change-Id: Idd36a1d7eaa8b459500ca642c742396dea677ff2
Signed-off-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2182348
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2019-08-26 16:07:58 -07:00