mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
gpu: nvgpu: Move device de-init call
Move the device de-init call to when the gk20a struct is being freed; the device list can live for as long as the gk20a struct does. This will be a problem later, since the current location causes the device structs to get freed and allocatoed over and over. That'll cause gross corruption in the FIFO code when the engine_info struct is replaced with pointers to the device structs. JIRA NVGPU-5421 Change-Id: If4e08ea88dbcae7acd599e3fad29f72ece63b8e0 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2361269 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: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -326,8 +326,6 @@ int nvgpu_prepare_poweroff(struct gk20a *g)
|
||||
}
|
||||
#endif
|
||||
|
||||
nvgpu_device_cleanup(g);
|
||||
|
||||
/* Disable GPCPLL */
|
||||
if (g->ops.clk.suspend_clk_support != NULL) {
|
||||
g->ops.clk.suspend_clk_support(g);
|
||||
@@ -868,6 +866,8 @@ static void gk20a_free_cb(struct nvgpu_ref *refcount)
|
||||
g->ops.ltc.ltc_remove_support(g);
|
||||
}
|
||||
|
||||
nvgpu_device_cleanup(g);
|
||||
|
||||
nvgpu_sw_quiesce_remove_support(g);
|
||||
|
||||
if (g->gfree != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user