1 From b0f7366704c0da4e0be8f8df887378717acf135b Mon Sep 17 00:00:00 2001
2 From: Eric Anholt <eric@anholt.net>
3 Date: Mon, 14 Jan 2019 15:13:17 -0800
4 Subject: [PATCH] drm/v3d: HACK: gut runtime pm for now.
6 Something is still unstable -- on starting a new glxgears from an idle
7 X11, I get an MMU violation in high addresses. The CTS also failed
8 quite quickly. With this, CTS progresses for an hour before OOMing
9 (allocating some big buffers when my board only has 600MB available to
12 Signed-off-by: Eric Anholt <eric@anholt.net>
14 drivers/gpu/drm/v3d/v3d_debugfs.c | 16 +---------------
15 drivers/gpu/drm/v3d/v3d_drv.c | 9 ---------
16 2 files changed, 1 insertion(+), 24 deletions(-)
18 --- a/drivers/gpu/drm/v3d/v3d_debugfs.c
19 +++ b/drivers/gpu/drm/v3d/v3d_debugfs.c
21 #include <linux/circ_buf.h>
22 #include <linux/ctype.h>
23 #include <linux/debugfs.h>
24 -#include <linux/pm_runtime.h>
25 #include <linux/seq_file.h>
27 #include <drm/drm_debugfs.h>
28 @@ -130,11 +129,8 @@ static int v3d_v3d_debugfs_ident(struct
29 struct drm_device *dev = node->minor->dev;
30 struct v3d_dev *v3d = to_v3d_dev(dev);
31 u32 ident0, ident1, ident2, ident3, cores;
35 - ret = pm_runtime_get_sync(v3d->drm.dev);
39 ident0 = V3D_READ(V3D_HUB_IDENT0);
40 ident1 = V3D_READ(V3D_HUB_IDENT1);
41 @@ -187,9 +183,6 @@ static int v3d_v3d_debugfs_ident(struct
42 (misccfg & V3D_MISCCFG_OVRTMUOUT) != 0);
45 - pm_runtime_mark_last_busy(v3d->drm.dev);
46 - pm_runtime_put_autosuspend(v3d->drm.dev);
51 @@ -217,11 +210,6 @@ static int v3d_measure_clock(struct seq_
54 int measure_ms = 1000;
57 - ret = pm_runtime_get_sync(v3d->drm.dev);
62 V3D_CORE_WRITE(core, V3D_V4_PCTR_0_SRC_0_3,
63 @@ -245,8 +233,6 @@ static int v3d_measure_clock(struct seq_
64 cycles / (measure_ms * 1000),
65 (cycles / (measure_ms * 100)) % 10);
67 - pm_runtime_mark_last_busy(v3d->drm.dev);
68 - pm_runtime_put_autosuspend(v3d->drm.dev);
72 --- a/drivers/gpu/drm/v3d/v3d_drv.c
73 +++ b/drivers/gpu/drm/v3d/v3d_drv.c
74 @@ -79,7 +79,6 @@ static int v3d_get_param_ioctl(struct dr
76 struct v3d_dev *v3d = to_v3d_dev(dev);
77 struct drm_v3d_get_param *args = data;
79 static const u32 reg_map[] = {
80 [DRM_V3D_PARAM_V3D_UIFCFG] = V3D_HUB_UIFCFG,
81 [DRM_V3D_PARAM_V3D_HUB_IDENT1] = V3D_HUB_IDENT1,
82 @@ -105,17 +104,12 @@ static int v3d_get_param_ioctl(struct dr
86 - ret = pm_runtime_get_sync(v3d->drm.dev);
89 if (args->param >= DRM_V3D_PARAM_V3D_CORE0_IDENT0 &&
90 args->param <= DRM_V3D_PARAM_V3D_CORE0_IDENT2) {
91 args->value = V3D_CORE_READ(0, offset);
93 args->value = V3D_READ(offset);
95 - pm_runtime_mark_last_busy(v3d->drm.dev);
96 - pm_runtime_put_autosuspend(v3d->drm.dev);
100 @@ -320,9 +314,6 @@ static int v3d_platform_drm_probe(struct
104 - pm_runtime_use_autosuspend(dev);
105 - pm_runtime_set_autosuspend_delay(dev, 50);
106 - pm_runtime_enable(dev);
108 ret = v3d_gem_init(drm);