[igt-dev] [i-g-t 1/2] tests/kms_color: Fix multiple failures in deep-color tests
Karthik B S
karthik.b.s at intel.com
Thu Jul 14 09:16:33 UTC 2022
On 7/14/2022 1:44 PM, Bhanuprakash Modem wrote:
> This patch will sanitize the system state before starting the subtest.
> And also, preserve connector's mode to use all over the subtets, since
Typo: 'subtets'
> igt_display_reset() will clear it.
>
> Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/6198
> Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/4137
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
Reviewed-by: Karthik B S <karthik.b.s at intel.com>
> ---
> tests/kms_color.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_color.c b/tests/kms_color.c
> index 6ea721f1..8c15c7be 100644
> --- a/tests/kms_color.c
> +++ b/tests/kms_color.c
> @@ -839,6 +839,7 @@ run_deep_color_tests_for_pipe(data_t *data, enum pipe p)
> if (!panel_supports_deep_color(data->drm_fd, output->name))
> continue;
>
> + igt_display_reset(&data->display);
> igt_output_set_prop_value(output, IGT_CONNECTOR_MAX_BPC, 10);
> igt_output_set_pipe(output, p);
> igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> @@ -850,7 +851,10 @@ run_deep_color_tests_for_pipe(data_t *data, enum pipe p)
> data->color_depth = 10;
> data->drm_format = DRM_FORMAT_XRGB2101010;
> data->output = output;
> - data->mode = igt_output_get_mode(data->output);
> +
> + data->mode = malloc(sizeof(drmModeModeInfo));
> + igt_assert(data->mode);
> + memcpy(data->mode, igt_output_get_mode(data->output), sizeof(drmModeModeInfo));
>
> igt_dynamic_f("pipe-%s-%s-gamma", kmstest_pipe_name(p), output->name) {
> igt_display_reset(&data->display);
> @@ -884,6 +888,8 @@ run_deep_color_tests_for_pipe(data_t *data, enum pipe p)
> igt_assert(ret);
> }
>
> + free(data->mode);
> +
> break;
> }
>
More information about the igt-dev
mailing list