diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/gk20a.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c | 13 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/module.c | 5 |
3 files changed, 2 insertions, 17 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h index 873fa826..47a04f16 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h | |||
@@ -1753,7 +1753,6 @@ enum { | |||
1753 | #define GK20A_SIM_IORESOURCE_MEM 2 | 1753 | #define GK20A_SIM_IORESOURCE_MEM 2 |
1754 | 1754 | ||
1755 | void gk20a_busy_noresume(struct gk20a *g); | 1755 | void gk20a_busy_noresume(struct gk20a *g); |
1756 | int gk20a_busy_try_noresume(struct gk20a *g); | ||
1757 | void gk20a_idle_nosuspend(struct gk20a *g); | 1756 | void gk20a_idle_nosuspend(struct gk20a *g); |
1758 | int __must_check gk20a_busy(struct gk20a *g); | 1757 | int __must_check gk20a_busy(struct gk20a *g); |
1759 | void gk20a_idle(struct gk20a *g); | 1758 | void gk20a_idle(struct gk20a *g); |
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( | |||
593 | static int nvgpu_gpu_ioctl_l2_fb_ops(struct gk20a *g, | 593 | static 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 | ||
620 | static int nvgpu_gpu_ioctl_set_mmu_debug_mode( | 611 | static int nvgpu_gpu_ioctl_set_mmu_debug_mode( |
diff --git a/drivers/gpu/nvgpu/os/linux/module.c b/drivers/gpu/nvgpu/os/linux/module.c index d580d064..7653f607 100644 --- a/drivers/gpu/nvgpu/os/linux/module.c +++ b/drivers/gpu/nvgpu/os/linux/module.c | |||
@@ -110,11 +110,6 @@ void gk20a_busy_noresume(struct gk20a *g) | |||
110 | pm_runtime_get_noresume(dev_from_gk20a(g)); | 110 | pm_runtime_get_noresume(dev_from_gk20a(g)); |
111 | } | 111 | } |
112 | 112 | ||
113 | int gk20a_busy_try_noresume(struct gk20a *g) | ||
114 | { | ||
115 | return pm_runtime_get_if_in_use(dev_from_gk20a(g)); | ||
116 | } | ||
117 | |||
118 | /* | 113 | /* |
119 | * Check if the device can go busy. | 114 | * Check if the device can go busy. |
120 | */ | 115 | */ |