summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r--drivers/gpu/nvgpu/os/linux/scale.c11
-rw-r--r--drivers/gpu/nvgpu/vgpu/vgpu.c4
2 files changed, 5 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/scale.c b/drivers/gpu/nvgpu/os/linux/scale.c
index d7a961c7..ee5b6861 100644
--- a/drivers/gpu/nvgpu/os/linux/scale.c
+++ b/drivers/gpu/nvgpu/os/linux/scale.c
@@ -368,11 +368,11 @@ void gk20a_scale_init(struct device *dev)
368 profile->devfreq_profile.get_cur_freq = get_cur_freq; 368 profile->devfreq_profile.get_cur_freq = get_cur_freq;
369 profile->devfreq_profile.polling_ms = 25; 369 profile->devfreq_profile.polling_ms = 25;
370 370
371 devfreq = devfreq_add_device(dev, 371 devfreq = devm_devfreq_add_device(dev,
372 &profile->devfreq_profile, 372 &profile->devfreq_profile,
373 platform->devfreq_governor, NULL); 373 platform->devfreq_governor, NULL);
374 374
375 if (IS_ERR(devfreq)) 375 if (IS_ERR_OR_NULL(devfreq))
376 devfreq = NULL; 376 devfreq = NULL;
377 377
378 l->devfreq = devfreq; 378 l->devfreq = devfreq;
@@ -401,8 +401,6 @@ void gk20a_scale_exit(struct device *dev)
401{ 401{
402 struct gk20a_platform *platform = dev_get_drvdata(dev); 402 struct gk20a_platform *platform = dev_get_drvdata(dev);
403 struct gk20a *g = platform->g; 403 struct gk20a *g = platform->g;
404 struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
405 int err;
406 404
407#ifdef CONFIG_GK20A_PM_QOS 405#ifdef CONFIG_GK20A_PM_QOS
408 if (platform->qos_notify) { 406 if (platform->qos_notify) {
@@ -413,11 +411,6 @@ void gk20a_scale_exit(struct device *dev)
413 } 411 }
414#endif 412#endif
415 413
416 if (platform->devfreq_governor) {
417 err = devfreq_remove_device(l->devfreq);
418 l->devfreq = NULL;
419 }
420
421 nvgpu_kfree(g, g->scale_profile); 414 nvgpu_kfree(g, g->scale_profile);
422 g->scale_profile = NULL; 415 g->scale_profile = NULL;
423} 416}
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c
index c17a16df..5a3f0046 100644
--- a/drivers/gpu/nvgpu/vgpu/vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/vgpu.c
@@ -240,7 +240,9 @@ void vgpu_remove_support_common(struct gk20a *g)
240 msg.event = TEGRA_VGPU_EVENT_ABORT; 240 msg.event = TEGRA_VGPU_EVENT_ABORT;
241 err = vgpu_ivc_send(vgpu_ivc_get_peer_self(), TEGRA_VGPU_QUEUE_INTR, 241 err = vgpu_ivc_send(vgpu_ivc_get_peer_self(), TEGRA_VGPU_QUEUE_INTR,
242 &msg, sizeof(msg)); 242 &msg, sizeof(msg));
243 WARN_ON(err); 243 if (err)
244 nvgpu_log_info(g, "vgpu_ivc_send_returned %d\n", err);
245
244 nvgpu_thread_stop(&priv->intr_handler); 246 nvgpu_thread_stop(&priv->intr_handler);
245 247
246 nvgpu_clk_arb_cleanup_arbiter(g); 248 nvgpu_clk_arb_cleanup_arbiter(g);