mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
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 47f6bc0c2e.
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>
This commit is contained in:
committed by
mobile promotions
parent
0663838308
commit
f57cf74d57
@@ -1753,7 +1753,6 @@ enum {
|
|||||||
#define GK20A_SIM_IORESOURCE_MEM 2
|
#define GK20A_SIM_IORESOURCE_MEM 2
|
||||||
|
|
||||||
void gk20a_busy_noresume(struct gk20a *g);
|
void gk20a_busy_noresume(struct gk20a *g);
|
||||||
int gk20a_busy_try_noresume(struct gk20a *g);
|
|
||||||
void gk20a_idle_nosuspend(struct gk20a *g);
|
void gk20a_idle_nosuspend(struct gk20a *g);
|
||||||
int __must_check gk20a_busy(struct gk20a *g);
|
int __must_check gk20a_busy(struct gk20a *g);
|
||||||
void gk20a_idle(struct gk20a *g);
|
void gk20a_idle(struct gk20a *g);
|
||||||
|
|||||||
@@ -593,28 +593,19 @@ static int gk20a_ctrl_get_fbp_l2_masks(
|
|||||||
static int nvgpu_gpu_ioctl_l2_fb_ops(struct gk20a *g,
|
static int nvgpu_gpu_ioctl_l2_fb_ops(struct gk20a *g,
|
||||||
struct nvgpu_gpu_l2_fb_args *args)
|
struct nvgpu_gpu_l2_fb_args *args)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int err = 0;
|
||||||
|
|
||||||
if ((!args->l2_flush && !args->fb_flush) ||
|
if ((!args->l2_flush && !args->fb_flush) ||
|
||||||
(!args->l2_flush && args->l2_invalidate))
|
(!args->l2_flush && args->l2_invalidate))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
ret = gk20a_busy_try_noresume(g);
|
|
||||||
|
|
||||||
/* return if device is already powered off */
|
|
||||||
if (ret == 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (args->l2_flush)
|
if (args->l2_flush)
|
||||||
g->ops.mm.l2_flush(g, args->l2_invalidate ? true : false);
|
g->ops.mm.l2_flush(g, args->l2_invalidate ? true : false);
|
||||||
|
|
||||||
if (args->fb_flush)
|
if (args->fb_flush)
|
||||||
g->ops.mm.fb_flush(g);
|
g->ops.mm.fb_flush(g);
|
||||||
|
|
||||||
if (ret > 0)
|
return err;
|
||||||
gk20a_idle_nosuspend(g);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nvgpu_gpu_ioctl_set_mmu_debug_mode(
|
static int nvgpu_gpu_ioctl_set_mmu_debug_mode(
|
||||||
|
|||||||
@@ -110,11 +110,6 @@ void gk20a_busy_noresume(struct gk20a *g)
|
|||||||
pm_runtime_get_noresume(dev_from_gk20a(g));
|
pm_runtime_get_noresume(dev_from_gk20a(g));
|
||||||
}
|
}
|
||||||
|
|
||||||
int gk20a_busy_try_noresume(struct gk20a *g)
|
|
||||||
{
|
|
||||||
return pm_runtime_get_if_in_use(dev_from_gk20a(g));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if the device can go busy.
|
* Check if the device can go busy.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user