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 v4 4/8] tests/i915/kms_dsc: Prep work for extending val support for VDSC YCbCr420
Date: Thu, 12 Jan 2023 13:05:33 +0530	[thread overview]
Message-ID: <20230112073537.27890-5-swati2.sharma@intel.com> (raw)
In-Reply-To: <20230112073537.27890-1-swati2.sharma@intel.com>

Functions are modified to accommodate changes for VDSC YCbCr420.

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 tests/i915/kms_dsc.c        | 21 +++++++++++++++------
 tests/i915/kms_dsc_helper.c |  4 ++--
 2 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index 22239122c..0bac9d26b 100644
--- a/tests/i915/kms_dsc.c
+++ b/tests/i915/kms_dsc.c
@@ -47,6 +47,7 @@ typedef struct {
 	igt_output_t *output;
 	int input_bpc;
 	int n_pipes;
+	int disp_ver;
 	enum pipe pipe;
 } data_t;
 
@@ -107,7 +108,8 @@ 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,
+			   unsigned int plane_format)
 {
 	bool enabled;
 	igt_plane_t *primary;
@@ -209,6 +211,12 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
 	}
 }
 
+static void run_test(data_t *data, enum dsc_test_type test_type, int bpc,
+		     unsigned int plane_format)
+{
+	test_dsc(data, test_type, bpc, plane_format);
+}
+
 igt_main
 {
 	data_t data = {};
@@ -217,11 +225,12 @@ igt_main
 	igt_fixture {
 		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
 		data.devid = intel_get_drm_devid(data.drm_fd);
+		data.disp_ver = intel_display_ver(data.devid);
 		kmstest_set_vt_graphics_mode();
 		igt_install_exit_handler(kms_dsc_exit_handler);
 		igt_display_require(&data.display, data.drm_fd);
 		igt_display_require_output(&data.display);
-		igt_require(intel_display_ver(data.devid) >= 11);
+		igt_require(data.disp_ver >= 11);
 		data.n_pipes = 0;
 		for_each_pipe(&data.display, i)
 			data.n_pipes++;
@@ -231,14 +240,14 @@ igt_main
 		     "by a connector by forcing DSC on all connectors that support it "
 		     "with default parameters");
 	igt_subtest_with_dynamic("basic-dsc")
-			test_dsc(&data, TEST_DSC_BASIC, 0, DRM_FORMAT_XRGB8888);
+			run_test(&data, TEST_DSC_BASIC, 0, DRM_FORMAT_XRGB8888);
 
 	igt_describe("Tests basic display stream compression functionality if supported "
 		     "by a connector by forcing DSC on all connectors that support it "
 		     "with default parameters and creating fb with diff formats");
 	igt_subtest_with_dynamic("dsc-with-formats") {
 		for (int k = 0; k < ARRAY_SIZE(format_list); k++)
-			test_dsc(&data, TEST_DSC_BASIC, 0, format_list[k].format);
+			run_test(&data, TEST_DSC_BASIC, 0, format_list[k].format);
 	}
 
 	igt_describe("Tests basic display stream compression functionality if supported "
@@ -246,7 +255,7 @@ igt_main
 		     "with certain input BPC for the connector");
 	igt_subtest_with_dynamic("dsc-with-bpc") {
 		for (int j = 0; j < ARRAY_SIZE(bpc_list); j++)
-			test_dsc(&data, TEST_DSC_BPC, bpc_list[j], DRM_FORMAT_XRGB8888);
+			run_test(&data, TEST_DSC_BPC, bpc_list[j], DRM_FORMAT_XRGB8888);
 	}
 
 	igt_describe("Tests basic display stream compression functionality if supported "
@@ -255,7 +264,7 @@ igt_main
 	igt_subtest_with_dynamic("dsc-with-bpc-formats") {
 		for (int j = 0; j < ARRAY_SIZE(bpc_list); j++) {
 			for (int k = 0; k < ARRAY_SIZE(format_list); k++) {
-				test_dsc(&data, TEST_DSC_BPC, bpc_list[j], format_list[k].format);
+				run_test(&data, TEST_DSC_BPC, bpc_list[j], format_list[k].format);
 			}
 		}
 	}
diff --git a/tests/i915/kms_dsc_helper.c b/tests/i915/kms_dsc_helper.c
index 3734b3444..1a11f84ef 100644
--- a/tests/i915/kms_dsc_helper.c
+++ b/tests/i915/kms_dsc_helper.c
@@ -14,7 +14,7 @@ void force_dsc_enable(int drmfd, igt_output_t *output)
 
 	igt_debug("Forcing DSC enable on %s\n", output->name);
 	ret = igt_force_dsc_enable(drmfd, output->name);
-	igt_assert_f(ret > 0, "debugfs_write failed");
+	igt_assert_f(ret > 0, "forcing dsc enable debugfs_write failed\n");
 }
 
 void force_dsc_enable_bpc(int drmfd, igt_output_t *output, int input_bpc)
@@ -24,7 +24,7 @@ void force_dsc_enable_bpc(int drmfd, igt_output_t *output, int input_bpc)
 	igt_debug("Forcing input DSC BPC to %d on %s\n",
 		  input_bpc, output->name);
 	ret = igt_force_dsc_enable_bpc(drmfd, output->name, input_bpc);
-	igt_assert_f(ret > 0, "debugfs_write failed");
+	igt_assert_f(ret > 0, "forcing input dsc bpc debugfs_write failed\n");
 }
 
 void save_force_dsc_en(int drmfd, igt_output_t *output)
-- 
2.25.1

  parent reply	other threads:[~2023-01-12  7:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12  7:35 [igt-dev] [PATCH i-g-t v4 0/8] VDSC YCbCr420 + Fractional BPP Swati Sharma
2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 1/8] lib/dsc: Move VDSC functions to separate lib file Swati Sharma
2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 2/8] Move wrapper functions from kms_dsc to kms_dsc_helper Swati Sharma
2023-01-13  7:55   ` Hogander, Jouni
2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 3/8] lib/dsc: Add helpers for VDSC YCbCr420 debugfs entry Swati Sharma
2023-01-13  8:17   ` Hogander, Jouni
2023-01-18 16:36     ` Swati Sharma
2023-01-20 11:02       ` Hogander, Jouni
2023-01-21  5:28         ` Swati Sharma
2023-01-12  7:35 ` Swati Sharma [this message]
2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 5/8] tests/i915/kms_dsc: Enable validation for VDSC YCbCr420 Swati Sharma
2023-01-13  8:29   ` Hogander, Jouni
2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 6/8] lib/dsc: Add helpers for VDSC Fractional BPP debugfs entry Swati Sharma
2023-01-13  8:31   ` Hogander, Jouni
2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 7/8] tests/i915/kms_dsc: Enable validation for VDSC Fractional BPP Swati Sharma
2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 8/8] tests/i915/kms_dsc: Add test summary Swati Sharma
2023-01-12  8:51 ` [igt-dev] ✗ GitLab.Pipeline: warning for VDSC YCbCr420 + Fractional BPP (rev3) Patchwork
2023-01-12 14:56 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-01-12 17:56 ` [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=20230112073537.27890-5-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