提交 9798aa29 编写于 作者: E Eric Anholt 提交者: Zheng Zengkai

drm/v3d: HACK: gut runtime pm for now.

raspberrypi inclusion
category: feature
bugzilla: 50432

--------------------------------

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: NEric Anholt <eric@anholt.net>
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 8f761988
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include <linux/circ_buf.h> #include <linux/circ_buf.h>
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <linux/pm_runtime.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <drm/drm_debugfs.h> #include <drm/drm_debugfs.h>
...@@ -130,11 +129,8 @@ static int v3d_v3d_debugfs_ident(struct seq_file *m, void *unused) ...@@ -130,11 +129,8 @@ static int v3d_v3d_debugfs_ident(struct seq_file *m, void *unused)
struct drm_device *dev = node->minor->dev; struct drm_device *dev = node->minor->dev;
struct v3d_dev *v3d = to_v3d_dev(dev); struct v3d_dev *v3d = to_v3d_dev(dev);
u32 ident0, ident1, ident2, ident3, cores; u32 ident0, ident1, ident2, ident3, cores;
int ret, core; int core;
ret = pm_runtime_get_sync(v3d->drm.dev);
if (ret < 0)
return ret;
ident0 = V3D_READ(V3D_HUB_IDENT0); ident0 = V3D_READ(V3D_HUB_IDENT0);
ident1 = V3D_READ(V3D_HUB_IDENT1); ident1 = V3D_READ(V3D_HUB_IDENT1);
...@@ -187,9 +183,6 @@ static int v3d_v3d_debugfs_ident(struct seq_file *m, void *unused) ...@@ -187,9 +183,6 @@ static int v3d_v3d_debugfs_ident(struct seq_file *m, void *unused)
(misccfg & V3D_MISCCFG_OVRTMUOUT) != 0); (misccfg & V3D_MISCCFG_OVRTMUOUT) != 0);
} }
pm_runtime_mark_last_busy(v3d->drm.dev);
pm_runtime_put_autosuspend(v3d->drm.dev);
return 0; return 0;
} }
...@@ -217,11 +210,6 @@ static int v3d_measure_clock(struct seq_file *m, void *unused) ...@@ -217,11 +210,6 @@ static int v3d_measure_clock(struct seq_file *m, void *unused)
uint32_t cycles; uint32_t cycles;
int core = 0; int core = 0;
int measure_ms = 1000; int measure_ms = 1000;
int ret;
ret = pm_runtime_get_sync(v3d->drm.dev);
if (ret < 0)
return ret;
if (v3d->ver >= 40) { if (v3d->ver >= 40) {
V3D_CORE_WRITE(core, V3D_V4_PCTR_0_SRC_0_3, 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) ...@@ -245,8 +233,6 @@ static int v3d_measure_clock(struct seq_file *m, void *unused)
cycles / (measure_ms * 1000), cycles / (measure_ms * 1000),
(cycles / (measure_ms * 100)) % 10); (cycles / (measure_ms * 100)) % 10);
pm_runtime_mark_last_busy(v3d->drm.dev);
pm_runtime_put_autosuspend(v3d->drm.dev);
return 0; return 0;
} }
......
...@@ -79,7 +79,6 @@ static int v3d_get_param_ioctl(struct drm_device *dev, void *data, ...@@ -79,7 +79,6 @@ static int v3d_get_param_ioctl(struct drm_device *dev, void *data,
{ {
struct v3d_dev *v3d = to_v3d_dev(dev); struct v3d_dev *v3d = to_v3d_dev(dev);
struct drm_v3d_get_param *args = data; struct drm_v3d_get_param *args = data;
int ret;
static const u32 reg_map[] = { static const u32 reg_map[] = {
[DRM_V3D_PARAM_V3D_UIFCFG] = V3D_HUB_UIFCFG, [DRM_V3D_PARAM_V3D_UIFCFG] = V3D_HUB_UIFCFG,
[DRM_V3D_PARAM_V3D_HUB_IDENT1] = V3D_HUB_IDENT1, [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, ...@@ -105,17 +104,12 @@ static int v3d_get_param_ioctl(struct drm_device *dev, void *data,
if (args->value != 0) if (args->value != 0)
return -EINVAL; return -EINVAL;
ret = pm_runtime_get_sync(v3d->drm.dev);
if (ret < 0)
return ret;
if (args->param >= DRM_V3D_PARAM_V3D_CORE0_IDENT0 && if (args->param >= DRM_V3D_PARAM_V3D_CORE0_IDENT0 &&
args->param <= DRM_V3D_PARAM_V3D_CORE0_IDENT2) { args->param <= DRM_V3D_PARAM_V3D_CORE0_IDENT2) {
args->value = V3D_CORE_READ(0, offset); args->value = V3D_CORE_READ(0, offset);
} else { } else {
args->value = V3D_READ(offset); args->value = V3D_READ(offset);
} }
pm_runtime_mark_last_busy(v3d->drm.dev);
pm_runtime_put_autosuspend(v3d->drm.dev);
return 0; return 0;
} }
...@@ -308,9 +302,6 @@ static int v3d_platform_drm_probe(struct platform_device *pdev) ...@@ -308,9 +302,6 @@ static int v3d_platform_drm_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
} }
pm_runtime_use_autosuspend(dev);
pm_runtime_set_autosuspend_delay(dev, 50);
pm_runtime_enable(dev);
ret = v3d_gem_init(drm); ret = v3d_gem_init(drm);
if (ret) if (ret)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册