[Mesa-dev] [PATCH 08/10] freedreno: native fence fd support

Chris Wilson chris at chris-wilson.co.uk
Fri Nov 18 14:20:19 UTC 2016


On Fri, Nov 18, 2016 at 08:39:37AM -0500, Rob Clark wrote:
> +void fd_fence_server_sync(struct pipe_context *pctx,
> +		struct pipe_fence_handle *fence)
> +{
> +	struct fd_context *ctx = fd_context(pctx);
> +	struct fd_batch *batch = ctx->batch;
> +
> +	if (sync_accumulate("freedreno", &batch->in_fence_fd, fence->fence_fd)) {
> +		/* error */

On error, the choice is either to cause corruption or convert it into a
CPU (client) wait. I would suggest:
		perf_debug("Failed to add fence to command stream,"
			   " stalling in the client instead!\n");
		sync_wait(fence->fence_fd, -1);
> +	}
> +}

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the mesa-dev mailing list