From e2c0eac5bf6d1a13d782682d9597888d8d397b3b Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Thu, 22 Sep 2022 12:53:25 -0400 Subject: [PATCH] frontends/va: fix build error for vaSyncBuffer with older VA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit return VA_STATUS_ERROR_TIMEDOUT; | ^~~~~~~~~~~~~~~~~~~~~~~~ | VA_STATUS_ERROR_UNKNOWN ../src/gallium/frontends/va/buffer.c:434:14: note: each undeclared identifier is reported only once for each function it appears in ../src/gallium/frontends/va/buffer.c:436:22: error: ‘VA_TIMEOUT_INFINITE’ undeclared (first use in this function); did you mean ‘PIPE_TIMEOUT_INFINITE’? 436 | if (timeout_ns != VA_TIMEOUT_INFINITE) | ^~~~~~~~~~~~~~~~~~~ | PIPE_TIMEOUT_INFINITE Fixes: 229c6f79a ("frontends/va: Implement vaSyncBuffer") Signed-off-by: Leo Liu Reviewed-by: Ruijing Dong Reviewed-by: Sil Vilerino Part-of: --- src/gallium/frontends/va/buffer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/frontends/va/buffer.c b/src/gallium/frontends/va/buffer.c index 59df629a0d0..99ab0aa1753 100644 --- a/src/gallium/frontends/va/buffer.c +++ b/src/gallium/frontends/va/buffer.c @@ -398,6 +398,7 @@ vlVaReleaseBufferHandle(VADriverContextP ctx, VABufferID buf_id) return VA_STATUS_SUCCESS; } +#if VA_CHECK_VERSION(1, 15, 0) VAStatus vlVaSyncBuffer(VADriverContextP ctx, VABufferID buf_id, uint64_t timeout_ns) { @@ -473,3 +474,4 @@ vlVaSyncBuffer(VADriverContextP ctx, VABufferID buf_id, uint64_t timeout_ns) mtx_unlock(&drv->mutex); return VA_STATUS_SUCCESS; } +#endif