Required by our UVD code.
Reviewed-by: Christian König <christian.koenig@amd.com>
* \param flags, RADEON_FLUSH_ASYNC or 0.
* \param fence Pointer to a fence. If non-NULL, a fence is inserted
* after the CS and is returned through this parameter.
+ * \return Negative POSIX error code or 0 for success.
+ * Asynchronous submissions never return an error.
*/
- void (*cs_flush)(struct radeon_winsys_cs *cs,
- unsigned flags,
- struct pipe_fence_handle **fence);
+ int (*cs_flush)(struct radeon_winsys_cs *cs,
+ unsigned flags,
+ struct pipe_fence_handle **fence);
/**
* Return true if a buffer is referenced by a command stream.
DEBUG_GET_ONCE_BOOL_OPTION(noop, "RADEON_NOOP", false)
-static void amdgpu_cs_flush(struct radeon_winsys_cs *rcs,
- unsigned flags,
- struct pipe_fence_handle **fence)
+static int amdgpu_cs_flush(struct radeon_winsys_cs *rcs,
+ unsigned flags,
+ struct pipe_fence_handle **fence)
{
struct amdgpu_cs *cs = amdgpu_cs(rcs);
struct amdgpu_winsys *ws = cs->ctx->ws;
amdgpu_get_new_ib(&ws->base, cs, IB_CONST_PREAMBLE);
ws->num_cs_flushes++;
+ return 0;
}
static void amdgpu_cs_destroy(struct radeon_winsys_cs *rcs)
DEBUG_GET_ONCE_BOOL_OPTION(noop, "RADEON_NOOP", false)
-static void radeon_drm_cs_flush(struct radeon_winsys_cs *rcs,
- unsigned flags,
- struct pipe_fence_handle **fence)
+static int radeon_drm_cs_flush(struct radeon_winsys_cs *rcs,
+ unsigned flags,
+ struct pipe_fence_handle **fence)
{
struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
struct radeon_cs_context *tmp;
cs->base.current.cdw = 0;
cs->ws->num_cs_flushes++;
+ return 0;
}
static void radeon_drm_cs_destroy(struct radeon_winsys_cs *rcs)