All of lore.kernel.org
 help / color / mirror / Atom feed
From: Melissa Wen <melissa.srw@gmail.com>
To: igt-dev@lists.freedesktop.org
Cc: kernel-usp@googlegroups.com, aurabindo.pillai@amd.com,
	twoerner@gmail.com
Subject: [igt-dev] [PATCH i-g-t v2 2/2] test/kms_cursor_crc: update subtests descriptions and some comments
Date: Wed, 15 Jul 2020 13:50:30 -0300	[thread overview]
Message-ID: <8595b587995600c07bc28b2b449148092ca242a2.1594831260.git.melissa.srw@gmail.com> (raw)
In-Reply-To: <cover.1594831260.git.melissa.srw@gmail.com>

Add descriptions for some subtests and detail a little more the comments in
test_cursor_alpha.

Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
---
 tests/kms_cursor_crc.c | 37 ++++++++++++++++++++++++++++---------
 1 file changed, 28 insertions(+), 9 deletions(-)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 7e6b24cc..a6faa785 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -31,12 +31,13 @@
 
 
 IGT_TEST_DESCRIPTION(
-   "Use the display CRC support to validate cursor plane functionality. "
-   "The test will position the cursor plane either fully onscreen, "
-   "partially onscreen, or fully offscreen, using either a fully opaque "
-   "or fully transparent surface. In each case it then reads the PF CRC "
-   "and compares it with the CRC value obtained when the cursor plane "
-   "was disabled.");
+   "Use the display CRC support to validate cursor plane functionality. "\
+   "The test will position the cursor plane either fully onscreen, "\
+   "partially onscreen, or fully offscreen, using either a fully opaque "\
+   "or fully transparent surface. In each case, it enables the cursor plane "\
+   "and then reads the PF CRC (hardware test) and compares it with the CRC "\
+   "value obtained when the cursor plane was disabled and its drawing is "
+   "directly inserted on the PF by software.");
 
 #ifndef DRM_CAP_CURSOR_WIDTH
 #define DRM_CAP_CURSOR_WIDTH 0x8
@@ -483,7 +484,7 @@ static void test_cursor_alpha(data_t *data, double a)
 	int curw = data->curw;
 	int curh = data->curh;
 
-	/*alpha cursor fb*/
+	/*Alpha cursor fb with white color*/
 	fb_id = igt_create_fb(data->drm_fd, curw, curh,
 				    DRM_FORMAT_ARGB8888,
 				    LOCAL_DRM_FORMAT_MOD_NONE,
@@ -493,15 +494,16 @@ static void test_cursor_alpha(data_t *data, double a)
 	igt_paint_color_alpha(cr, 0, 0, curw, curh, 1.0, 1.0, 1.0, a);
 	igt_put_cairo_ctx(cr);
 
-	/*Hardware Test*/
+	/*Hardware Test - enable cursor and get PF CRC*/
 	cursor_enable(data);
 	igt_display_commit(display);
 	igt_wait_for_vblank(data->drm_fd, data->pipe);
 	igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &crc);
+
 	cursor_disable(data);
 	igt_remove_fb(data->drm_fd, &data->fb);
 
-	/*Software Test*/
+	/*Software Test - render cursor in software, drawn it directly on PF*/
 	cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
 	igt_paint_color_alpha(cr, 0, 0, curw, curh, 1.0, 1.0, 1.0, a);
 	igt_put_cairo_ctx(cr);
@@ -509,6 +511,8 @@ static void test_cursor_alpha(data_t *data, double a)
 	igt_display_commit(display);
 	igt_wait_for_vblank(data->drm_fd, data->pipe);
 	igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
+
+	/*Compare CRC from Hardware/Software tests*/
 	igt_assert_crc_equal(&crc, &ref_crc);
 
 	/*Clear Screen*/
@@ -686,13 +690,19 @@ static void run_tests_on_pipe(data_t *data, enum pipe pipe)
 		igt_require(data->output);
 	}
 
+        igt_describe("Create a maximum size cursor, then change the size in "\
+        "flight to smaller ones to see that the size is applied correctly.");
 	igt_subtest_f("pipe-%s-cursor-size-change", kmstest_pipe_name(pipe))
 		run_test(data, test_cursor_size,
 			 data->cursor_max_w, data->cursor_max_h);
 
+	igt_describe("Validates the composition of a fully opaque cursor "\
+	"plane, i.e., alpha channel equal to 1.0.");
 	igt_subtest_f("pipe-%s-cursor-alpha-opaque", kmstest_pipe_name(pipe))
 		run_test(data, test_cursor_opaque, data->cursor_max_w, data->cursor_max_h);
 
+	igt_describe("Validates the composition of a fully transparent cursor "\
+	"plane, i.e., alpha channel equal to 0.0.");
 	igt_subtest_f("pipe-%s-cursor-alpha-transparent", kmstest_pipe_name(pipe))
 		run_test(data, test_cursor_transparent, data->cursor_max_w, data->cursor_max_h);
 
@@ -726,15 +736,24 @@ static void run_tests_on_pipe(data_t *data, enum pipe pipe)
 		}
 
 		/* Using created cursor FBs to test cursor support */
+		igt_describe("Check if a given-size cursor is well-positioned inside the screen.");
 		igt_subtest_f("pipe-%s-cursor-%dx%d-onscreen", kmstest_pipe_name(pipe), w, h)
 			run_test(data, test_crc_onscreen, w, h);
+
+		igt_describe("Check if a given-size cursor is well-positioned outside the screen.");
 		igt_subtest_f("pipe-%s-cursor-%dx%d-offscreen", kmstest_pipe_name(pipe), w, h)
 			run_test(data, test_crc_offscreen, w, h);
+
+		igt_describe("Check the smooth and pixel-by-pixel given-size cursor movements on"\
+		"horizontal, vertical and diagonal.");
 		igt_subtest_f("pipe-%s-cursor-%dx%d-sliding", kmstest_pipe_name(pipe), w, h)
 			run_test(data, test_crc_sliding, w, h);
+
+		igt_describe("Check random placement of a cursor with given size.");
 		igt_subtest_f("pipe-%s-cursor-%dx%d-random", kmstest_pipe_name(pipe), w, h)
 			run_test(data, test_crc_random, w, h);
 
+		igt_describe("Check the rapid update of given-size cursor movements.");
 		igt_subtest_f("pipe-%s-cursor-%dx%d-rapid-movement", kmstest_pipe_name(pipe), w, h) {
 			run_test(data, test_rapid_movement, w, h);
 		}
-- 
2.27.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2020-07-15 16:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-15 16:49 [igt-dev] [PATCH i-g-t v2 0/2] minor improvements to the kms_cursor_crc doc and some comments cleanup Melissa Wen
2020-07-15 16:49 ` [igt-dev] [PATCH i-g-t v2 1/2] lib/igt_fb: change comments with fd description Melissa Wen
2020-07-15 16:50 ` Melissa Wen [this message]
2020-07-15 17:15 ` [igt-dev] ✓ Fi.CI.BAT: success for minor improvements to the kms_cursor_crc doc and some comments cleanup (rev2) Patchwork
2020-07-15 22:04 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-07-16 11:36   ` Arkadiusz Hiler
2020-07-16 11:48     ` Melissa Wen

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=8595b587995600c07bc28b2b449148092ca242a2.1594831260.git.melissa.srw@gmail.com \
    --to=melissa.srw@gmail.com \
    --cc=aurabindo.pillai@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kernel-usp@googlegroups.com \
    --cc=twoerner@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.