From: "Sharma, Swati2" <swati2.sharma@intel.com>
To: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_plane: Add debug prints for pixel format tests if couldn't use custom plane size
Date: Mon, 5 Jun 2023 20:55:29 +0530 [thread overview]
Message-ID: <89da414d-c72f-2f19-b320-294a7f8f3d4c@intel.com> (raw)
In-Reply-To: <20230602105001.7610-1-juhapekka.heikkila@gmail.com>
LGTM
Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
On 02-Jun-23 4:20 PM, Juha-Pekka Heikkila wrote:
> Moved check for setting 64x64 plane size for pixel format tests into its own
> function and added debug prints if couldn't use smaller than full mode size
> plane for testing.
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
> tests/kms_plane.c | 57 +++++++++++++++++++++++++++++------------------
> 1 file changed, 35 insertions(+), 22 deletions(-)
>
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index 90b68a47..dfc6a8c5 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -896,6 +896,40 @@ struct format_mod {
> uint32_t format;
> };
>
> +/*
> + * See if test can go use 64x64 plane size for testing. If driver is not
> + * reporting to be atomic, will not try to use 64x64 plane size.
> +*/
> +static void check_allowed_plane_size_64x64(data_t *data, igt_plane_t *plane,
> + uint64_t *width, uint64_t *height,
> + uint32_t format)
> +{
> + struct igt_fb test_fb;
> + int ret;
> +
> + if (!data->display.is_atomic) {
> + igt_debug("Not using 64x64 plane size on non-atomic platform\n");
> + return;
> + }
> +
> + igt_create_fb(data->drm_fd, 64, 64, format, DRM_FORMAT_MOD_LINEAR, &test_fb);
> + igt_plane_set_fb(plane, &test_fb);
> +
> + ret = igt_display_try_commit_atomic(&data->display,
> + DRM_MODE_ATOMIC_TEST_ONLY |
> + DRM_MODE_ATOMIC_ALLOW_MODESET,
> + NULL);
> + if (!ret) {
> + *width = test_fb.width;
> + *height = test_fb.height;
> + } else {
> + igt_debug("Not using 64x64 plane size, atomic commit did not "
> + "accept 64x64 plane size\n");
> + }
> +
> + igt_remove_fb(data->drm_fd, &test_fb);
> +}
> +
> static bool test_format_plane(data_t *data, enum pipe pipe,
> igt_output_t *output, igt_plane_t *plane, igt_fb_t *primary_fb)
> {
> @@ -944,28 +978,7 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
> IGT_FORMAT_ARGS(ref.format), IGT_MODIFIER_ARGS(ref.modifier),
> kmstest_pipe_name(pipe), plane->index);
>
> - if (data->display.is_atomic) {
> - struct igt_fb test_fb;
> - int ret;
> -
> - igt_create_fb(data->drm_fd, 64, 64, ref.format,
> - DRM_FORMAT_MOD_LINEAR, &test_fb);
> -
> - igt_plane_set_fb(plane, &test_fb);
> -
> - ret = igt_display_try_commit_atomic(&data->display,
> - DRM_MODE_ATOMIC_TEST_ONLY |
> - DRM_MODE_ATOMIC_ALLOW_MODESET,
> - NULL);
> - if (!ret) {
> - width = test_fb.width;
> - height = test_fb.height;
> - }
> -
> - igt_plane_set_fb(plane, clear_fb);
> -
> - igt_remove_fb(data->drm_fd, &test_fb);
> - }
> + check_allowed_plane_size_64x64(data, plane, &width, &height, ref.format);
>
> capture_format_crcs_single(data, pipe, plane, ref.format, ref.modifier,
> width, height, IGT_COLOR_YCBCR_BT709,
next prev parent reply other threads:[~2023-06-05 15:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 10:50 [igt-dev] [PATCH i-g-t] tests/kms_plane: Add debug prints for pixel format tests if couldn't use custom plane size Juha-Pekka Heikkila
2023-06-02 11:40 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-06-04 11:48 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-06-05 12:46 ` [igt-dev] [PATCH i-g-t] " Zbigniew Kempczyński
2023-06-05 15:25 ` Sharma, Swati2 [this message]
2023-06-05 15:27 ` Sharma, Swati2
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=89da414d-c72f-2f19-b320-294a7f8f3d4c@intel.com \
--to=swati2.sharma@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=juhapekka.heikkila@gmail.com \
/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