From: "Li, Sun peng (Leo)" <Sunpeng.Li@amd.com>
To: "Kazlauskas, Nicholas" <Nicholas.Kazlauskas@amd.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_plane_multiple: Commit state before remove_fb calls
Date: Mon, 19 Aug 2019 14:14:37 +0000 [thread overview]
Message-ID: <90d17513-a9d8-2fa4-ae38-7e8ab8768d99@amd.com> (raw)
In-Reply-To: <20190802172705.32446-1-nicholas.kazlauskas@amd.com>
On 2019-08-02 1:27 p.m., Nicholas Kazlauskas wrote:
> The kms_plane_multiple@* tests fail on amdgpu with a dmesg-warn due to
>
> "atomic remove_fb failed with -22"
> "WARNING: CPU: 6 PID: 183 at drivers/gpu/drm/drm_framebuffer.c:986"
>
> The call to drmModeRmFB essentially creates an atomic commit internally
> when we drop the last reference to the FB in IGT. This commit disables
> the plane associated with framebuffer.
>
> Since the planes are iterated by increasing index in IGT the last
> plane to have its framebuffer removed is the cursor plane on AMDGPU.
>
> On AMDGPU we can't enable the cursor plane without any active hardware
> planes (primary, overlay) since there is no dedicated cursor plane.
>
> The commits to release the overlay plane fail since it's the last
> remaining plane and the cursor plane is still active.
>
> The fix to the test is to just perform a commit that disables all 3
> planes at the same time before calling remove_fb.
>
> This improves performance enables support for drivers that don't
> support cursor planes being enabled without a primary or overlay.
>
> Cc: Leo Li <sunpeng.li@amd.com>
> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
Thanks,
Leo
> ---
> tests/kms_plane_multiple.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
> index 81ed45dd..255cd34a 100644
> --- a/tests/kms_plane_multiple.c
> +++ b/tests/kms_plane_multiple.c
> @@ -317,6 +317,8 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
> for_each_plane_on_pipe(&data->display, pipe, plane)
> igt_plane_set_fb(plane, NULL);
>
> + igt_display_commit2(&data->display, COMMIT_ATOMIC);
> +
> for (int x = 0; x < c; x++)
> igt_remove_fb(data->drm_fd, &data->fb[x]);
> } while (!err && c < n_planes);
> @@ -340,6 +342,8 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
> for_each_plane_on_pipe(&data->display, pipe, plane)
> igt_plane_set_fb(plane, NULL);
>
> + igt_display_commit2(&data->display, COMMIT_ATOMIC);
> +
> for (int x = 0; x < c; x++)
> igt_remove_fb(data->drm_fd, &data->fb[x]);
>
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
prev parent reply other threads:[~2019-08-19 14:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-02 17:27 [igt-dev] [PATCH i-g-t] tests/kms_plane_multiple: Commit state before remove_fb calls Nicholas Kazlauskas
2019-08-02 18:14 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-08-04 12:02 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-08-19 14:14 ` Li, Sun peng (Leo) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=90d17513-a9d8-2fa4-ae38-7e8ab8768d99@amd.com \
--to=sunpeng.li@amd.com \
--cc=Nicholas.Kazlauskas@amd.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox