gpu: nvgpu: vgpu: allow disabling of ctxsw tracing

Fixed build failure that occurred when disabling FECS ctxsw
tracing using CONFIG_GK20A_CTXSW_TRACE.

JIRA EVLR-2162

Change-Id: I751eba835c5f3f527571167e8b05fadb9687c64d
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1617557
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Richard Zhao <rizhao@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aparna Das <aparnad@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Dennis Kou <dkou@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Thomas Fleury
2017-12-13 16:54:01 -08:00
committed by mobile promotions
parent 159d77a69d
commit 28a642f6bb
4 changed files with 10 additions and 0 deletions

View File

@@ -190,6 +190,7 @@ int vgpu_mmap_user_buffer(struct gk20a *g, struct vm_area_struct *vma)
vma->vm_page_prot);
}
#ifdef CONFIG_GK20A_CTXSW_TRACE
int vgpu_fecs_trace_max_entries(struct gk20a *g,
struct nvgpu_ctxsw_trace_filter *filter)
{
@@ -223,3 +224,4 @@ void vgpu_fecs_trace_data_update(struct gk20a *g)
{
gk20a_ctxsw_trace_wake_up(g, 0);
}
#endif /* CONFIG_GK20A_CTXSW_TRACE */

View File

@@ -522,7 +522,9 @@ int vgpu_gp10b_init_hal(struct gk20a *g)
gops->clock_gating = vgpu_gp10b_ops.clock_gating;
gops->fifo = vgpu_gp10b_ops.fifo;
gops->gr_ctx = vgpu_gp10b_ops.gr_ctx;
#ifdef CONFIG_GK20A_CTXSW_TRACE
gops->fecs_trace = vgpu_gp10b_ops.fecs_trace;
#endif
gops->mm = vgpu_gp10b_ops.mm;
gops->pramin = vgpu_gp10b_ops.pramin;
gops->therm = vgpu_gp10b_ops.therm;

View File

@@ -568,7 +568,9 @@ int vgpu_gv11b_init_hal(struct gk20a *g)
gops->fifo = vgpu_gv11b_ops.fifo;
gops->gr_ctx = vgpu_gv11b_ops.gr_ctx;
gops->mm = vgpu_gv11b_ops.mm;
#ifdef CONFIG_GK20A_CTXSW_TRACE
gops->fecs_trace = vgpu_gv11b_ops.fecs_trace;
#endif
gops->therm = vgpu_gv11b_ops.therm;
gops->pmu = vgpu_gv11b_ops.pmu;
gops->regops = vgpu_gv11b_ops.regops;

View File

@@ -191,9 +191,11 @@ static int vgpu_intr_thread(void *dev_id)
vgpu_ce2_nonstall_isr(g,
&msg->info.ce2_nonstall_intr);
break;
#ifdef CONFIG_GK20A_CTXSW_TRACE
case TEGRA_VGPU_EVENT_FECS_TRACE:
vgpu_fecs_trace_data_update(g);
break;
#endif
case TEGRA_VGPU_EVENT_CHANNEL:
vgpu_handle_channel_event(g, &msg->info.channel_event);
break;
@@ -508,7 +510,9 @@ int vgpu_pm_finalize_poweron(struct device *dev)
if (err)
goto done;
#ifdef CONFIG_GK20A_CTXSW_TRACE
gk20a_ctxsw_trace_init(g);
#endif
gk20a_sched_ctrl_init(g);
gk20a_channel_resume(g);