diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2014-06-23 02:56:45 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:18 -0400 |
commit | 20408d5b32e5564b2fb410bc5b0bb0a198629437 (patch) | |
tree | 965dac6015b8ab7f9865f79a07b0876025f63309 /drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |
parent | b57c6501c75b478b08b9ea6e226c55e5039b5c86 (diff) |
gpu: nvgpu: Boot FECS to secure mode
Boot FECS to secure mode if ACR is enabled.
Bug 200006956
Change-Id: Ifc107704a6456af837b7f6c513c04d152b2f4d3a
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/424251
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/pmu_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c index cfbdceae..de16e403 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |||
@@ -487,6 +487,17 @@ static void *get_pmu_sequence_out_alloc_ptr_v0(struct pmu_sequence *seq) | |||
487 | int gk20a_init_pmu(struct pmu_gk20a *pmu) | 487 | int gk20a_init_pmu(struct pmu_gk20a *pmu) |
488 | { | 488 | { |
489 | struct gk20a *g = gk20a_from_pmu(pmu); | 489 | struct gk20a *g = gk20a_from_pmu(pmu); |
490 | |||
491 | mutex_init(&pmu->elpg_mutex); | ||
492 | mutex_init(&pmu->isr_mutex); | ||
493 | mutex_init(&pmu->pmu_copy_lock); | ||
494 | mutex_init(&pmu->pmu_seq_lock); | ||
495 | |||
496 | pmu->perfmon_counter.index = 3; /* GR & CE2 */ | ||
497 | pmu->perfmon_counter.group_id = PMU_DOMAIN_GROUP_PSTATE; | ||
498 | |||
499 | pmu->remove_support = gk20a_remove_pmu_support; | ||
500 | |||
490 | switch (pmu->desc->app_version) { | 501 | switch (pmu->desc->app_version) { |
491 | case APP_VERSION_GM20B_1: | 502 | case APP_VERSION_GM20B_1: |
492 | case APP_VERSION_GM20B: | 503 | case APP_VERSION_GM20B: |
@@ -1700,25 +1711,9 @@ int gk20a_init_pmu_setup_sw(struct gk20a *g) | |||
1700 | pmu->seq_buf.size = GK20A_PMU_SEQ_BUF_SIZE; | 1711 | pmu->seq_buf.size = GK20A_PMU_SEQ_BUF_SIZE; |
1701 | 1712 | ||
1702 | gk20a_free_sgtable(&sgt_seq_buf); | 1713 | gk20a_free_sgtable(&sgt_seq_buf); |
1703 | |||
1704 | pmu->sw_ready = true; | 1714 | pmu->sw_ready = true; |
1705 | 1715 | ||
1706 | skip_init: | 1716 | skip_init: |
1707 | mutex_init(&pmu->elpg_mutex); | ||
1708 | mutex_init(&pmu->isr_mutex); | ||
1709 | mutex_init(&pmu->pmu_copy_lock); | ||
1710 | mutex_init(&pmu->pmu_seq_lock); | ||
1711 | |||
1712 | pmu->perfmon_counter.index = 3; /* GR & CE2 */ | ||
1713 | pmu->perfmon_counter.group_id = PMU_DOMAIN_GROUP_PSTATE; | ||
1714 | |||
1715 | pmu->remove_support = gk20a_remove_pmu_support; | ||
1716 | err = gk20a_init_pmu(pmu); | ||
1717 | if (err) { | ||
1718 | gk20a_err(d, "failed to set function pointers\n"); | ||
1719 | return err; | ||
1720 | } | ||
1721 | |||
1722 | gk20a_dbg_fn("done"); | 1717 | gk20a_dbg_fn("done"); |
1723 | return 0; | 1718 | return 0; |
1724 | 1719 | ||
@@ -1773,7 +1768,6 @@ int gk20a_init_pmu_setup_hw1(struct gk20a *g) | |||
1773 | int err; | 1768 | int err; |
1774 | 1769 | ||
1775 | gk20a_dbg_fn(""); | 1770 | gk20a_dbg_fn(""); |
1776 | |||
1777 | pmu_reset(pmu); | 1771 | pmu_reset(pmu); |
1778 | 1772 | ||
1779 | /* setup apertures - virtual */ | 1773 | /* setup apertures - virtual */ |
@@ -3770,4 +3764,5 @@ err_out: | |||
3770 | debugfs_remove_recursive(platform->debugfs); | 3764 | debugfs_remove_recursive(platform->debugfs); |
3771 | return -ENOMEM; | 3765 | return -ENOMEM; |
3772 | } | 3766 | } |
3767 | |||
3773 | #endif | 3768 | #endif |