mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
gpu: nvgpu: vgpu: call nvgpu_init_ltc_support
vgpu needs to call nvgpu_init_ltc_support to floor sweep and set ltc_count. And set gops.ltc.set_enabled to null as guest is not allowed to change ltc settings. Jira VQRM-2345 Change-Id: I83517d631aa947db4a0a4c312f0cecda9ba03973 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1703626 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
c8b659496d
commit
152eeae163
@@ -31,6 +31,7 @@
|
||||
#include <nvgpu/soc.h>
|
||||
#include <nvgpu/ctxsw_trace.h>
|
||||
#include <nvgpu/defaults.h>
|
||||
#include <nvgpu/ltc.h>
|
||||
|
||||
#include "vgpu_linux.h"
|
||||
#include "vgpu/fecs_trace_vgpu.h"
|
||||
@@ -177,6 +178,12 @@ int vgpu_pm_finalize_poweron(struct device *dev)
|
||||
if (g->ops.ltc.init_fs_state)
|
||||
g->ops.ltc.init_fs_state(g);
|
||||
|
||||
err = nvgpu_init_ltc_support(g);
|
||||
if (err) {
|
||||
nvgpu_err(g, "failed to init ltc");
|
||||
goto done;
|
||||
}
|
||||
|
||||
err = vgpu_init_mm_support(g);
|
||||
if (err) {
|
||||
nvgpu_err(g, "failed to init gk20a mm");
|
||||
|
||||
@@ -42,6 +42,9 @@ int nvgpu_init_ltc_support(struct gk20a *g)
|
||||
|
||||
void nvgpu_ltc_sync_enabled(struct gk20a *g)
|
||||
{
|
||||
if (!g->ops.ltc.set_enabled)
|
||||
return;
|
||||
|
||||
nvgpu_spinlock_acquire(&g->ltc_enabled_lock);
|
||||
if (g->mm.ltc_enabled_current != g->mm.ltc_enabled_target) {
|
||||
g->ops.ltc.set_enabled(g, g->mm.ltc_enabled_target);
|
||||
|
||||
@@ -86,7 +86,7 @@ static const struct gpu_ops vgpu_gp10b_ops = {
|
||||
.isr = gp10b_ltc_isr,
|
||||
.cbc_fix_config = gm20b_ltc_cbc_fix_config,
|
||||
.flush = gm20b_flush_ltc,
|
||||
.set_enabled = gp10b_ltc_set_enabled,
|
||||
.set_enabled = NULL,
|
||||
},
|
||||
.ce2 = {
|
||||
.isr_stall = gp10b_ce_isr,
|
||||
|
||||
@@ -104,7 +104,7 @@ static const struct gpu_ops vgpu_gv11b_ops = {
|
||||
.cbc_ctrl = NULL,
|
||||
.isr = gv11b_ltc_isr,
|
||||
.flush = gm20b_flush_ltc,
|
||||
.set_enabled = gp10b_ltc_set_enabled,
|
||||
.set_enabled = NULL,
|
||||
},
|
||||
.ce2 = {
|
||||
.isr_stall = gv11b_ce_isr,
|
||||
|
||||
Reference in New Issue
Block a user