frontend/va: Use p_video_codec.get_feedback_fence to report errors on frame submission

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
This commit is contained in:
Sil Vilerino 2023-11-21 17:41:34 -05:00 committed by Marge Bot
parent e0345bff94
commit 88f25f35e4

View file

@ -1279,6 +1279,12 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID context_id)
}
}
if (context->decoder->get_feedback_fence &&
!context->decoder->get_feedback_fence(context->decoder, feedback)) {
mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_OPERATION_FAILED;
}
/* Update frame_num disregarding PIPE_VIDEO_CAP_REQUIRES_FLUSH_ON_END_FRAME check above */
if (context->decoder->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) {
if ((u_reduce_video_profile(context->templat.profile) == PIPE_VIDEO_FORMAT_MPEG4_AVC)