Skip to content

Commit f18f2d5

Browse files
committed
Add new VADecodeErrorType to indicate the reset happended in the driver.
Use VADecodeReset to indeicate media reset/engine reset have happended in the driver, user can use vaQuerySurfaceError() to get the detail info to do some customized work. Signed-off-by: Pengxin, Yuan <pengxin.yuan@intel.com>
1 parent f4c4c03 commit f18f2d5

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

va/va.h

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ typedef int VAStatus; /** Return status type from functions */
305305
#define VA_STATUS_ERROR_NOT_ENOUGH_BUFFER 0x00000025
306306
/** \brief Indicate an operation isn't completed because time-out interval elapsed. */
307307
#define VA_STATUS_ERROR_TIMEDOUT 0x00000026
308-
#define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF
308+
#define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF
309309

310310
/**
311311
* 1. De-interlacing flags for vaPutSurface()
@@ -669,8 +669,8 @@ typedef enum {
669669
* at vaBeginPicture() time refers to the decode output surface. The
670670
* target surface for the output of processing needs to be a different
671671
* surface since the decode process requires the original reconstructed buffer.
672-
* The surface member of VAProcPipelineParameterBuffer should be set to the
673-
* same as render_target set in vaBeginPicture(), but the driver may choose
672+
* The "surface" member of VAProcPipelineParameterBuffer should be set to the
673+
* same as "render_target" set in vaBeginPicture(), but the driver may choose
674674
* to ignore this parameter.
675675
*/
676676
VAConfigAttribDecProcessing = 8,
@@ -4205,6 +4205,7 @@ VAStatus vaQuerySurfaceStatus(
42054205
typedef enum {
42064206
VADecodeSliceMissing = 0,
42074207
VADecodeMBError = 1,
4208+
VADecodeReset = 2,
42084209
} VADecodeErrorType;
42094210

42104211
/**
@@ -4224,9 +4225,15 @@ typedef struct _VASurfaceDecodeMBErrors {
42244225
/**
42254226
* After the application gets VA_STATUS_ERROR_DECODING_ERROR after calling vaSyncSurface(),
42264227
* it can call vaQuerySurfaceError to find out further details on the particular error.
4227-
* VA_STATUS_ERROR_DECODING_ERROR should be passed in as "error_status",
4228-
* upon the return, error_info will point to an array of _VASurfaceDecodeMBErrors structure,
4229-
* which is allocated and filled by libVA with detailed information on the missing or error macroblocks.
4228+
* VA_STATUS_ERROR_DECODING_ERROR should be passed in as "error_status".
4229+
*
4230+
* After the applications get VA_STATUS_HW_BUSY or VA_STATUS_SUCCESSFULL from vaSyncSurface(),
4231+
* it still can call vaQuerySurfaceError to find out further details to know if has real hw reset
4232+
* happened on this surface since umd and kmd could recover the context from reset with success in sometimes.
4233+
* VA_STATUS_HW_BUSY or VA_STATUS_SUCCESSFULL also could be passed in as "error_status".
4234+
*
4235+
* Upon the return, error_info will point to an array of _VASurfaceDecodeMBErrors structure,
4236+
* which is allocated and filled by libVA with detailed information on the VADecodeErrorType.
42304237
* The array is terminated if "status==-1" is detected.
42314238
*/
42324239
VAStatus vaQuerySurfaceError(

0 commit comments

Comments
 (0)