From: Alyssa Rosenzweig Date: Mon, 20 Jul 2020 15:55:25 +0000 (-0400) Subject: panfrost: Skip specifying in_syncs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=85a2216fe4fb72a1caf3474493243d41b072b052;p=mesa.git panfrost: Skip specifying in_syncs With the current kernel UABI, there is no benefit to explicitly specifiying dependencies, since the kernel by design adds implicit dependencies to any referenced BOs. This is something we'd like to address in the future, but efficient handling with future kernels will require a tweaked design in userspace as well. So let's do the obvious thing now, and extend later. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index 9109f8c6fa4..7075b439c6f 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -1001,36 +1001,9 @@ panfrost_batch_submit_ioctl(struct panfrost_batch *batch, struct pipe_context *gallium = (struct pipe_context *) ctx; struct panfrost_device *dev = pan_device(gallium->screen); struct drm_panfrost_submit submit = {0,}; - uint32_t *bo_handles, *in_syncs = NULL; - bool is_fragment_shader; + uint32_t *bo_handles; int ret; - is_fragment_shader = (reqs & PANFROST_JD_REQ_FS) && batch->scoreboard.first_job; - if (is_fragment_shader) - submit.in_sync_count = 1; - else - submit.in_sync_count = util_dynarray_num_elements(&batch->dependencies, - struct panfrost_batch_fence *); - - if (submit.in_sync_count) { - in_syncs = calloc(submit.in_sync_count, sizeof(*in_syncs)); - assert(in_syncs); - } - - /* The fragment job always depends on the vertex/tiler job if there's - * one - */ - if (is_fragment_shader) { - in_syncs[0] = batch->out_sync->syncobj; - } else { - unsigned int i = 0; - - util_dynarray_foreach(&batch->dependencies, - struct panfrost_batch_fence *, dep) - in_syncs[i++] = (*dep)->syncobj; - } - - submit.in_syncs = (uintptr_t)in_syncs; submit.out_sync = batch->out_sync->syncobj; submit.jc = first_job_desc; submit.requirements = reqs; @@ -1047,7 +1020,6 @@ panfrost_batch_submit_ioctl(struct panfrost_batch *batch, submit.bo_handles = (u64) (uintptr_t) bo_handles; ret = drmIoctl(dev->fd, DRM_IOCTL_PANFROST_SUBMIT, &submit); free(bo_handles); - free(in_syncs); if (ret) { if (dev->debug & PAN_DBG_MSGS)