public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v2 2/6] tests/i915/kms_dsc: Add plane_format as struct data_t member
Date: Thu,  2 Feb 2023 12:51:17 +0530	[thread overview]
Message-ID: <20230202072121.26153-3-swati2.sharma@intel.com> (raw)
In-Reply-To: <20230202072121.26153-1-swati2.sharma@intel.com>

plane_format is added as struct data_t member. Also, corresponding
changes are done to accommodate this change.

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 tests/i915/kms_dsc.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index 8f32ae950..af9466518 100644
--- a/tests/i915/kms_dsc.c
+++ b/tests/i915/kms_dsc.c
@@ -44,6 +44,7 @@ typedef struct {
 	uint32_t devid;
 	igt_display_t display;
 	struct igt_fb fb_test_pattern;
+	unsigned int plane_format;
 	igt_output_t *output;
 	int input_bpc;
 	int n_pipes;
@@ -108,7 +109,7 @@ static void test_cleanup(data_t *data)
 }
 
 /* re-probe connectors and do a modeset with DSC */
-static void update_display(data_t *data, enum dsc_test_type test_type, unsigned int plane_format)
+static void update_display(data_t *data, enum dsc_test_type test_type)
 {
 	bool enabled;
 	igt_plane_t *primary;
@@ -137,13 +138,13 @@ static void update_display(data_t *data, enum dsc_test_type test_type, unsigned
 
 	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
 
-	igt_skip_on(!igt_plane_has_format_mod(primary, plane_format,
+	igt_skip_on(!igt_plane_has_format_mod(primary, data->plane_format,
 		    DRM_FORMAT_MOD_LINEAR));
 
 	igt_create_pattern_fb(data->drm_fd,
 			      mode->hdisplay,
 			      mode->vdisplay,
-			      plane_format,
+			      data->plane_format,
 			      DRM_FORMAT_MOD_LINEAR,
 			      &data->fb_test_pattern);
 
@@ -184,6 +185,7 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
 	enum pipe pipe;
 
 	for_each_pipe_with_valid_output(display, pipe, output) {
+		data->plane_format = plane_format;
 		data->input_bpc = bpc;
 		data->output = output;
 		data->pipe = pipe;
@@ -201,12 +203,12 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
 			continue;
 
 		if (test_type == TEST_DSC_BPC)
-			snprintf(name, sizeof(name), "-%dbpc-%s", data->input_bpc, igt_format_str(plane_format));
+			snprintf(name, sizeof(name), "-%dbpc-%s", data->input_bpc, igt_format_str(data->plane_format));
 		else
-			snprintf(name, sizeof(name), "-%s", igt_format_str(plane_format));
+			snprintf(name, sizeof(name), "-%s", igt_format_str(data->plane_format));
 
 		igt_dynamic_f("pipe-%s-%s%s",  kmstest_pipe_name(data->pipe), data->output->name, name)
-			update_display(data, test_type, plane_format);
+			update_display(data, test_type);
 	}
 }
 
-- 
2.25.1

  parent reply	other threads:[~2023-02-02  7:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02  7:21 [igt-dev] [PATCH i-g-t v2 0/6] Enable VDSC output formats validation Swati Sharma
2023-02-02  7:21 ` [igt-dev] [PATCH i-g-t v2 1/6] lib/dsc: Fix return value Swati Sharma
2023-02-02  7:21 ` Swati Sharma [this message]
2023-02-02  7:21 ` [igt-dev] [PATCH i-g-t v2 3/6] tests/i915/kms_dsc: Remove pointless struct Swati Sharma
2023-02-03 12:29   ` Kamil Konieczny
2023-02-03 13:26     ` Swati Sharma
2023-02-02  7:21 ` [igt-dev] [PATCH i-g-t v2 4/6] tests/i915/kms_dsc: Make bpc_list static Swati Sharma
2023-02-02  7:21 ` [igt-dev] [PATCH i-g-t v2 5/6] lib/dsc: Add helpers for VDSC output format debugfs entry Swati Sharma
2023-02-03 12:39   ` Kamil Konieczny
2023-02-03 13:28     ` Swati Sharma
2023-02-02  7:21 ` [igt-dev] [PATCH i-g-t v2 6/6] tests/i915/kms_dsc: Enable validation for VDSC output formats Swati Sharma
2023-02-02  7:48 ` [igt-dev] ✓ Fi.CI.BAT: success for Enable VDSC output formats validation (rev2) Patchwork
2023-02-02 10:52 ` [igt-dev] [PATCH i-g-t v2 0/6] Enable VDSC output formats validation Hogander, Jouni
2023-02-03 10:53   ` Swati Sharma
2023-02-02 16:00 ` [igt-dev] ✓ Fi.CI.IGT: success for Enable VDSC output formats validation (rev2) 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=20230202072121.26153-3-swati2.sharma@intel.com \
    --to=swati2.sharma@intel.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