diff options
author | Eric Anholt <[email protected]> | 2015-04-09 13:35:57 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-04-13 23:20:45 -0700 |
commit | 76d56752ccff5bca3a0808705d5da76f186afb33 (patch) | |
tree | 6adb10fdae51af2a7e303ada43f966723f191593 /src/gallium/drivers/vc4/kernel | |
parent | 43b20795b742b9f1608dd6f2dc586337408760ad (diff) |
vc4: Allow submitting jobs with no bin CL in validation.
For blitting, we want to fire off an RCL-only job. This takes a bit of
tweaking in our validation and the simulator support (and corresponding
new code in the kernel).
Diffstat (limited to 'src/gallium/drivers/vc4/kernel')
-rw-r--r-- | src/gallium/drivers/vc4/kernel/vc4_drv.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/vc4/kernel/vc4_gem.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/vc4/kernel/vc4_validate.c | 9 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/drivers/vc4/kernel/vc4_drv.h b/src/gallium/drivers/vc4/kernel/vc4_drv.h index 12a3ceff725..325f944bf25 100644 --- a/src/gallium/drivers/vc4/kernel/vc4_drv.h +++ b/src/gallium/drivers/vc4/kernel/vc4_drv.h @@ -162,6 +162,7 @@ vc4_validate_cl(struct drm_device *dev, void *unvalidated, uint32_t len, bool is_bin, + bool has_bin, struct vc4_exec_info *exec); int diff --git a/src/gallium/drivers/vc4/kernel/vc4_gem.c b/src/gallium/drivers/vc4/kernel/vc4_gem.c index c9a75733d6d..ac29ab35dbc 100644 --- a/src/gallium/drivers/vc4/kernel/vc4_gem.c +++ b/src/gallium/drivers/vc4/kernel/vc4_gem.c @@ -130,6 +130,7 @@ vc4_cl_validate(struct drm_device *dev, struct vc4_exec_info *exec) bin, args->bin_cl_size, true, + args->bin_cl_size != 0, exec); if (ret) goto fail; @@ -139,6 +140,7 @@ vc4_cl_validate(struct drm_device *dev, struct vc4_exec_info *exec) render, args->render_cl_size, false, + args->bin_cl_size != 0, exec); if (ret) goto fail; diff --git a/src/gallium/drivers/vc4/kernel/vc4_validate.c b/src/gallium/drivers/vc4/kernel/vc4_validate.c index aeac29e036f..2d04a4a7b9a 100644 --- a/src/gallium/drivers/vc4/kernel/vc4_validate.c +++ b/src/gallium/drivers/vc4/kernel/vc4_validate.c @@ -702,6 +702,7 @@ vc4_validate_cl(struct drm_device *dev, void *unvalidated, uint32_t len, bool is_bin, + bool has_bin, struct vc4_exec_info *exec) { uint32_t dst_offset = 0; @@ -772,7 +773,7 @@ vc4_validate_cl(struct drm_device *dev, if (is_bin) { exec->ct0ea = exec->ct0ca + dst_offset; - if (!exec->found_start_tile_binning_packet) { + if (has_bin && !exec->found_start_tile_binning_packet) { DRM_ERROR("Bin CL missing VC4_PACKET_START_TILE_BINNING\n"); return -EINVAL; } @@ -786,8 +787,10 @@ vc4_validate_cl(struct drm_device *dev, * increment from the bin CL. Otherwise a later submit would * have render execute immediately. */ - if (!exec->found_wait_on_semaphore_packet) { - DRM_ERROR("Render CL missing VC4_PACKET_WAIT_ON_SEMAPHORE\n"); + if (exec->found_wait_on_semaphore_packet != has_bin) { + DRM_ERROR("Render CL %s VC4_PACKET_WAIT_ON_SEMAPHORE\n", + exec->found_wait_on_semaphore_packet ? + "has" : "missing"); return -EINVAL; } exec->ct1ea = exec->ct1ca + dst_offset; |