mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: ELPG dump stats at shutdown
ELPG_DISALLOW command fails during gk20a shutdown. It was due to nvgpu_can_busy() which was returning 0 before without acknowledging the ELPG_DISALLOW command. Since the system is shutting down so fix this issue by setting the ACK for disallow command without waiting for actual ACK from PMU. In doing so the state machine is also maintained properly and the driver does not dump fail stats. BUG 200588696 Change-Id: I943d8e6108fa0f9c418ccb1a7f061307823f1ec6 Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2308557 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Alex Waterman
parent
9bee2fe660
commit
c060e754fc
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -118,6 +118,15 @@ int nvgpu_pmu_wait_fw_ack_status(struct gk20a *g, struct nvgpu_pmu *pmu,
|
||||
nvgpu_rmb();
|
||||
|
||||
if (nvgpu_can_busy(g) == 0) {
|
||||
/*
|
||||
* Since the system is shutting down so we don't
|
||||
* wait for the ACK from PMU.
|
||||
* Set ACK received so that state machine is maintained
|
||||
* properly and falcon stats are not dumped due to
|
||||
* PMU command failure
|
||||
*/
|
||||
|
||||
*(volatile u8 *)var = val;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -132,6 +141,7 @@ int nvgpu_pmu_wait_fw_ack_status(struct gk20a *g, struct nvgpu_pmu *pmu,
|
||||
if (*(volatile u8 *)var == val) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
} while (nvgpu_timeout_expired(&timeout) == 0);
|
||||
|
||||
return -ETIMEDOUT;
|
||||
|
||||
Reference in New Issue
Block a user