From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Kunal Joshi <kunal1.joshi@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v2 2/2] tests/kms_chamelium: Add support to validate RGB/YUV pixel formats
Date: Thu, 5 Mar 2020 18:50:10 +0200 [thread overview]
Message-ID: <20200305165010.GO13686@intel.com> (raw)
In-Reply-To: <20200305084238.GB4267@intel.com>
On Thu, Mar 05, 2020 at 02:12:38PM +0530, Kunal Joshi wrote:
> On 2020-03-05 at 15:01:15 +0200, Ville Syrjälä wrote:
> > On Thu, Mar 05, 2020 at 09:03:38AM +0530, Kunal Joshi wrote:
> > > Currently, only hard coded pixel formats are validated which are not
> > > generic for all the platforms which leads to SKIPS.
> > > Added support to validate only those pixel formats which are supported by
> > > platform. Both RGB and YUV pixel formats are covered.
> > >
> > > Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
> > > ---
> > > tests/kms_chamelium.c | 140 +++++++++++++++++++-------------------------------
> > > 1 file changed, 54 insertions(+), 86 deletions(-)
> > >
> > > diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> > > index 5c4a189..5c96017 100644
> > > --- a/tests/kms_chamelium.c
> > > +++ b/tests/kms_chamelium.c
> > > @@ -2612,6 +2612,14 @@ static const struct edid *get_edid(enum test_edid edid)
> > > if (chamelium_port_get_type(port) == \
> > > DRM_MODE_CONNECTOR_ ## type__)
> > >
> > > +#define connector_subtest_start(name__, type__) \
> > > + igt_subtest_with_dynamic(name__) \
> > > + for_each_port(p, port) \
> > > + if (chamelium_port_get_type(port) == \
> > > + DRM_MODE_CONNECTOR_ ## type__) {
> > > +
> > > +#define connector_subtest_end }
> > > +
> > > static data_t data;
> > >
> > > IGT_TEST_DESCRIPTION("Tests requiring a Chamelium board");
> > > @@ -2817,54 +2825,29 @@ igt_main
> > > CHAMELIUM_CHECK_CRC, 3);
> > >
> > > igt_describe(test_display_one_mode_desc);
> > > - connector_subtest("hdmi-crc-argb8888", HDMIA)
> > > - test_display_one_mode(&data, port, DRM_FORMAT_ARGB8888,
> > > - CHAMELIUM_CHECK_CRC, 1);
> > > -
> > > - igt_describe(test_display_one_mode_desc);
> > > - connector_subtest("hdmi-crc-abgr8888", HDMIA)
> > > - test_display_one_mode(&data, port, DRM_FORMAT_ABGR8888,
> > > - CHAMELIUM_CHECK_CRC, 1);
> > > -
> > > - igt_describe(test_display_one_mode_desc);
> > > - connector_subtest("hdmi-crc-xrgb8888", HDMIA)
> > > - test_display_one_mode(&data, port, DRM_FORMAT_XRGB8888,
> > > - CHAMELIUM_CHECK_CRC, 1);
> > > -
> > > - igt_describe(test_display_one_mode_desc);
> > > - connector_subtest("hdmi-crc-xbgr8888", HDMIA)
> > > - test_display_one_mode(&data, port, DRM_FORMAT_XBGR8888,
> > > - CHAMELIUM_CHECK_CRC, 1);
> > > -
> > > - igt_describe(test_display_one_mode_desc);
> > > - connector_subtest("hdmi-crc-rgb888", HDMIA)
> > > - test_display_one_mode(&data, port, DRM_FORMAT_RGB888,
> > > - CHAMELIUM_CHECK_CRC, 1);
> > > -
> > > - igt_describe(test_display_one_mode_desc);
> > > - connector_subtest("hdmi-crc-bgr888", HDMIA)
> > > - test_display_one_mode(&data, port, DRM_FORMAT_BGR888,
> > > - CHAMELIUM_CHECK_CRC, 1);
> > > -
> > > - igt_describe(test_display_one_mode_desc);
> > > - connector_subtest("hdmi-crc-rgb565", HDMIA)
> > > - test_display_one_mode(&data, port, DRM_FORMAT_RGB565,
> > > - CHAMELIUM_CHECK_CRC, 1);
> > > -
> > > - igt_describe(test_display_one_mode_desc);
> > > - connector_subtest("hdmi-crc-bgr565", HDMIA)
> > > - test_display_one_mode(&data, port, DRM_FORMAT_BGR565,
> > > - CHAMELIUM_CHECK_CRC, 1);
> > > -
> > > - igt_describe(test_display_one_mode_desc);
> > > - connector_subtest("hdmi-crc-argb1555", HDMIA)
> > > - test_display_one_mode(&data, port, DRM_FORMAT_ARGB1555,
> > > - CHAMELIUM_CHECK_CRC, 1);
> > > -
> > > - igt_describe(test_display_one_mode_desc);
> > > - connector_subtest("hdmi-crc-xrgb1555", HDMIA)
> > > - test_display_one_mode(&data, port, DRM_FORMAT_XRGB1555,
> > > - CHAMELIUM_CHECK_CRC, 1);
> > > + connector_subtest_start("hdmi-rgb-pixel-format", HDMIA)
> > > + int k;
> > > + igt_output_t *output;
> > > + igt_plane_t *primary;
> > > +
> > > + output = prepare_output(&data, port, TEST_EDID_BASE);
> > > + primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> > > + igt_assert(primary);
> > > +
> > > + for (k = 0; k < primary->format_mod_count; k++) {
> > > + if (!igt_fb_supported_format(primary->formats[k]))
> > > + continue;
> > > +
> > > + if ((igt_format_is_yuv(primary->formats[k]) ||
> > > + primary->modifiers[k] != LOCAL_DRM_FORMAT_MOD_NONE))
> > > + continue;
> > > +
> > > + igt_dynamic_f("testing-format-%c%c%c%c", IGT_FORMAT_ARGS_CODE(primary->formats[k]))
> >
> > We have a igt_format_str() which is probably better for stuff like this.
> >
>
> Thanks ville for pointing that out
> I tried using igt_format_str()
> but it doesn't seem to support that i tried it like below
>
> igt_dynamic_f("%s",igt_format_str("testing-format-%c%c%c%c",
> IGT_FORMAT_ARGS_CODE(primary->formats[k]))
I don't know what you're trying to do there.
igt_dynamic_f("testing-format-%s", igt_format_str(format))
or whatever.
--
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:[~2020-03-05 16:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-05 3:33 [igt-dev] [PATCH i-g-t v2 0/2] Test platform supported pixel formats through chamelium Kunal Joshi
2020-03-05 3:33 ` [igt-dev] [PATCH i-g-t v2 1/2] lib/igt_fb: Added macro to retrieve char code of format Kunal Joshi
2020-03-05 3:33 ` [igt-dev] [PATCH i-g-t v2 2/2] tests/kms_chamelium: Add support to validate RGB/YUV pixel formats Kunal Joshi
2020-03-05 13:01 ` Ville Syrjälä
2020-03-05 8:42 ` Kunal Joshi
2020-03-05 16:50 ` Ville Syrjälä [this message]
2020-03-06 0:09 ` Kunal Joshi
2020-03-05 11:44 ` [igt-dev] ✓ Fi.CI.BAT: success for Test platform supported pixel formats through chamelium. (rev2) Patchwork
2020-03-06 0:01 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=20200305165010.GO13686@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kunal1.joshi@intel.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