summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c
diff options
context:
space:
mode:
authorDebarshi Dutta <ddutta@nvidia.com>2019-08-30 02:02:25 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2019-09-05 06:54:39 -0400
commitf57cf74d57718c672b1af8dd957cc8bd9ea3bb6c (patch)
tree6f79c75ed357200933bf268fde285159493b0bc7 /drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c
parent066383830893c0fc43ec28f833185eab91e9dfc9 (diff)
Revert "gpu: nvgpu: Fix the race between runtime PM and L2 flush"
This patch results in a flaw that doesn't clear the GPU cache. This reverts commit 47f6bc0c2e85d0a8ff943b88c81108ca1bfc588e. Bug 2687410 Change-Id: If78bd7ca29eb5621d4369cbddf21320e2a77a41a Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2186886 GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c')
-rw-r--r--drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c
index cb24c30c..9b4f50a5 100644
--- a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c
+++ b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c
@@ -593,28 +593,19 @@ static int gk20a_ctrl_get_fbp_l2_masks(
593static int nvgpu_gpu_ioctl_l2_fb_ops(struct gk20a *g, 593static int nvgpu_gpu_ioctl_l2_fb_ops(struct gk20a *g,
594 struct nvgpu_gpu_l2_fb_args *args) 594 struct nvgpu_gpu_l2_fb_args *args)
595{ 595{
596 int ret = 0; 596 int err = 0;
597 597
598 if ((!args->l2_flush && !args->fb_flush) || 598 if ((!args->l2_flush && !args->fb_flush) ||
599 (!args->l2_flush && args->l2_invalidate)) 599 (!args->l2_flush && args->l2_invalidate))
600 return -EINVAL; 600 return -EINVAL;
601 601
602 ret = gk20a_busy_try_noresume(g);
603
604 /* return if device is already powered off */
605 if (ret == 0)
606 return 0;
607
608 if (args->l2_flush) 602 if (args->l2_flush)
609 g->ops.mm.l2_flush(g, args->l2_invalidate ? true : false); 603 g->ops.mm.l2_flush(g, args->l2_invalidate ? true : false);
610 604
611 if (args->fb_flush) 605 if (args->fb_flush)
612 g->ops.mm.fb_flush(g); 606 g->ops.mm.fb_flush(g);
613 607
614 if (ret > 0) 608 return err;
615 gk20a_idle_nosuspend(g);
616
617 return 0;
618} 609}
619 610
620static int nvgpu_gpu_ioctl_set_mmu_debug_mode( 611static int nvgpu_gpu_ioctl_set_mmu_debug_mode(