diff options
author | Eric Anholt <eric@anholt.net> | 2014-09-17 15:34:27 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2015-06-04 14:15:21 -0700 |
commit | 73f926307c79091abcce9c72533de51b09f70bb5 (patch) | |
tree | b29c72020abe9b5ac00bdde03769025d4b74a77d | |
parent | 849e0a0edd98f5488128cf2ea671ea87c97d223d (diff) | |
download | linux-73f926307c79091abcce9c72533de51b09f70bb5.tar.gz |
drm/vc4: Try harder at resetting the GPU.
Instead of just asking it to please stop the threads and start again,
cut the power to the chip.
Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_gem.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c index 34ec3db7baf9..d5eeb6c685f7 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -31,14 +31,13 @@ #include "vc4_regs.h" static void -thread_reset(struct drm_device *dev) +vc4_reset(struct drm_device *dev) { struct vc4_dev *vc4 = to_vc4_dev(dev); - DRM_INFO("Resetting threads\n"); - V3D_WRITE(V3D_CT0CS, V3D_CTRSTA); - V3D_WRITE(V3D_CT1CS, V3D_CTRSTA); - barrier(); + DRM_INFO("Resetting GPU.\n"); + vc4_v3d_set_power(vc4, false); + vc4_v3d_set_power(vc4, true); } static void @@ -137,8 +136,7 @@ wait_for_bin_thread(struct drm_device *dev, struct exec_info *exec) } if (V3D_READ(V3D_PCS) & V3D_BMOOM) { - /* XXX */ - DRM_ERROR("binner oom and stopped\n"); + DRM_ERROR("binner oom and stopped.\n"); return -EINVAL; } @@ -452,7 +450,7 @@ vc4_submit_cl_ioctl(struct drm_device *dev, void *data, ret = vc4_submit(dev, &exec); if (ret) { - thread_reset(dev); + vc4_reset(dev); goto fail; } |