[igt-dev] [v4 04/10] tests/i915/kms_dsc: update if condition
Nautiyal, Ankit K
ankit.k.nautiyal at intel.com
Fri Jul 28 08:45:26 UTC 2023
On 7/28/2023 1:19 PM, Swati Sharma wrote:
> Check is_dsc_output_format_supported() iff test flag is set to
> OUTPUT_FORMAT.
>
> Signed-off-by: Swati Sharma <swati2.sharma at intel.com>
> ---
> tests/i915/kms_dsc.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
> index 7b9bae91a..266918f74 100644
> --- a/tests/i915/kms_dsc.c
> +++ b/tests/i915/kms_dsc.c
> @@ -238,8 +238,9 @@ static void test_dsc(data_t *data, uint32_t test_type, int bpc,
> if (!is_dsc_supported_by_sink(data->drm_fd, data->output))
> continue;
>
> - if (!is_dsc_output_format_supported(data->drm_fd, data->disp_ver,
> - data->output, data->output_format))
> + if ((test_type & TEST_DSC_OUTPUT_FORMAT) &&
> + (!is_dsc_output_format_supported(data->drm_fd, data->disp_ver,
> + data->output, data->output_format)))
> continue;
The change look good.
Makes sense to check for output format constraint, only when we are
forcing the output format.
>
> if (!check_gen11_dp_constraint(data->drm_fd, data->output, data->pipe))
Perhaps this check and the first check: is_dsc_output_format_supported
can be together.
Also realized that check_gen11_bpc_constraint which come later should
not be in the loop, as it does not depend on either pipe or output.
So lets move that outside the loop.
Regards,
Ankit
More information about the igt-dev
mailing list