diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/regops_gk20a.c | 18 |
2 files changed, 16 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c index 35a43130..daed2967 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | |||
@@ -600,7 +600,8 @@ static int dbg_set_powergate(struct dbg_session_gk20a *dbg_s, | |||
600 | return -EPERM; | 600 | return -EPERM; |
601 | 601 | ||
602 | /*do elpg disable before clock gating */ | 602 | /*do elpg disable before clock gating */ |
603 | gk20a_pmu_disable_elpg(g); | 603 | if (support_gk20a_pmu(g->dev)) |
604 | gk20a_pmu_disable_elpg(g); | ||
604 | g->ops.clock_gating.slcg_gr_load_gating_prod(g, | 605 | g->ops.clock_gating.slcg_gr_load_gating_prod(g, |
605 | false); | 606 | false); |
606 | g->ops.clock_gating.slcg_perf_load_gating_prod(g, | 607 | g->ops.clock_gating.slcg_perf_load_gating_prod(g, |
@@ -640,7 +641,8 @@ static int dbg_set_powergate(struct dbg_session_gk20a *dbg_s, | |||
640 | g->ops.clock_gating.slcg_perf_load_gating_prod(g, | 641 | g->ops.clock_gating.slcg_perf_load_gating_prod(g, |
641 | g->slcg_enabled); | 642 | g->slcg_enabled); |
642 | 643 | ||
643 | gk20a_pmu_enable_elpg(g); | 644 | if (support_gk20a_pmu(g->dev)) |
645 | gk20a_pmu_enable_elpg(g); | ||
644 | 646 | ||
645 | gk20a_dbg(gpu_dbg_gpu_dbg | gpu_dbg_fn, "module idle"); | 647 | gk20a_dbg(gpu_dbg_gpu_dbg | gpu_dbg_fn, "module idle"); |
646 | gk20a_idle(dbg_s->pdev); | 648 | gk20a_idle(dbg_s->pdev); |
diff --git a/drivers/gpu/nvgpu/gk20a/regops_gk20a.c b/drivers/gpu/nvgpu/gk20a/regops_gk20a.c index 04659bcf..11ab7bc3 100644 --- a/drivers/gpu/nvgpu/gk20a/regops_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/regops_gk20a.c | |||
@@ -561,7 +561,8 @@ static bool check_whitelists(struct dbg_session_gk20a *dbg_s, | |||
561 | 561 | ||
562 | if (op->type == REGOP(TYPE_GLOBAL)) { | 562 | if (op->type == REGOP(TYPE_GLOBAL)) { |
563 | /* search global list */ | 563 | /* search global list */ |
564 | valid = !!bsearch(&offset, | 564 | valid = g->ops.regops.get_global_whitelist_ranges && |
565 | !!bsearch(&offset, | ||
565 | g->ops.regops.get_global_whitelist_ranges(), | 566 | g->ops.regops.get_global_whitelist_ranges(), |
566 | g->ops.regops.get_global_whitelist_ranges_count(), | 567 | g->ops.regops.get_global_whitelist_ranges_count(), |
567 | sizeof(*g->ops.regops.get_global_whitelist_ranges()), | 568 | sizeof(*g->ops.regops.get_global_whitelist_ranges()), |
@@ -570,7 +571,8 @@ static bool check_whitelists(struct dbg_session_gk20a *dbg_s, | |||
570 | /* if debug session and channel is bound search context list */ | 571 | /* if debug session and channel is bound search context list */ |
571 | if ((!valid) && (!dbg_s->is_profiler && dbg_s->ch)) { | 572 | if ((!valid) && (!dbg_s->is_profiler && dbg_s->ch)) { |
572 | /* binary search context list */ | 573 | /* binary search context list */ |
573 | valid = !!bsearch(&offset, | 574 | valid = g->ops.regops.get_context_whitelist_ranges && |
575 | !!bsearch(&offset, | ||
574 | g->ops.regops.get_context_whitelist_ranges(), | 576 | g->ops.regops.get_context_whitelist_ranges(), |
575 | g->ops.regops.get_context_whitelist_ranges_count(), | 577 | g->ops.regops.get_context_whitelist_ranges_count(), |
576 | sizeof(*g->ops.regops.get_context_whitelist_ranges()), | 578 | sizeof(*g->ops.regops.get_context_whitelist_ranges()), |
@@ -579,7 +581,8 @@ static bool check_whitelists(struct dbg_session_gk20a *dbg_s, | |||
579 | 581 | ||
580 | /* if debug session and channel is bound search runcontrol list */ | 582 | /* if debug session and channel is bound search runcontrol list */ |
581 | if ((!valid) && (!dbg_s->is_profiler && dbg_s->ch)) { | 583 | if ((!valid) && (!dbg_s->is_profiler && dbg_s->ch)) { |
582 | valid = linear_search(offset, | 584 | valid = g->ops.regops.get_runcontrol_whitelist && |
585 | linear_search(offset, | ||
583 | g->ops.regops.get_runcontrol_whitelist(), | 586 | g->ops.regops.get_runcontrol_whitelist(), |
584 | g->ops.regops.get_runcontrol_whitelist_count()); | 587 | g->ops.regops.get_runcontrol_whitelist_count()); |
585 | } | 588 | } |
@@ -592,7 +595,8 @@ static bool check_whitelists(struct dbg_session_gk20a *dbg_s, | |||
592 | } | 595 | } |
593 | 596 | ||
594 | /* binary search context list */ | 597 | /* binary search context list */ |
595 | valid = !!bsearch(&offset, | 598 | valid = g->ops.regops.get_context_whitelist_ranges && |
599 | !!bsearch(&offset, | ||
596 | g->ops.regops.get_context_whitelist_ranges(), | 600 | g->ops.regops.get_context_whitelist_ranges(), |
597 | g->ops.regops.get_context_whitelist_ranges_count(), | 601 | g->ops.regops.get_context_whitelist_ranges_count(), |
598 | sizeof(*g->ops.regops.get_context_whitelist_ranges()), | 602 | sizeof(*g->ops.regops.get_context_whitelist_ranges()), |
@@ -600,13 +604,15 @@ static bool check_whitelists(struct dbg_session_gk20a *dbg_s, | |||
600 | 604 | ||
601 | /* if debug session and channel is bound search runcontrol list */ | 605 | /* if debug session and channel is bound search runcontrol list */ |
602 | if ((!valid) && (!dbg_s->is_profiler && dbg_s->ch)) { | 606 | if ((!valid) && (!dbg_s->is_profiler && dbg_s->ch)) { |
603 | valid = linear_search(offset, | 607 | valid = g->ops.regops.get_runcontrol_whitelist && |
608 | linear_search(offset, | ||
604 | g->ops.regops.get_runcontrol_whitelist(), | 609 | g->ops.regops.get_runcontrol_whitelist(), |
605 | g->ops.regops.get_runcontrol_whitelist_count()); | 610 | g->ops.regops.get_runcontrol_whitelist_count()); |
606 | } | 611 | } |
607 | 612 | ||
608 | } else if (op->type == REGOP(TYPE_GR_CTX_QUAD)) { | 613 | } else if (op->type == REGOP(TYPE_GR_CTX_QUAD)) { |
609 | valid = linear_search(offset, | 614 | valid = g->ops.regops.get_qctl_whitelist && |
615 | linear_search(offset, | ||
610 | g->ops.regops.get_qctl_whitelist(), | 616 | g->ops.regops.get_qctl_whitelist(), |
611 | g->ops.regops.get_qctl_whitelist_count()); | 617 | g->ops.regops.get_qctl_whitelist_count()); |
612 | } | 618 | } |