diff options
author | Eric Anholt <[email protected]> | 2018-01-04 23:19:08 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-01-12 21:55:04 -0800 |
commit | 57965755e2c8089e5b52897fa86305e595f6792f (patch) | |
tree | a4acac4e030b72aefe31d77f6e3f0c330c8b832d /src/gallium/drivers/vc5/vc5_job.c | |
parent | f50d39ab4936d99051648e1669b428f4ef0f2afd (diff) |
broadcom/vc5: Port drawing commands to V3D 4.x.
This required extending the CL submit ioctl, because the tile alloc/state
buffer setup has moved from the BCL to register writes.
Diffstat (limited to 'src/gallium/drivers/vc5/vc5_job.c')
-rw-r--r-- | src/gallium/drivers/vc5/vc5_job.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc5/vc5_job.c b/src/gallium/drivers/vc5/vc5_job.c index a5edbe7c207..aa56ad6f241 100644 --- a/src/gallium/drivers/vc5/vc5_job.c +++ b/src/gallium/drivers/vc5/vc5_job.c @@ -84,6 +84,7 @@ vc5_job_free(struct vc5_context *vc5, struct vc5_job *job) vc5_destroy_cl(&job->rcl); vc5_destroy_cl(&job->indirect); vc5_bo_unreference(&job->tile_alloc); + vc5_bo_unreference(&job->tile_state); ralloc_free(job); } @@ -419,6 +420,18 @@ vc5_job_submit(struct vc5_context *vc5, struct vc5_job *job) job->submit.bcl_end = job->bcl.bo->offset + cl_offset(&job->bcl); job->submit.rcl_end = job->rcl.bo->offset + cl_offset(&job->rcl); + /* On V3D 4.1, the tile alloc/state setup moved to register writes + * instead of binner pac`kets. + */ + if (screen->devinfo.ver >= 41) { + vc5_job_add_bo(job, job->tile_alloc); + job->submit.qma = job->tile_alloc->offset; + job->submit.qms = job->tile_alloc->size; + + vc5_job_add_bo(job, job->tile_state); + job->submit.qts = job->tile_state->offset; + } + vc5_clif_dump(vc5, job); if (!(V3D_DEBUG & V3D_DEBUG_NORAST)) { |