Skip to content

Commit de28feb

Browse files
anholtpopcornmix
authored andcommitted
drm/v3d: HACK: gut runtime pm for now.
Something is still unstable -- on starting a new glxgears from an idle X11, I get an MMU violation in high addresses. The CTS also failed quite quickly. With this, CTS progresses for an hour before OOMing (allocating some big buffers when my board only has 600MB available to Linux) Signed-off-by: Eric Anholt <eric@anholt.net>
1 parent e90b9a2 commit de28feb

2 files changed

Lines changed: 1 addition & 24 deletions

File tree

‎drivers/gpu/drm/v3d/v3d_debugfs.c‎

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include <linux/circ_buf.h>
55
#include <linux/ctype.h>
66
#include <linux/debugfs.h>
7-
#include <linux/pm_runtime.h>
87
#include <linux/seq_file.h>
98
#include <drm/drmP.h>
109

@@ -129,11 +128,8 @@ static int v3d_v3d_debugfs_ident(struct seq_file *m, void *unused)
129128
struct drm_device *dev = node->minor->dev;
130129
struct v3d_dev *v3d = to_v3d_dev(dev);
131130
u32 ident0, ident1, ident2, ident3, cores;
132-
int ret, core;
131+
int core;
133132

134-
ret = pm_runtime_get_sync(v3d->dev);
135-
if (ret < 0)
136-
return ret;
137133

138134
ident0 = V3D_READ(V3D_HUB_IDENT0);
139135
ident1 = V3D_READ(V3D_HUB_IDENT1);
@@ -186,9 +182,6 @@ static int v3d_v3d_debugfs_ident(struct seq_file *m, void *unused)
186182
(misccfg & V3D_MISCCFG_OVRTMUOUT) != 0);
187183
}
188184

189-
pm_runtime_mark_last_busy(v3d->dev);
190-
pm_runtime_put_autosuspend(v3d->dev);
191-
192185
return 0;
193186
}
194187

@@ -216,11 +209,6 @@ static int v3d_measure_clock(struct seq_file *m, void *unused)
216209
uint32_t cycles;
217210
int core = 0;
218211
int measure_ms = 1000;
219-
int ret;
220-
221-
ret = pm_runtime_get_sync(v3d->dev);
222-
if (ret < 0)
223-
return ret;
224212

225213
if (v3d->ver >= 40) {
226214
V3D_CORE_WRITE(core, V3D_V4_PCTR_0_SRC_0_3,
@@ -244,8 +232,6 @@ static int v3d_measure_clock(struct seq_file *m, void *unused)
244232
cycles / (measure_ms * 1000),
245233
(cycles / (measure_ms * 100)) % 10);
246234

247-
pm_runtime_mark_last_busy(v3d->dev);
248-
pm_runtime_put_autosuspend(v3d->dev);
249235

250236
return 0;
251237
}

‎drivers/gpu/drm/v3d/v3d_drv.c‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ static int v3d_get_param_ioctl(struct drm_device *dev, void *data,
7575
{
7676
struct v3d_dev *v3d = to_v3d_dev(dev);
7777
struct drm_v3d_get_param *args = data;
78-
int ret;
7978
static const u32 reg_map[] = {
8079
[DRM_V3D_PARAM_V3D_UIFCFG] = V3D_HUB_UIFCFG,
8180
[DRM_V3D_PARAM_V3D_HUB_IDENT1] = V3D_HUB_IDENT1,
@@ -101,17 +100,12 @@ static int v3d_get_param_ioctl(struct drm_device *dev, void *data,
101100
if (args->value != 0)
102101
return -EINVAL;
103102

104-
ret = pm_runtime_get_sync(v3d->dev);
105-
if (ret < 0)
106-
return ret;
107103
if (args->param >= DRM_V3D_PARAM_V3D_CORE0_IDENT0 &&
108104
args->param <= DRM_V3D_PARAM_V3D_CORE0_IDENT2) {
109105
args->value = V3D_CORE_READ(0, offset);
110106
} else {
111107
args->value = V3D_READ(offset);
112108
}
113-
pm_runtime_mark_last_busy(v3d->dev);
114-
pm_runtime_put_autosuspend(v3d->dev);
115109
return 0;
116110
}
117111

@@ -300,9 +294,6 @@ static int v3d_platform_drm_probe(struct platform_device *pdev)
300294
goto dev_free;
301295
}
302296

303-
pm_runtime_use_autosuspend(dev);
304-
pm_runtime_set_autosuspend_delay(dev, 50);
305-
pm_runtime_enable(dev);
306297

307298
ret = drm_dev_init(&v3d->drm, &v3d_drm_driver, dev);
308299
if (ret)

0 commit comments

Comments
 (0)