mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: Free enabled flags on driver unload
Make sure the enabled flags are freed before the driver unloads. Bug 200369180 Change-Id: Ibac9ee61ca99bdfda03d76e393c7cd6cb6cc299a Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1632752 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
98210aad81
commit
a30f307554
@@ -40,6 +40,14 @@ int nvgpu_init_enabled_flags(struct gk20a *g)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Call this on driver shutdown!
|
||||||
|
*/
|
||||||
|
void nvgpu_free_enabled_flags(struct gk20a *g)
|
||||||
|
{
|
||||||
|
nvgpu_kfree(g, g->enabled_flags);
|
||||||
|
}
|
||||||
|
|
||||||
bool nvgpu_is_enabled(struct gk20a *g, int flag)
|
bool nvgpu_is_enabled(struct gk20a *g, int flag)
|
||||||
{
|
{
|
||||||
return test_bit(flag, g->enabled_flags);
|
return test_bit(flag, g->enabled_flags);
|
||||||
|
|||||||
@@ -673,6 +673,8 @@ void gk20a_remove_support(struct gk20a *g)
|
|||||||
#ifdef CONFIG_TEGRA_19x_GPU
|
#ifdef CONFIG_TEGRA_19x_GPU
|
||||||
t19x_remove_support(g);
|
t19x_remove_support(g);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
nvgpu_free_enabled_flags(g);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int gk20a_init_support(struct platform_device *dev)
|
static int gk20a_init_support(struct platform_device *dev)
|
||||||
|
|||||||
@@ -170,5 +170,6 @@ bool nvgpu_is_enabled(struct gk20a *g, int flag);
|
|||||||
bool __nvgpu_set_enabled(struct gk20a *g, int flag, bool state);
|
bool __nvgpu_set_enabled(struct gk20a *g, int flag, bool state);
|
||||||
|
|
||||||
int nvgpu_init_enabled_flags(struct gk20a *g);
|
int nvgpu_init_enabled_flags(struct gk20a *g);
|
||||||
|
void nvgpu_free_enabled_flags(struct gk20a *g);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user