Skip to content

Commit 933e506

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 17727d7 commit 933e506

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

109
#include <drm/drm_debugfs.h>
@@ -130,11 +129,8 @@ static int v3d_v3d_debugfs_ident(struct seq_file *m, void *unused)
130129
struct drm_device *dev = node->minor->dev;
131130
struct v3d_dev *v3d = to_v3d_dev(dev);
132131
u32 ident0, ident1, ident2, ident3, cores;
133-
int ret, core;
132+
int core;
134133

135-
ret = pm_runtime_get_sync(v3d->drm.dev);
136-
if (ret < 0)
137-
return ret;
138134

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

190-
pm_runtime_mark_last_busy(v3d->drm.dev);
191-
pm_runtime_put_autosuspend(v3d->drm.dev);
192-
193186
return 0;
194187
}
195188

@@ -217,11 +210,6 @@ static int v3d_measure_clock(struct seq_file *m, void *unused)
217210
uint32_t cycles;
218211
int core = 0;
219212
int measure_ms = 1000;
220-
int ret;
221-
222-
ret = pm_runtime_get_sync(v3d->drm.dev);
223-
if (ret < 0)
224-
return ret;
225213

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

248-
pm_runtime_mark_last_busy(v3d->drm.dev);
249-
pm_runtime_put_autosuspend(v3d->drm.dev);
250236

251237
return 0;
252238
}

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ static int v3d_get_param_ioctl(struct drm_device *dev, void *data,
7979
{
8080
struct v3d_dev *v3d = to_v3d_dev(dev);
8181
struct drm_v3d_get_param *args = data;
82-
int ret;
8382
static const u32 reg_map[] = {
8483
[DRM_V3D_PARAM_V3D_UIFCFG] = V3D_HUB_UIFCFG,
8584
[DRM_V3D_PARAM_V3D_HUB_IDENT1] = V3D_HUB_IDENT1,
@@ -105,17 +104,12 @@ static int v3d_get_param_ioctl(struct drm_device *dev, void *data,
105104
if (args->value != 0)
106105
return -EINVAL;
107106

108-
ret = pm_runtime_get_sync(v3d->drm.dev);
109-
if (ret < 0)
110-
return ret;
111107
if (args->param >= DRM_V3D_PARAM_V3D_CORE0_IDENT0 &&
112108
args->param <= DRM_V3D_PARAM_V3D_CORE0_IDENT2) {
113109
args->value = V3D_CORE_READ(0, offset);
114110
} else {
115111
args->value = V3D_READ(offset);
116112
}
117-
pm_runtime_mark_last_busy(v3d->drm.dev);
118-
pm_runtime_put_autosuspend(v3d->drm.dev);
119113
return 0;
120114
}
121115

@@ -308,9 +302,6 @@ static int v3d_platform_drm_probe(struct platform_device *pdev)
308302
return -ENOMEM;
309303
}
310304

311-
pm_runtime_use_autosuspend(dev);
312-
pm_runtime_set_autosuspend_delay(dev, 50);
313-
pm_runtime_enable(dev);
314305

315306
ret = v3d_gem_init(drm);
316307
if (ret)

0 commit comments

Comments
 (0)