summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a_scale.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_scale.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a_scale.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c b/drivers/gpu/nvgpu/gk20a/gk20a_scale.c
index d09a18f8..7efd07bf 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a_scale.c
@@ -312,6 +312,28 @@ err_get_freqs:
312 g->scale_profile = NULL; 312 g->scale_profile = NULL;
313} 313}
314 314
315void gk20a_scale_exit(struct platform_device *pdev)
316{
317 struct gk20a_platform *platform = platform_get_drvdata(pdev);
318 struct gk20a *g = platform->g;
319 int err;
320
321 if (platform->qos_id < PM_QOS_NUM_CLASSES &&
322 platform->qos_id != PM_QOS_RESERVED &&
323 platform->postscale) {
324 pm_qos_remove_notifier(platform->qos_id,
325 &g->scale_profile->qos_notify_block);
326 }
327
328 if (platform->devfreq_governor) {
329 err = devfreq_remove_device(g->devfreq);
330 g->devfreq = NULL;
331 }
332
333 kfree(g->scale_profile);
334 g->scale_profile = NULL;
335}
336
315/* 337/*
316 * gk20a_scale_hw_init(dev) 338 * gk20a_scale_hw_init(dev)
317 * 339 *