<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Nirmala UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Sorry for the delay, I am working on it to fix it. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am trying to debug by replacing the atomic commit with legacy commit:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">diff --git a/tests/kms_invalid_mode.c b/tests/kms_invalid_mode.c<o:p></o:p></p>
<p class="MsoNormal">index f1c38669..08c1d001 100644<o:p></o:p></p>
<p class="MsoNormal">--- a/tests/kms_invalid_mode.c<o:p></o:p></p>
<p class="MsoNormal">+++ b/tests/kms_invalid_mode.c<o:p></o:p></p>
<p class="MsoNormal">@@ -197,6 +197,7 @@ test_output(data_t *data)<o:p></o:p></p>
<p class="MsoNormal"> igt_require(data->adjust_mode(data, mode));<o:p></o:p></p>
<p class="MsoNormal"> igt_output_override_mode(output, mode);<o:p></o:p></p>
<p class="MsoNormal">- ret = igt_display_try_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);<o:p></o:p></p>
<p class="MsoNormal">+ ret = igt_display_try_commit2(display, COMMIT_LEGACY);<o:p></o:p></p>
<p class="MsoNormal"> igt_assert(ret == -EINVAL);<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Nidhi<o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Modem, Bhanuprakash <bhanuprakash.modem@intel.com>
<br>
<b>Sent:</b> Friday, October 28, 2022 3:33 AM<br>
<b>To:</b> Ville Syrjälä <ville.syrjala@linux.intel.com>; igt-dev@lists.freedesktop.org<br>
<b>Cc:</b> Gupta, Nidhi1 <nidhi1.gupta@intel.com><br>
<b>Subject:</b> Re: [PATCH i-g-t 3/3] Revert "tests/kms_invalid_mode: Test Cleanup"<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">Nidhi is working on it.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Bhanu<o:p></o:p></p>
</div>
</div>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="font-family:"Nirmala UI",sans-serif;color:black">పంపినవారు</span></b><b><span style="color:black">:</span></b><span style="color:black"> Ville Syrjälä <</span><a href="mailto:ville.syrjala@linux.intel.com">ville.syrjala@linux.intel.com</a><span style="color:black">><br>
</span><b><span style="font-family:"Nirmala UI",sans-serif;color:black">పంపినవి</span></b><b><span style="color:black">:</span></b><span style="color:black"> Friday, October 28, 2022 1:48:03 AM<br>
</span><b><span style="font-family:"Nirmala UI",sans-serif;color:black">గ్రహీత</span></b><b><span style="color:black">:</span></b><span style="color:black">
</span><a href="mailto:igt-dev@lists.freedesktop.org">igt-dev@lists.freedesktop.org</a><span style="color:black"> <</span><a href="mailto:igt-dev@lists.freedesktop.org">igt-dev@lists.freedesktop.org</a><span style="color:black">><br>
<b>Cc:</b> Gupta, Nidhi1 <</span><a href="mailto:nidhi1.gupta@intel.com">nidhi1.gupta@intel.com</a><span style="color:black">>; Modem, Bhanuprakash <</span><a href="mailto:bhanuprakash.modem@intel.com">bhanuprakash.modem@intel.com</a><span style="color:black">><br>
</span><b><span style="font-family:"Nirmala UI",sans-serif;color:black">విషయం</span></b><b><span style="color:black">:</span></b><span style="color:black"> Re: [PATCH i-g-t 3/3] Revert "tests/kms_invalid_mode: Test Cleanup"</span>
<o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">On Fri, Oct 07, 2022 at 04:40:29PM +0300, Ville Syrjala wrote:<br>
> From: Ville Syrjälä <<a href="mailto:ville.syrjala@linux.intel.com">ville.syrjala@linux.intel.com</a>><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 <<a href="mailto:nidhi1.gupta@intel.com">nidhi1.gupta@intel.com</a>><br>
> Cc: Bhanuprakash Modem <<a href="mailto:bhanuprakash.modem@intel.com">bhanuprakash.modem@intel.com</a>><br>
> Signed-off-by: Ville Syrjälä <<a href="mailto:ville.syrjala@linux.intel.com">ville.syrjala@linux.intel.com</a>><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<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>