return -EPERM;
/*do elpg disable before clock gating */
- gk20a_pmu_disable_elpg(g);
+ if (support_gk20a_pmu(g->dev))
+ gk20a_pmu_disable_elpg(g);
g->ops.clock_gating.slcg_gr_load_gating_prod(g,
false);
g->ops.clock_gating.slcg_perf_load_gating_prod(g,
g->ops.clock_gating.slcg_perf_load_gating_prod(g,
g->slcg_enabled);
- gk20a_pmu_enable_elpg(g);
+ if (support_gk20a_pmu(g->dev))
+ gk20a_pmu_enable_elpg(g);
gk20a_dbg(gpu_dbg_gpu_dbg | gpu_dbg_fn, "module idle");
gk20a_idle(dbg_s->pdev);
if (op->type == REGOP(TYPE_GLOBAL)) {
/* search global list */
- valid = !!bsearch(&offset,
+ valid = g->ops.regops.get_global_whitelist_ranges &&
+ !!bsearch(&offset,
g->ops.regops.get_global_whitelist_ranges(),
g->ops.regops.get_global_whitelist_ranges_count(),
sizeof(*g->ops.regops.get_global_whitelist_ranges()),
/* if debug session and channel is bound search context list */
if ((!valid) && (!dbg_s->is_profiler && dbg_s->ch)) {
/* binary search context list */
- valid = !!bsearch(&offset,
+ valid = g->ops.regops.get_context_whitelist_ranges &&
+ !!bsearch(&offset,
g->ops.regops.get_context_whitelist_ranges(),
g->ops.regops.get_context_whitelist_ranges_count(),
sizeof(*g->ops.regops.get_context_whitelist_ranges()),
/* if debug session and channel is bound search runcontrol list */
if ((!valid) && (!dbg_s->is_profiler && dbg_s->ch)) {
- valid = linear_search(offset,
+ valid = g->ops.regops.get_runcontrol_whitelist &&
+ linear_search(offset,
g->ops.regops.get_runcontrol_whitelist(),
g->ops.regops.get_runcontrol_whitelist_count());
}
}
/* binary search context list */
- valid = !!bsearch(&offset,
+ valid = g->ops.regops.get_context_whitelist_ranges &&
+ !!bsearch(&offset,
g->ops.regops.get_context_whitelist_ranges(),
g->ops.regops.get_context_whitelist_ranges_count(),
sizeof(*g->ops.regops.get_context_whitelist_ranges()),
/* if debug session and channel is bound search runcontrol list */
if ((!valid) && (!dbg_s->is_profiler && dbg_s->ch)) {
- valid = linear_search(offset,
+ valid = g->ops.regops.get_runcontrol_whitelist &&
+ linear_search(offset,
g->ops.regops.get_runcontrol_whitelist(),
g->ops.regops.get_runcontrol_whitelist_count());
}
} else if (op->type == REGOP(TYPE_GR_CTX_QUAD)) {
- valid = linear_search(offset,
+ valid = g->ops.regops.get_qctl_whitelist &&
+ linear_search(offset,
g->ops.regops.get_qctl_whitelist(),
g->ops.regops.get_qctl_whitelist_count());
}