[igt-dev] [PATCH 2/2] tests/kms_writeback: Test cleanup
Jessica Zhang
quic_jesszhan at quicinc.com
Thu Sep 8 18:03:07 UTC 2022
Hi Nidhi,
On 9/8/2022 1:48 AM, Nidhi Gupta wrote:
> Sanitize the system state before starting the subtest.
>
> Signed-off-by: Nidhi Gupta <nidhi1.gupta at intel.com>
> ---
> tests/kms_writeback.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tests/kms_writeback.c b/tests/kms_writeback.c
> index 2c5421ce..79a5760f 100644
> --- a/tests/kms_writeback.c
> +++ b/tests/kms_writeback.c
> @@ -186,6 +186,7 @@ static int do_writeback_test(igt_output_t *output, uint32_t fb_id,
> {
> int ret;
> igt_display_t *display = output->display;
> + igt_display_reset(display);
I might not have communicated this clearly in the v1 comments, but
igt_display_reset() will undo all the setup done in the first
igt_fixture [1] and disable the CRTCs. Furthermore, it would cause the
commit in do_writeback_test() [2] to fail, since the CRTC would be
disabled. If you want to call igt_display_reset(), you'll have to re-do
the setup within that fixture.
Thanks,
Jessica Zhang
[1]
https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/tests/kms_writeback.c#L491
[2]
https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/tests/kms_writeback.c#L198
> struct kmstest_connector_config *config = &output->config;
>
> igt_output_set_prop_value(output, IGT_CONNECTOR_CRTC_ID, config->crtc->crtc_id);
> --
> 2.36.0
>
More information about the igt-dev
mailing list