From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Mark Yacoub <markyacoub@chromium.org>
Cc: igt-dev@lists.freedesktop.org, seanpaul@chromium.org,
petri.latvala@intel.com, Mark Yacoub <markyacoub@google.com>
Subject: Re: [igt-dev] [PATCH] tests/kms_addfb_basic: Test addfb2 with DRM_FORMAT_C8 only if supported.
Date: Thu, 8 Jul 2021 22:09:00 +0300 [thread overview]
Message-ID: <YOdNTDxptcNCTVDg@intel.com> (raw)
In-Reply-To: <20210707200346.1731702-1-markyacoub@chromium.org>
On Wed, Jul 07, 2021 at 04:03:46PM -0400, Mark Yacoub wrote:
> From: Mark Yacoub <markyacoub@google.com>
>
> [Why]
> Some devices such as Trogdor do not support DRM_FORMAT_C8 pixel format.
> Skip any addfb2 test on such devices that is expected to succeed such as
> subtest size-max.
>
> [How]
> Only run the check on devices with DRM_FORMAT_C8 support
>
> Tested on Trogdor.
>
> Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> ---
> tests/kms_addfb_basic.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
> index 91fb6ac9..20597b69 100644
> --- a/tests/kms_addfb_basic.c
> +++ b/tests/kms_addfb_basic.c
> @@ -411,6 +411,7 @@ static void size_tests(int fd)
> struct drm_mode_fb_cmd2 f_8 = {};
> struct drm_mode_fb_cmd2 *framebuffers[] = {&f, &f_16, &f_8};
> int i;
> + bool is_c8_format_supported = !is_msm_device(fd);
There is a igt_display_has_format_mod()
>
> f.width = 1024;
> f.height = 1024;
> @@ -440,17 +441,19 @@ static void size_tests(int fd)
> f_16.handles[0] = gem_bo;
> f_8.handles[0] = gem_bo;
>
> - igt_describe("Check if addfb2 call works with max size of buffer object");
> + igt_describe("Check if addfb2 call works with max size of buffer object");
> igt_subtest("size-max") {
> igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == 0);
> igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f.fb_id) == 0);
> f.fb_id = 0;
> igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f_16) == 0);
> igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f_16.fb_id) == 0);
> - f.fb_id = 0;
> - igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f_8) == 0);
> - igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f_8.fb_id) == 0);
> - f.fb_id = 0;
> + f_16.fb_id = 0;
> + if (is_c8_format_supported) {
> + igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f_8) == 0);
> + igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f_8.fb_id) == 0);
> + f_8.fb_id = 0;
> + }
> }
>
> f.width++;
> --
> 2.32.0.93.g670b81a890-goog
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
--
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2021-07-08 19:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-07 20:03 [igt-dev] [PATCH] tests/kms_addfb_basic: Test addfb2 with DRM_FORMAT_C8 only if supported Mark Yacoub
2021-07-07 20:50 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-07-08 0:34 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-07-08 19:09 ` Ville Syrjälä [this message]
2021-07-08 19:53 ` [igt-dev] [PATCH] " Mark Yacoub
2021-07-08 19:51 ` Mark Yacoub
2021-07-08 21:17 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_addfb_basic: Test addfb2 with DRM_FORMAT_C8 only if supported. (rev2) Patchwork
2021-07-09 9:47 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-07-09 15:05 ` [igt-dev] [PATCH v2] tests/kms_addfb_basic: Test addfb2 with DRM_FORMAT_C8 only if supported Mark Yacoub
2021-09-01 14:25 ` Petri Latvala
2021-07-09 15:42 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_addfb_basic: Test addfb2 with DRM_FORMAT_C8 only if supported. (rev3) Patchwork
2021-07-10 8:19 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-07-20 15:34 ` Mark Yacoub
2021-07-20 16:11 ` Vudum, Lakshminarayana
2021-07-20 15:56 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
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=YOdNTDxptcNCTVDg@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=markyacoub@chromium.org \
--cc=markyacoub@google.com \
--cc=petri.latvala@intel.com \
--cc=seanpaul@chromium.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