summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/vgpu.c
diff options
context:
space:
mode:
authorAparna Das <aparnad@nvidia.com>2018-09-11 20:11:44 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-27 18:04:47 -0400
commit78e3d22da3c2513d425c8c2560468ce854a982dd (patch)
tree87ce6d1c47357c868cb58608e893afb4c14cfa69 /drivers/gpu/nvgpu/vgpu/vgpu.c
parent8789cafcfb0d1e16ad0b2c61b047d275f2d684b4 (diff)
gpu: nvgpu: vgpu: support clk-arb
1. Implement the following vgpu functions to support clk-arb: - vgpu_clk_get_range() to return min and max freqs from supported frequencies - implement vgpu_clk_get_round_rate() which sets rounded rate to input rate. Rounding is handled in RM Server - modify vgpu_clk_get_freqs() to retrieve freq table in IVM memory instead of copying the value in array as part of cmd message. 2. Add support for clk-arb related HALs for vgpu. 3. support_clk_freq_controller is assigned true for vgpu provided guest VM has the privilege to set clock frequency. Bug 200422845 Bug 2363882 Jira EVLR-3254 Change-Id: I91fc392db381c5db1d52b19d45ec0481fdc27554 Signed-off-by: Aparna Das <aparnad@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1812379 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/vgpu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c
index 9ad0468e..7d7df9b3 100644
--- a/drivers/gpu/nvgpu/vgpu/vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/vgpu.c
@@ -26,6 +26,7 @@
26#include <nvgpu/vgpu/vgpu.h> 26#include <nvgpu/vgpu/vgpu.h>
27#include <nvgpu/timers.h> 27#include <nvgpu/timers.h>
28#include <nvgpu/channel.h> 28#include <nvgpu/channel.h>
29#include <nvgpu/clk_arb.h>
29 30
30#include "gk20a/gk20a.h" 31#include "gk20a/gk20a.h"
31#include "fecs_trace_vgpu.h" 32#include "fecs_trace_vgpu.h"
@@ -235,6 +236,13 @@ void vgpu_remove_support_common(struct gk20a *g)
235 &msg, sizeof(msg)); 236 &msg, sizeof(msg));
236 WARN_ON(err); 237 WARN_ON(err);
237 nvgpu_thread_stop(&priv->intr_handler); 238 nvgpu_thread_stop(&priv->intr_handler);
239
240 nvgpu_clk_arb_cleanup_arbiter(g);
241
242 nvgpu_mutex_destroy(&g->clk_arb_enable_lock);
243 nvgpu_mutex_destroy(&priv->vgpu_clk_get_freq_lock);
244
245 nvgpu_kfree(g, priv->freqs);
238} 246}
239 247
240void vgpu_detect_chip(struct gk20a *g) 248void vgpu_detect_chip(struct gk20a *g)