Closed edwarddavidbaker closed 2 years ago
Copying a comment from the partner ticket (https://partnerissuetracker.corp.google.com/issues/176100230) for additional logs.
As a first pass I checked this on a cyan. The reason these cases fail is because the i965 driver returns VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT
when the test case is correctly expecting VA_STATUS_ERROR_UNSUPPORTED_PROFILE
.
In this snippet the test first calls getSupportStatus() which returns VA_STATUS_ERROR_UNSUPPORTED_PROFILE
. It then calls createConfig() to verify that vaCreateConfig() also returns the same error.
TEST_P(VAAPIGetCreateConfig, CreateConfigWithAttributes)
{
const VAStatus expectedStatus = getSupportStatus(profile, entrypoint);
if (VA_STATUS_SUCCESS != expectedStatus) {
createConfig(profile, entrypoint, ConfigAttributes(), expectedStatus);
destroyConfig(VA_STATUS_ERROR_INVALID_CONFIG);
return;
}
Some logging from the above code. expectedStatus=12 is VA_STATUS_ERROR_UNSUPPORTED_PROFILE
.
localhost ~ # /usr/bin/test_va_api --gtest_filter=*CreateConfigWithAttributes/210
Note: Google Test filter = *CreateConfigWithAttributes/210
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from GetCreateConfig/VAAPIGetCreateConfig
[ RUN ] GetCreateConfig/VAAPIGetCreateConfig.CreateConfigWithAttributes/210
libva info: VA-API version 1.13.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_13
libva info: va_openDriver() returns 0
164 getSupportStatus searching for profile=21:VAProfileVP9Profile2
62 CreateConfigWithAttributes expectedStatus=12 profile=21:VAProfileVP9Profile2 entrypoint=1:VAEntrypointVLD
66 CreateConfigWithAttributes calling createConfig()
i965 handles vaCreateConfig() with i965_CreateConfig(). This then quickly calls i965_validate_config() which returns VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT
, which i965_CreateConfig quickly returns.
VAStatus
i965_CreateConfig(VADriverContextP ctx,
VAProfile profile,
VAEntrypoint entrypoint,
VAConfigAttrib *attrib_list,
int num_attribs,
VAConfigID *config_id) /* out */
{
struct i965_driver_data * const i965 = i965_driver_data(ctx);
struct object_config *obj_config;
int configID;
int i;
VAStatus vaStatus;
vaStatus = i965_validate_config(ctx, profile, entrypoint);
if (VA_STATUS_SUCCESS != vaStatus) {
return vaStatus;
}
<snip>
i965_validate_config() returns VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT because it gets tripped up in the logic for the final else if for VP9.2.
static VAStatus
i965_validate_config(VADriverContextP ctx, VAProfile profile,
VAEntrypoint entrypoint)
{
struct i965_driver_data * const i965 = i965_driver_data(ctx);
VAStatus va_status;
/* Validate profile & entrypoint */
switch (profile) {
<snip>
case VAProfileVP9Profile0:
case VAProfileVP9Profile2:
if ((HAS_VP9_DECODING_PROFILE(i965, profile)) &&
(entrypoint == VAEntrypointVLD)) {
va_status = VA_STATUS_SUCCESS;
} else if ((HAS_VP9_ENCODING_PROFILE(i965, profile)) &&
(entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
} else if ((HAS_LP_VP9_ENCODING(i965) &&
profile == VAProfileVP9Profile0 &&
entrypoint == VAEntrypointEncSliceLP)) {
va_status = VA_STATUS_SUCCESS;
} else if (profile == VAProfileVP9Profile0 &&
entrypoint == VAEntrypointVLD &&
i965->wrapper_pdrvctx) {
va_status = VA_STATUS_SUCCESS;
} else if (!HAS_VP9_DECODING_PROFILE(i965, profile) &&
!HAS_VP9_ENCODING(i965) &&
!HAS_LP_VP9_ENCODING(i965) &&
!i965->wrapper_pdrvctx) {
va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
break;
default:
va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
break;
}
return va_status;
}
Specifically the following else if is not satisfied because i965->wrapper_pdrvctx is set. The wrapper context is set because libva-intel-driver is built with USE=hybrid_codec.
} else if (!HAS_VP9_DECODING_PROFILE(i965, profile) &&
!HAS_VP9_ENCODING(i965) &&
!HAS_LP_VP9_ENCODING(i965) &&
!i965->wrapper_pdrvctx) {
va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
Additional logging for the above else if.
localhost ~ # /usr/bin/test_va_api --gtest_filter=*CreateConfigWithAttributes/210
Note: Google Test filter = *CreateConfigWithAttributes/210
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from GetCreateConfig/VAAPIGetCreateConfig
[ RUN ] GetCreateConfig/VAAPIGetCreateConfig.CreateConfigWithAttributes/210
libva info: VA-API version 1.13.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_13
libva info: va_openDriver() returns 0
164 getSupportStatus searching for profile=21:VAProfileVP9Profile2
62 CreateConfigWithAttributes expectedStatus=12 profile=21:VAProfileVP9Profile2 entrypoint=1:VAEntrypointVLD
66 CreateConfigWithAttributes calling createConfig()
878 i965_validate_config inside case VAProfileVP9Profile0/2 profile=21
879 !HAS_VP9_DECODING_PROFILE(i965, profile)=1
880 !HAS_VP9_ENCODING(i965)=1
881 !HAS_LP_VP9_ENCODING(i965)=1
882 !i965->wrapper_pdrvctx=0
1388 i965_CreateConfig i965_validate_config() returned 13
test_va_api_fixture.cpp:229: Failure
Expected: VaapiStatus(expectation)
Which is: VA_STATUS_ERROR_UNSUPPORTED_PROFILE
To be equal to: VaapiStatus(vaCreateConfig(m_vaDisplay, profile, entrypoint, (attribs.size() != 0 ? const_cast<VAConfigAttrib*>(attribs.data()) : __null), attribs.size(), &m_configID))
Which is: VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT
profile = 21:VAProfileVP9Profile2
entrypoint = 1:VAEntrypointVLD
numAttribs = 0
68 CreateConfigWithAttributes createConfig() returned
[ FAILED ] GetCreateConfig/VAAPIGetCreateConfig.CreateConfigWithAttributes/210,
Hi @uartie when you get a minute could you take a look?
Hi friends, the following test cases have been failing on BSW and BDW Chromebooks. These two chipsets are built with the hybrid_codec enabled.