summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSam Payne <spayne@nvidia.com>2015-07-08 18:26:37 -0400
committerSachin Nikam <snikam@nvidia.com>2015-07-16 23:54:25 -0400
commit37869170e4f3c42fa31faa1bcda1e6c0a188179c (patch)
treea13f8bfb0686b6efde3cb32eb7905efd8cb8b8af /drivers
parentae2f9da28e6b49a486d996a9e3b1c31ce51e15d9 (diff)
gpu: nvgpu: check that GPU is powered before flush
if GPU is not powered before L2 is flushed, then L2 cache flush is a noop. Same behavior as gk20a_mm_L2_Invalidate() bug 1661228 Change-Id: I0f590628928a73b7277d1b16a5a79a86e0213648 Signed-off-by: Sam Payne <spayne@nvidia.com> Reviewed-on: http://git-master/r/768068 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> (cherry picked from commit cb4d29d34d0736aa753afa323bfb216481cc8640) Reviewed-on: http://git-master/r/771113 GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index 112e218a..1e0fd6af 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -3225,6 +3225,12 @@ int gk20a_mm_fb_flush(struct gk20a *g)
3225 3225
3226 gk20a_dbg_fn(""); 3226 gk20a_dbg_fn("");
3227 3227
3228 gk20a_busy_noresume(g->dev);
3229 if (!g->power_on) {
3230 pm_runtime_put_noidle(&g->dev->dev);
3231 return 0;
3232 }
3233
3228 mutex_lock(&mm->l2_op_lock); 3234 mutex_lock(&mm->l2_op_lock);
3229 3235
3230 /* Make sure all previous writes are committed to the L2. There's no 3236 /* Make sure all previous writes are committed to the L2. There's no
@@ -3262,6 +3268,8 @@ int gk20a_mm_fb_flush(struct gk20a *g)
3262 3268
3263 mutex_unlock(&mm->l2_op_lock); 3269 mutex_unlock(&mm->l2_op_lock);
3264 3270
3271 pm_runtime_put_noidle(&g->dev->dev);
3272
3265 return ret; 3273 return ret;
3266} 3274}
3267 3275