diff options
-rw-r--r-- | drivers/gpu/nvgpu/common/enabled.c | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/module.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/enabled.h | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/enabled.c b/drivers/gpu/nvgpu/common/enabled.c index 06cbbe34..cded36c8 100644 --- a/drivers/gpu/nvgpu/common/enabled.c +++ b/drivers/gpu/nvgpu/common/enabled.c | |||
@@ -40,6 +40,14 @@ int nvgpu_init_enabled_flags(struct gk20a *g) | |||
40 | return 0; | 40 | return 0; |
41 | } | 41 | } |
42 | 42 | ||
43 | /* | ||
44 | * Call this on driver shutdown! | ||
45 | */ | ||
46 | void nvgpu_free_enabled_flags(struct gk20a *g) | ||
47 | { | ||
48 | nvgpu_kfree(g, g->enabled_flags); | ||
49 | } | ||
50 | |||
43 | bool nvgpu_is_enabled(struct gk20a *g, int flag) | 51 | bool nvgpu_is_enabled(struct gk20a *g, int flag) |
44 | { | 52 | { |
45 | return test_bit(flag, g->enabled_flags); | 53 | return test_bit(flag, g->enabled_flags); |
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index 5d91da8f..cc2b5ec7 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c | |||
@@ -673,6 +673,8 @@ void gk20a_remove_support(struct gk20a *g) | |||
673 | #ifdef CONFIG_TEGRA_19x_GPU | 673 | #ifdef CONFIG_TEGRA_19x_GPU |
674 | t19x_remove_support(g); | 674 | t19x_remove_support(g); |
675 | #endif | 675 | #endif |
676 | |||
677 | nvgpu_free_enabled_flags(g); | ||
676 | } | 678 | } |
677 | 679 | ||
678 | static int gk20a_init_support(struct platform_device *dev) | 680 | static int gk20a_init_support(struct platform_device *dev) |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled.h b/drivers/gpu/nvgpu/include/nvgpu/enabled.h index e7dd61d2..001cafb0 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/enabled.h +++ b/drivers/gpu/nvgpu/include/nvgpu/enabled.h | |||
@@ -170,5 +170,6 @@ bool nvgpu_is_enabled(struct gk20a *g, int flag); | |||
170 | bool __nvgpu_set_enabled(struct gk20a *g, int flag, bool state); | 170 | bool __nvgpu_set_enabled(struct gk20a *g, int flag, bool state); |
171 | 171 | ||
172 | int nvgpu_init_enabled_flags(struct gk20a *g); | 172 | int nvgpu_init_enabled_flags(struct gk20a *g); |
173 | void nvgpu_free_enabled_flags(struct gk20a *g); | ||
173 | 174 | ||
174 | #endif | 175 | #endif |