diff options
author | Prashant Malani <pmalani@nvidia.com> | 2014-03-14 22:52:55 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:08:58 -0400 |
commit | bde3d332f94c452fbecf5bccc26a075c966d2471 (patch) | |
tree | 3583d4ec1dc0e03343a739ae85d3acc2a3d46d33 /drivers/gpu | |
parent | efad6452f624108631da414a32f6906b8b8c0eb3 (diff) |
video: tegra: host: gk20a: reorder init save zbc
During the ELPG initialization routine, ELPG should be explicitly
disabled before we save the zbc table. This ensures that even if there
is a preemption from some other thread that calls ELPG enable/disable,
the ref counting will ensure that ELPG remains disabled.
Bug 1490085
Change-Id: Ie8eeaf48dda4e7f810aa26926facf63753e86abe
Signed-off-by: Prashant Malani <pmalani@nvidia.com>
Reviewed-on: http://git-master/r/382273
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c index a00499a9..c4bfe527 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |||
@@ -2011,10 +2011,6 @@ int gk20a_init_pmu_setup_hw2(struct gk20a *g) | |||
2011 | gk20a_writel(g, 0x10a164, 0x109ff); | 2011 | gk20a_writel(g, 0x10a164, 0x109ff); |
2012 | 2012 | ||
2013 | pmu->initialized = true; | 2013 | pmu->initialized = true; |
2014 | pmu->zbc_ready = true; | ||
2015 | |||
2016 | /* Save zbc table after PMU is initialized. */ | ||
2017 | pmu_save_zbc(g, 0xf); | ||
2018 | 2014 | ||
2019 | /* | 2015 | /* |
2020 | * We can't guarantee that gr code to enable ELPG will be | 2016 | * We can't guarantee that gr code to enable ELPG will be |
@@ -2023,6 +2019,10 @@ int gk20a_init_pmu_setup_hw2(struct gk20a *g) | |||
2023 | */ | 2019 | */ |
2024 | gk20a_pmu_disable_elpg(g); | 2020 | gk20a_pmu_disable_elpg(g); |
2025 | 2021 | ||
2022 | pmu->zbc_ready = true; | ||
2023 | /* Save zbc table after PMU is initialized. */ | ||
2024 | pmu_save_zbc(g, 0xf); | ||
2025 | |||
2026 | if (g->elpg_enabled) | 2026 | if (g->elpg_enabled) |
2027 | gk20a_pmu_enable_elpg(g); | 2027 | gk20a_pmu_enable_elpg(g); |
2028 | 2028 | ||