mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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
This commit is contained in:
@@ -3225,6 +3225,12 @@ int gk20a_mm_fb_flush(struct gk20a *g)
|
||||
|
||||
gk20a_dbg_fn("");
|
||||
|
||||
gk20a_busy_noresume(g->dev);
|
||||
if (!g->power_on) {
|
||||
pm_runtime_put_noidle(&g->dev->dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
mutex_lock(&mm->l2_op_lock);
|
||||
|
||||
/* 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)
|
||||
|
||||
mutex_unlock(&mm->l2_op_lock);
|
||||
|
||||
pm_runtime_put_noidle(&g->dev->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user