From: Dave Airlie Date: Mon, 21 Jun 2021 05:31:06 +0000 (+1000) Subject: crocus: fixup workaround_bo to match 965. X-Git-Tag: upstream/21.2.3~1520 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae17ffedb7fa45008a8f4264c51c6f09cbbde0f0;p=platform%2Fupstream%2Fmesa.git crocus: fixup workaround_bo to match 965. Always add to the batch, and don't set the reloc write flag when adding to reloc list, as this will confuse the render/compute sync code and cause over syncing. Part-of: --- diff --git a/src/gallium/drivers/crocus/crocus_batch.c b/src/gallium/drivers/crocus/crocus_batch.c index 63cfe28..037360c 100644 --- a/src/gallium/drivers/crocus/crocus_batch.c +++ b/src/gallium/drivers/crocus/crocus_batch.c @@ -299,9 +299,6 @@ crocus_use_bo(struct crocus_batch *batch, struct crocus_bo *bo, bool writable) { assert(bo->bufmgr == batch->command.bo->bufmgr); - if (bo == batch->ice->workaround_bo) - writable = false; - struct drm_i915_gem_exec_object2 *existing_entry = find_validation_entry(batch, bo); @@ -376,6 +373,9 @@ emit_reloc(struct crocus_batch *batch, { assert(target != NULL); + if (target == batch->ice->workaround_bo) + reloc_flags &= ~RELOC_WRITE; + bool writable = reloc_flags & RELOC_WRITE; struct drm_i915_gem_exec_object2 *entry = @@ -473,6 +473,11 @@ create_batch(struct crocus_batch *batch) crocus_use_bo(batch, batch->command.bo, false); + /* Always add workaround_bo which contains a driver identifier to be + * recorded in error states. + */ + crocus_use_bo(batch, batch->ice->workaround_bo, false); + recreate_growing_buffer(batch, &batch->state, "state buffer", STATE_SZ);