<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="ltr">
<div></div>
<div>
<div>Nidhi is working on it.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Thanks</div>
<div dir="ltr">Bhanu</div>
<div id="ms-outlook-mobile-signature" dir="ltr">
<div></div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>పంపినవారు:</b> Ville Syrjälä <ville.syrjala@linux.intel.com><br>
<b>పంపినవి:</b> Friday, October 28, 2022 1:48:03 AM<br>
<b>గ్రహీత:</b> igt-dev@lists.freedesktop.org <igt-dev@lists.freedesktop.org><br>
<b>Cc:</b> Gupta, Nidhi1 <nidhi1.gupta@intel.com>; Modem, Bhanuprakash <bhanuprakash.modem@intel.com><br>
<b>విషయం:</b> Re: [PATCH i-g-t 3/3] Revert "tests/kms_invalid_mode: Test Cleanup"</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Fri, Oct 07, 2022 at 04:40:29PM +0300, Ville Syrjala wrote:<br>
> From: Ville Syrjälä <ville.syrjala@linux.intel.com><br>
> <br>
> This reverts commit 6725767a84109e934ca138d94df0482386c44532.<br>
> <br>
> This was no cleanup. It does fifteen different things and<br>
> in the process flat out breaks the test at least on all<br>
> non-atomic drivers/platforms.<br>
> <br>
> Cc: Nidhi Gupta <nidhi1.gupta@intel.com><br>
> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com><br>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com><br>
<br>
Is anyone going to do anything about this or do I just push the<br>
reverts?<br>
<br>
> ---<br>
> tests/kms_invalid_mode.c | 39 ++++++++++++++++++++++++---------------<br>
> 1 file changed, 24 insertions(+), 15 deletions(-)<br>
> <br>
> diff --git a/tests/kms_invalid_mode.c b/tests/kms_invalid_mode.c<br>
> index 21ee91abf54b..0287ee02c1c4 100644<br>
> --- a/tests/kms_invalid_mode.c<br>
> +++ b/tests/kms_invalid_mode.c<br>
> @@ -35,6 +35,7 @@ struct _data {<br>
> enum pipe pipe;<br>
> igt_display_t display;<br>
> igt_output_t *output;<br>
> + drmModeResPtr res;<br>
> int max_dotclock;<br>
> bool (*adjust_mode)(data_t *data, drmModeModeInfoPtr mode);<br>
> };<br>
> @@ -181,29 +182,35 @@ static void<br>
> test_output(data_t *data)<br>
> {<br>
> igt_output_t *output = data->output;<br>
> + drmModeModeInfo mode;<br>
> struct igt_fb fb;<br>
> int ret;<br>
> - drmModeModeInfo *mode;<br>
> + uint32_t crtc_id;<br>
> <br>
> - igt_output_set_pipe(output, data->pipe);<br>
> + /*<br>
> + * FIXME test every mode we have to be more<br>
> + * sure everything is really getting rejected?<br>
> + */<br>
> + mode = *igt_output_get_mode(output);<br>
> + igt_require(data->adjust_mode(data, &mode));<br>
> <br>
> - igt_create_fb(data->drm_fd, 512, 512, DRM_FORMAT_XRGB8888,<br>
> + igt_create_fb(data->drm_fd,<br>
> + max_t(uint16_t, mode.hdisplay, 64),<br>
> + max_t(uint16_t, mode.vdisplay, 64),<br>
> + DRM_FORMAT_XRGB8888,<br>
> DRM_FORMAT_MOD_LINEAR,<br>
> &fb);<br>
> <br>
> - for_each_connector_mode(output) {<br>
> - mode = &output->config.connector->modes[j__];<br>
> - igt_require(data->adjust_mode(data, mode));<br>
> - igt_output_override_mode(output, mode);<br>
> - ret = igt_display_try_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);<br>
> - igt_assert(ret == -EINVAL);<br>
> - }<br>
> + kmstest_unset_all_crtcs(data->drm_fd, data->res);<br>
> +<br>
> + crtc_id = data->display.pipes[data->pipe].crtc_id;<br>
> +<br>
> + ret = drmModeSetCrtc(data->drm_fd, crtc_id,<br>
> + fb.fb_id, 0, 0,<br>
> + &output->id, 1, &mode);<br>
> + igt_assert_lt(ret, 0);<br>
> <br>
> igt_remove_fb(data->drm_fd, &fb);<br>
> - igt_output_override_mode(output, NULL);<br>
> - /*unset_all_crtcs*/<br>
> - igt_display_reset(&data->display);<br>
> - igt_display_commit(&data->display);<br>
> }<br>
> <br>
> static int i915_max_dotclock(data_t *data)<br>
> @@ -283,10 +290,11 @@ igt_main<br>
> kmstest_set_vt_graphics_mode();<br>
> <br>
> igt_display_require(&data.display, data.drm_fd);<br>
> + data.res = drmModeGetResources(data.drm_fd);<br>
> + igt_assert(data.res);<br>
> <br>
> data.max_dotclock = i915_max_dotclock(&data);<br>
> igt_info("Max dotclock: %d kHz\n", data.max_dotclock);<br>
> - igt_display_require_output(&data.display);<br>
> }<br>
> <br>
> igt_describe("Make sure all modesets are rejected when the requested mode is invalid");<br>
> @@ -306,5 +314,6 @@ igt_main<br>
> igt_fixture {<br>
> igt_display_fini(&data.display);<br>
> igt_reset_connectors();<br>
> + drmModeFreeResources(data.res);<br>
> }<br>
> }<br>
> -- <br>
> 2.35.1<br>
<br>
-- <br>
Ville Syrjälä<br>
Intel<br>
</div>
</span></font></div>
</body>
</html>