From bde3d332f94c452fbecf5bccc26a075c966d2471 Mon Sep 17 00:00:00 2001 From: Prashant Malani Date: Fri, 14 Mar 2014 19:52:55 -0700 Subject: 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 Reviewed-on: http://git-master/r/382273 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Mitch Luban --- drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/gpu') 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) gk20a_writel(g, 0x10a164, 0x109ff); pmu->initialized = true; - pmu->zbc_ready = true; - - /* Save zbc table after PMU is initialized. */ - pmu_save_zbc(g, 0xf); /* * 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) */ gk20a_pmu_disable_elpg(g); + pmu->zbc_ready = true; + /* Save zbc table after PMU is initialized. */ + pmu_save_zbc(g, 0xf); + if (g->elpg_enabled) gk20a_pmu_enable_elpg(g); -- cgit v1.2.2