diff options
author | Eric Anholt <eric@anholt.net> | 2014-10-15 14:34:57 +0100 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2015-06-04 14:15:22 -0700 |
commit | 6b6ad00fbb3f3e7dca47f82f6563a619c920d202 (patch) | |
tree | e4910097bc76ea11e9672f9663246ec136e614ad | |
parent | eab29b82f179a733e0d4e21bd33b757b0dfd57d4 (diff) | |
download | linux-6b6ad00fbb3f3e7dca47f82f6563a619c920d202.tar.gz |
drm/vc4: We only need to wait for render idle after we submit render.
Of course, no bins can be submitted during this time anyway, so it's
not really relevant, but it cleans up the code.
Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_gem.c | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c index 0f3743a5a8de..c9fdc365ff0f 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -144,36 +144,18 @@ wait_for_bin_thread(struct drm_device *dev, struct exec_info *exec) } static int -wait_for_idle(struct drm_device *dev) +wait_for_render_thread(struct drm_device *dev) { - struct vc4_dev *vc4 = to_vc4_dev(dev); int ret; - ret = wait_for(V3D_READ(V3D_PCS) == 0, 1000); - if (ret) - DRM_ERROR("timeout waiting for idle\n"); - - return ret; -} - -/* -static int -wait_for_render_thread(struct drm_device *dev, u32 initial_rfc) -{ - struct vc4_dev *vc4 = to_vc4_dev(dev); - int i; - - for (i = 0; i < 1000000; i++) { - if ((V3D_READ(V3D_RFC) & 0xff) == ((initial_rfc + 1) & 0xff)) - return 0; + ret = wait_for(thread_stopped(dev, 1), 1000); + if (ret) { + DRM_ERROR("timeout waiting for render thread idle\n"); + return ret; } - DRM_ERROR("timeout waiting for render thread idle: " - "0x%08x start vs 0x%08x end\n", - initial_rfc, V3D_READ(V3D_RFC)); - return -EINVAL; + return 0; } -*/ static void vc4_flush_caches(struct drm_device *dev) @@ -222,10 +204,6 @@ vc4_submit(struct drm_device *dev, struct exec_info *exec) if (ret) return ret; - ret = wait_for_idle(dev); - if (ret) - return ret; - WARN_ON(!thread_stopped(dev, 0)); if (V3D_READ(V3D_CTNCS(0)) & V3D_CTERR) { DRM_ERROR("thread 0 stopped with error\n"); @@ -234,7 +212,7 @@ vc4_submit(struct drm_device *dev, struct exec_info *exec) submit_cl(dev, 1, ct1ca, ct1ea); - ret = wait_for_idle(dev); + ret = wait_for_render_thread(dev); if (ret) return ret; |