Files
linux-nvgpu/drivers/gpu/nvgpu/common/pmu
Deepak Bhosale 46a66efb0e gpu: nvgpu: pmu: Fix pmu_state state update
- Commit c61e21c868 fixed race codition in PMU
  state transition.
- The race condition is such that PMU response(intr callback for messages) can
  run faster than kthread posting commands to PMU and thus PMU message callback
  may skip important pmu state change.
- Commit c61e21c868 introduced a fix where PMU
  state change was only updated from callback while other places can only update
  pmu_state variable
- However, this commit introduced a regression as follows:
  - When PMU state is PMU_STATE_INIT_RECEIVED, we loop over every engine
    supported by GPU --> If state = PMU_STATE_INIT_RECEIVED, change the state
    to PMU_STATE_ELPG_BOOTING and init ELPG else If state != PMU_STATE_INIT_RECEIVED
    throw an error saying "PMU INIT not received"
  - Now, if GPU supports multiple engines, first engine will check that
    pmu_state is PMU_STATE_INIT_RECEIVED and change it to PMU_STATE_ELPG_BOOTING
    However, from second engine onwards, since state is already changed to
    PMU_STATE_ELPG_BOOTING, all engines except first engine start throwing
    error "PMU INIT not received"
- This patch fixes the issue by changing pmu state from
  PMU_STATE_INIT_RECEIVED to PMU_STATE_ELPG_BOOTING only once.

Bug 200372838
JIRA EVLR-2164

Change-Id: Ic8c954d14acb1d6ec3adcbc4bcf4d4745542d9f0
Signed-off-by: Deepak Bhosale <dbhosale@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1769814
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-by: Deepak Goyal <dgoyal@nvidia.com>
Reviewed-by: Aparna Das <aparnad@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2018-07-06 13:26:10 -07:00
..
2018-05-03 23:56:59 -07:00
2018-05-07 04:41:22 -07:00