<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;" align="Left">
[AMD Official Use Only - General]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I think the idea is to avoid wasting of HW resources when it's not visible to end-users. If the check is removed in driver there will be other errors since the driver is not designed to handle this.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
If it is not visible to end-users, current AMD driver behaviours are more optimal in IMHO.</div>
<div id="appendonsend"></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>From:</b> Mark Yacoub <markyacoub@chromium.org><br>
<b>Sent:</b> 09 May 2022 10:21<br>
<b>To:</b> Hung, Alex <Alex.Hung@amd.com><br>
<b>Cc:</b> igt-dev@lists.freedesktop.org <igt-dev@lists.freedesktop.org>; markyacoub@google.com <markyacoub@google.com><br>
<b>Subject:</b> Re: [igt-dev] [PATCH 1/2 i-g-t][V2] tests/kms_universal_plane: Skip off screen universal calls on AMD devices</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Mon, May 9, 2022 at 11:51 AM Alex Hung <alex.hung@amd.com> wrote:<br>
><br>
> amdgpu_dm intentionally blocks planes outside the screen in the function<br>
> "dm_plane_helper_check_state" and returns -EINVAL. As a results, this<br>
do you know why it intentionally does that? What happens if you remove<br>
this check? Maybe AMD shouldn't check for it? I'm thinking that<br>
ideally we don't want drivers to have special handling when it's not<br>
needed and for KMS tests to become a standard for userspace.<br>
> piece of code should be skipped on AMD devices.<br>
><br>
> Signed-off-by: Alex Hung <alex.hung@amd.com><br>
> ---<br>
>  tests/kms_universal_plane.c | 22 ++++++++++++----------<br>
>  1 file changed, 12 insertions(+), 10 deletions(-)<br>
><br>
> diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c<br>
> index 3cb6d704..3a3667e6 100644<br>
> --- a/tests/kms_universal_plane.c<br>
> +++ b/tests/kms_universal_plane.c<br>
> @@ -242,16 +242,18 @@ functional_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)<br>
>         igt_display_commit2(display, COMMIT_LEGACY);<br>
><br>
>         /* Step 14: Universal API, set primary completely offscreen (CRC 9) */<br>
> -       igt_assert(drmModeSetPlane(data->drm_fd, primary->drm_plane->plane_id,<br>
> -                                  output->config.crtc->crtc_id,<br>
> -                                  test.blue_fb.fb_id, 0,<br>
> -                                  9000, 9000,<br>
> -                                  test.mode->hdisplay,<br>
> -                                  test.mode->vdisplay,<br>
> -                                  IGT_FIXED(0,0), IGT_FIXED(0,0),<br>
> -                                  IGT_FIXED(test.mode->hdisplay,0),<br>
> -                                  IGT_FIXED(test.mode->vdisplay,0)) == 0);<br>
> -       igt_pipe_crc_collect_crc(test.pipe_crc, &test.crc_9);<br>
> +       if (!is_amdgpu_device(data->drm_fd)) {<br>
> +               igt_assert(drmModeSetPlane(data->drm_fd, primary->drm_plane->plane_id,<br>
> +                                          output->config.crtc->crtc_id,<br>
> +                                          test.blue_fb.fb_id, 0,<br>
> +                                          9000, 9000,<br>
> +                                          test.mode->hdisplay,<br>
> +                                          test.mode->vdisplay,<br>
> +                                          IGT_FIXED(0,0), IGT_FIXED(0,0),<br>
> +                                          IGT_FIXED(test.mode->hdisplay,0),<br>
> +                                          IGT_FIXED(test.mode->vdisplay,0)) == 0);<br>
> +               igt_pipe_crc_collect_crc(test.pipe_crc, &test.crc_9);<br>
> +       }<br>
><br>
>         /*<br>
>          * Step 15: Explicitly disable primary after it's already been<br>
> --<br>
> 2.25.1<br>
><br>
</div>
</span></font></div>
</div>
</body>
</html>