[PATCH] amdgpu/tests: Fix uvd encoder test failure
Kamil Konieczny
kamil.konieczny at linux.intel.com
Thu Feb 29 12:42:51 UTC 2024
Hi vitaly.prosyak,
On 2024-02-28 at 18:49:29 -0500, vitaly.prosyak at amd.com wrote:
> From: Vitaly Prosyak <vitaly.prosyak at amd.com>
>
> Combine the following sub-tests: creation, encoding
> session initialization, and destroy as a single sub-test. After
> the following change (1aa0ed3e02945fbbfe54183b60d0add06b1669d9
> Revert runner: Normalize test list entries that don't list subtests),
> and since we are using a custom job list list (job_list_from_test_list),
> and as a result every sub-test is launched as a separate program
> (i.e. 'execute_next_entry' is done 4 times), and even the launch is
> sequential after 'monitor_output', we had a failure due to resource
> sharing(amdgpu_bo_list_create) issues plus it is not expected behavior
> for the test. Before the indicated change all the sub-tests were launched
> as a single program.
>
> Cc: Christian Koenig <christian.koenig at amd.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: Michael Strawbridge <michael.strawbridge at amd.com>
> Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> Cc: Petri Latvala <adrinael at adrinael.net>
>
Don't put newline between Cc and s-o-b.
> Signed-off-by: Michael Strawbridge <michael.strawbridge at amd.com>
> Signed-off-by: Vitaly Prosyak <vitaly.prosyak at amd.com>
>
> ---
> tests/amdgpu/amd_uvd_enc.c | 28 +++++++++++++---------------
> 1 file changed, 13 insertions(+), 15 deletions(-)
>
> diff --git a/tests/amdgpu/amd_uvd_enc.c b/tests/amdgpu/amd_uvd_enc.c
> index e3e85522f..430a636f4 100644
> --- a/tests/amdgpu/amd_uvd_enc.c
> +++ b/tests/amdgpu/amd_uvd_enc.c
> @@ -292,6 +292,15 @@ amdgpu_uvd_enc_destroy(amdgpu_device_handle device_handle,
> free_resource(&context->enc.session);
> }
>
> +static void
> +amdgpu_uvd_enc_test(amdgpu_device_handle device, struct uvd_enc_context *context)
> +{
> + amdgpu_uvd_enc_create(device, context);
> + amdgpu_uvd_enc_session_init(device, context);
> + amdgpu_uvd_enc_encode(device, context);
> + amdgpu_uvd_enc_destroy(device, context);
> +}
> +
> igt_main
> {
> amdgpu_device_handle device;
> @@ -307,27 +316,16 @@ igt_main
> igt_require(err == 0);
> igt_info("Initialized amdgpu, driver version %d.%d\n",
> major, minor);
> + memset(&context, 0, sizeof(context));
> err = mmd_context_init(device, &context.uvd);
> igt_require(err == 0);
>
> igt_skip_on(!is_uvd_enc_enable(device));
> }
>
> - igt_describe("Test whether uvd enc is created");
> - igt_subtest("uvd_enc_create")
> - amdgpu_uvd_enc_create(device, &context);
> -
> - igt_describe("Test whether uvd enc session init");
> - igt_subtest("amdgpu_uvd_enc_session_init")
> - amdgpu_uvd_enc_session_init(device, &context);
> -
> - igt_describe("Test whether uvd enc encode");
> - igt_subtest("amdgpu_uvd_enc_encode")
> - amdgpu_uvd_enc_encode(device, &context);
> -
> - igt_describe("Test whether uvd enc is destroyed");
> - igt_subtest("uvd_enc_destroy")
> - amdgpu_uvd_enc_destroy(device, &context);
> + igt_describe("Test uvd session, encode, destroy");
> + igt_subtest("uvd_encoder")
> + amdgpu_uvd_enc_test(device, &context);
-- ^
It is better to add tab here:
igt_subtest("uvd_encoder")
amdgpu_uvd_enc_test(device, &context);
With this,
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
Regards,
Kamil
>
> igt_fixture {
> mmd_context_clean(device, &context.uvd);
> --
> 2.25.1
>
More information about the igt-dev
mailing list