From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
To: "Santhosh Reddy, Guddati" <santhosh.reddy.guddati@intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] tests/kms_pipe_crc_basic: Add tests for supported formats
Date: Tue, 18 Jun 2024 15:21:52 +0300 [thread overview]
Message-ID: <2103b1f9-2025-4fe6-823f-a8bcac66337d@gmail.com> (raw)
In-Reply-To: <20240618104242.205236-1-santhosh.reddy.guddati@intel.com>
On 18.6.2024 13.42, Santhosh Reddy, Guddati wrote:
> Current kms_pipe_crc_basic supports crc check for planar formats like NV12 and
> XRGB8888, added subtest to validate crc for all the supported formats
This sound like what kms_plane pixel format tests already do. Also this
subtest overall seems to be in wrong place, kms_pipe_crc_basic is to
"Tests behaviour of CRC" like it says at top of the file and not to test
pixel formats.
How does this differ from already available pixel format tests on kms_plane?
/Juha-Pekka
> ---
> tests/kms_pipe_crc_basic.c | 61 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 61 insertions(+)
>
> diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
> index 0c19745bc..b8a0689e4 100644
> --- a/tests/kms_pipe_crc_basic.c
> +++ b/tests/kms_pipe_crc_basic.c
> @@ -82,6 +82,11 @@
> * CRTC does not cause issues.
> */
>
> +/**
> + * SUBTEST: compare-crc-sanitycheck-supported-formats
> + * Description: Basic sanity check for CRC mismatches with supported formats.
> + */
> +
> static bool extended;
> static enum pipe active_pipes[IGT_MAX_PIPES];
> static uint32_t last_pipe;
> @@ -357,6 +362,33 @@ static bool pipe_output_combo_valid(igt_display_t *display,
>
> data_t data = {0, };
>
> +/**
> + * @brief Retrieves the supported formats for a given output and pipe.
> + *
> + * This function returns an array of supported formats for a specific output and pipe.
> + *
> + * @param output The output for which to retrieve the supported formats.
> + * @param count A pointer to store the number of supported formats.
> + * @param pipe The pipe for which to retrieve the supported formats.
> + *
> + * @return An array of supported formats for the given output and pipe.
> + */
> +static uint32_t* get_supported_formats(igt_output_t *output, uint32_t *count, enum pipe pipe)
> +{
> + igt_plane_t *primary;
> + uint32_t *formats = NULL;
> +
> + igt_output_set_pipe(output, pipe);
> + primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> +
> + *count = primary->format_mod_count;
> + formats = (uint32_t *) malloc(sizeof(uint32_t) * (*count + 1));
> + for (uint32_t i = 0; i < *count; i++) {
> + formats[i] = primary->formats[i];
> + }
> + return formats;
> +}
> +
> static int opt_handler(int opt, int opt_index, void *_data)
> {
> switch (opt) {
> @@ -377,6 +409,8 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL)
> {
> enum pipe pipe;
> igt_output_t *output;
> + uint32_t *supported_formats = NULL;
> + uint32_t count = 0;
> struct {
> const char *name;
> unsigned flags;
> @@ -498,6 +532,33 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL)
> }
> }
>
> + igt_describe("Basic sanity check for CRC mismatches with supported formats");
> + igt_subtest_with_dynamic("compare-crc-sanitycheck-supported-formats") {
> + for_each_pipe_with_single_output(&data.display, pipe, output) {
> + if (simulation_constraint(pipe))
> + continue;
> +
> + if(!pipe_output_combo_valid(&data.display, pipe, output))
> + continue;
> +
> + supported_formats = get_supported_formats(output, &count, pipe);
> + for (i=0; i<count; i++) {
> +
> + // Skip the formats that are not supported
> + if (supported_formats[i] == DRM_FORMAT_NV12 || supported_formats[i] == DRM_FORMAT_XRGB8888 \
> + || supported_formats[i] == DRM_FORMAT_C8) {
> + igt_info("Skipping format "IGT_FORMAT_FMT" \n", IGT_FORMAT_ARGS(supported_formats[i]));
> + continue;
> + }
> +
> + igt_info("Testing format "IGT_FORMAT_FMT" \n", IGT_FORMAT_ARGS(supported_formats[i]));
> + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), output->name) {
> + test_compare_crc(&data, pipe, output, supported_formats[i]);
> + }
> + }
> + }
> + }
> +
> igt_fixture {
> igt_display_fini(&data.display);
> drm_close_driver(data.drm_fd);
next prev parent reply other threads:[~2024-06-18 12:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 5:26 [PATCH i-g-t] add tests to check crc for supported formats Santhosh Reddy Guddati
2024-06-18 7:35 ` Kamil Konieczny
2024-06-18 10:42 ` [PATCH i-g-t] tests/kms_pipe_crc_basic: Add tests " Santhosh Reddy, Guddati
2024-06-18 12:21 ` Juha-Pekka Heikkila [this message]
2024-06-18 10:57 ` ✓ CI.xeBAT: success for add tests to check crc " Patchwork
2024-06-18 11:09 ` ✓ Fi.CI.BAT: " Patchwork
2024-06-18 16:22 ` ✓ Fi.CI.BAT: success for add tests to check crc for supported formats (rev2) Patchwork
2024-06-18 16:26 ` ✓ CI.xeBAT: " Patchwork
2024-06-18 17:16 ` ✓ Fi.CI.IGT: success for add tests to check crc for supported formats Patchwork
2024-06-18 22:10 ` ✗ CI.xeFULL: failure " Patchwork
2024-06-19 2:34 ` ✗ Fi.CI.IGT: failure for add tests to check crc for supported formats (rev2) Patchwork
2024-06-19 5:24 ` ✗ CI.xeFULL: " 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=2103b1f9-2025-4fe6-823f-a8bcac66337d@gmail.com \
--to=juhapekka.heikkila@gmail.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=santhosh.reddy.guddati@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