Skip to contentSkip to conversation

tests/kms_rotation_crc: Move platform checks to one place for non exhaust fence cases

PATCH Superseded Radhakrishna Sripada 2 participants 3 messages Apr 4, 2018

v4 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 tests/kms_rotation_crc: Move platform checks to one place for non exhaust fence cases

From: Anusha Srivatsa <[email protected]>

Cleanup the testcases by moving the platform checks to a single function.

The earlier version of the path is posted here [1]

v2: Make use of the property enums to get the supported rotations
v3: Move hardcodings to a single function(Ville)
v4: Include the cherryview exception for reflect subtest(Maarten)

[1]: https://patchwork.freedesktop.org/patch/209647/

Cc Radhakrishna Sripada <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Mika Kahola <[email protected]>
---
 tests/kms_rotation_crc.c | 35 ++++++++++++++++++++---------------
 1 file changed, 20 insertions(+), 15 deletions(-)
tests/kms_rotation_crc.c +20 -15
index 0cd5c6e..aeb6c73 100644
@@ -43,6 +43,7 @@ typedef struct {
 	uint32_t override_fmt;
 	uint64_t override_tiling;
 	int devid;
+	int gen;
 } data_t;
 
 typedef struct {
@@ -301,6 +302,17 @@ static void wait_for_pageflip(int fd)
 	igt_assert(drmHandleEvent(fd, &evctx) == 0);
 }
 
+static void igt_check_rotation(data_t *data)
+{
+	if (data->rotation & (IGT_ROTATION_90 | IGT_ROTATION_270))
+		igt_require(data->gen >= 9);
+	else if (data->rotation & IGT_REFLECT_X)
+		igt_require(data->gen >= 10 ||
+			    (IS_CHERRYVIEW(data->devid) && (data->rotation & IGT_ROTATION_0)));
+	else if (data->rotation & IGT_ROTATION_180)
+		igt_require(data->gen >= 4);
+}
+
 static void test_single_case(data_t *data, enum pipe pipe,
 			     igt_output_t *output, igt_plane_t *plane,
 			     enum rectangle_type rect,
@@ -369,15 +381,18 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
 
 	igt_display_require_output(display);
 
+	igt_check_rotation(data);
+
 	for_each_pipe_with_valid_output(display, pipe, output) {
 		igt_plane_t *plane;
 		int i, j;
 
-		if (IS_CHERRYVIEW(data->devid) && pipe != PIPE_B)
-			continue;
-
 		igt_output_set_pipe(output, pipe);
 
+		if (IS_CHERRYVIEW(data->devid) && (data->rotation & IGT_REFLECT_X) &&
+		    pipe != kmstest_pipe_to_index('B'))
+			continue;
+
 		plane = igt_output_get_plane_type(output, plane_type);
 		igt_require(igt_plane_has_prop(plane, IGT_PLANE_ROTATION));
 
@@ -538,14 +553,13 @@ igt_main
 	};
 
 	data_t data = {};
-	int gen = 0;
 
 	igt_skip_on_simulation();
 
 	igt_fixture {
 		data.gfx_fd = drm_open_driver_master(DRIVER_INTEL);
 		data.devid = intel_get_drm_devid(data.gfx_fd);
-		gen = intel_gen(data.devid);
+		data.gen = intel_gen(data.devid);
 
 		kmstest_set_vt_graphics_mode();
 
@@ -558,16 +572,12 @@ igt_main
 		igt_subtest_f("%s-rotation-%s",
 			      plane_test_str(subtest->plane),
 			      rot_test_str(subtest->rot)) {
-			igt_require(!(subtest->rot &
-				    (IGT_ROTATION_90 | IGT_ROTATION_270)) ||
-				    gen >= 9);
 			data.rotation = subtest->rot;
 			test_plane_rotation(&data, subtest->plane, false);
 		}
 	}
 
 	igt_subtest_f("sprite-rotation-90-pos-100-0") {
-		igt_require(gen >= 9);
 		data.rotation = IGT_ROTATION_90;
 		data.pos_x = 100,
 		data.pos_y = 0;
@@ -577,7 +587,6 @@ igt_main
 	data.pos_y = 0;
 
 	igt_subtest_f("bad-pixel-format") {
-		igt_require(gen >= 9);
 		data.rotation = IGT_ROTATION_90;
 		data.override_fmt = DRM_FORMAT_RGB565;
 		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY, true);
@@ -585,7 +594,6 @@ igt_main
 	data.override_fmt = 0;
 
 	igt_subtest_f("bad-tiling") {
-		igt_require(gen >= 9);
 		data.rotation = IGT_ROTATION_90;
 		data.override_tiling = LOCAL_I915_FORMAT_MOD_X_TILED;
 		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY, true);
@@ -596,9 +604,6 @@ igt_main
 		igt_subtest_f("primary-%s-reflect-x-%s",
 			      tiling_test_str(reflect_x->tiling),
 			      rot_test_str(reflect_x->rot)) {
-			igt_require(gen >= 10 ||
-				    (IS_CHERRYVIEW(data.devid) && reflect_x->rot == IGT_ROTATION_0
-				     && reflect_x->tiling == LOCAL_I915_FORMAT_MOD_X_TILED));
 			data.rotation = (IGT_REFLECT_X | reflect_x->rot);
 			data.override_tiling = reflect_x->tiling;
 			test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY, false);
@@ -613,7 +618,7 @@ igt_main
 		enum pipe pipe;
 		igt_output_t *output;
 
-		igt_require(gen >= 9);
+		igt_require(data.gen >= 9);
 		igt_display_require_output(&data.display);
 
 		for_each_pipe_with_valid_output(&data.display, pipe, output) {
Signature · 6 lines
2.7.4

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for tests/kms_rotation_crc: Move platform checks to one place for non exhaust fence cases (rev2)

== Series Details ==

== Series Details ==

Series: tests/kms_rotation_crc: Move platform checks to one place for non exhaust fence cases (rev2)
URL : https://patchwork.freedesktop.org/series/40553/
State : success

== Summary ==

IGT patchset tested on top of latest successful build cad5fc06f954546042a432202cbe7e5a20fe1132 tests/gem_eio: Add reset and unwedge stress testing

with latest DRM-Tip kernel build CI_DRM_4017
29940f138482 drm-tip: 2018y-04m-03d-13h-23m-36s UTC integration manifest

No testlist changes.

---- Known issues:

Test kms_pipe_crc_basic:

        Subgroup hang-read-crc-pipe-c:
                fail       -> PASS       (fi-skl-6700k2) fdo#103191

fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191

fi-bdw-5557u     total:285  pass:264  dwarn:0   dfail:0   fail:0   skip:21  time:431s
fi-bdw-gvtdvm    total:285  pass:261  dwarn:0   dfail:0   fail:0   skip:24  time:443s
fi-blb-e6850     total:285  pass:220  dwarn:1   dfail:0   fail:0   skip:64  time:382s
fi-bsw-n3050     total:285  pass:239  dwarn:0   dfail:0   fail:0   skip:46  time:548s
fi-bwr-2160      total:285  pass:180  dwarn:0   dfail:0   fail:0   skip:105 time:297s
fi-bxt-dsi       total:285  pass:255  dwarn:0   dfail:0   fail:0   skip:30  time:516s
fi-bxt-j4205     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:515s
fi-byt-j1900     total:285  pass:250  dwarn:0   dfail:0   fail:0   skip:35  time:522s
fi-byt-n2820     total:285  pass:246  dwarn:0   dfail:0   fail:0   skip:39  time:515s
fi-cfl-8700k     total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:410s
fi-cfl-s3        total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:566s
fi-cfl-u         total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:516s
fi-cnl-y3        total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:582s
fi-elk-e7500     total:285  pass:225  dwarn:1   dfail:0   fail:0   skip:59  time:424s
fi-gdg-551       total:285  pass:176  dwarn:0   dfail:0   fail:1   skip:108 time:320s
fi-glk-1         total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:541s
fi-hsw-4770      total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:404s
fi-ilk-650       total:285  pass:225  dwarn:0   dfail:0   fail:0   skip:60  time:424s
fi-ivb-3520m     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:472s
fi-ivb-3770      total:285  pass:252  dwarn:0   dfail:0   fail:0   skip:33  time:435s
fi-kbl-7500u     total:285  pass:260  dwarn:1   dfail:0   fail:0   skip:24  time:479s
fi-kbl-7567u     total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:465s
fi-kbl-r         total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:512s
fi-pnv-d510      total:285  pass:219  dwarn:1   dfail:0   fail:0   skip:65  time:666s
fi-skl-6260u     total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:443s
fi-skl-6600u     total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:536s
fi-skl-6700k2    total:285  pass:261  dwarn:0   dfail:0   fail:0   skip:24  time:507s
fi-skl-6770hq    total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:500s
fi-skl-guc       total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:428s
fi-skl-gvtdvm    total:285  pass:262  dwarn:0   dfail:0   fail:0   skip:23  time:447s
fi-snb-2520m     total:285  pass:245  dwarn:0   dfail:0   fail:0   skip:40  time:565s
fi-snb-2600      total:285  pass:245  dwarn:0   dfail:0   fail:0   skip:40  time:403s
Blacklisted hosts:
fi-cnl-psr       total:285  pass:256  dwarn:3   dfail:0   fail:0   skip:26  time:525s
fi-glk-j4005     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:484s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1220/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw

[igt-dev] ✗ Fi.CI.IGT: failure for tests/kms_rotation_crc: Move platform checks to one place for non exhaust fence cases (rev2)

In reply to Radhakrishna Sripada
== Series Details ==

== Series Details ==

Series: tests/kms_rotation_crc: Move platform checks to one place for non exhaust fence cases (rev2)
URL : https://patchwork.freedesktop.org/series/40553/
State : failure

== Summary ==

---- Possible new issues:

Test drm_read:

        Subgroup empty-block:
                pass       -> FAIL       (shard-snb)
Test kms_chv_cursor_fail:
        Subgroup pipe-b-128x128-top-edge:
                pass       -> FAIL       (shard-snb)
Test kms_draw_crc:
        Subgroup draw-method-xrgb8888-mmap-wc-untiled:
                skip       -> PASS       (shard-snb)
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-offscren-pri-indfb-draw-mmap-cpu:
                skip       -> PASS       (shard-snb)
        Subgroup fbc-1p-primscrn-spr-indfb-move:
                skip       -> PASS       (shard-snb)
        Subgroup fbc-stridechange:
                fail       -> PASS       (shard-snb)
        Subgroup fbcpsr-1p-primscrn-spr-indfb-draw-mmap-gtt:
                skip       -> FAIL       (shard-snb)
        Subgroup fbcpsr-rgb565-draw-blt:
                fail       -> SKIP       (shard-snb)
        Subgroup fbcpsr-slowdraw:
                skip       -> FAIL       (shard-snb)
        Subgroup psr-2p-scndscrn-pri-indfb-draw-render:
                fail       -> SKIP       (shard-snb)
        Subgroup psr-2p-scndscrn-spr-indfb-move:
                skip       -> FAIL       (shard-snb)
        Subgroup psr-2p-scndscrn-spr-indfb-onoff:
                fail       -> SKIP       (shard-snb)
Test kms_universal_plane:
        Subgroup universal-plane-pipe-a-sanity:
                fail       -> PASS       (shard-snb)
Test prime_vgem:
        Subgroup basic-fence-flip:
                skip       -> PASS       (shard-snb)

---- Known issues:

Test kms_flip:

        Subgroup flip-vs-expired-vblank-interruptible:
                pass       -> FAIL       (shard-hsw) fdo#102887
        Subgroup plain-flip-fb-recreate-interruptible:
                fail       -> PASS       (shard-hsw) fdo#100368
Test kms_frontbuffer_tracking:
        Subgroup fbc-rgb565-draw-mmap-wc:
                fail       -> PASS       (shard-apl) fdo#103167 +1
Test kms_mmap_write_crc:
                dmesg-warn -> PASS       (shard-hsw) fdo#103286
Test kms_plane:
        Subgroup plane-position-hole-pipe-a-planes:
                pass       -> FAIL       (shard-snb) fdo#103166
Test kms_setmode:
        Subgroup basic:
                fail       -> PASS       (shard-apl) fdo#99912

fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103286 https://bugs.freedesktop.org/show_bug.cgi?id=103286
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912

shard-apl        total:3498 pass:1835 dwarn:1   dfail:0   fail:10  skip:1651 time:12964s
shard-hsw        total:3498 pass:1784 dwarn:1   dfail:0   fail:2   skip:1710 time:11469s
shard-snb        total:3498 pass:1374 dwarn:1   dfail:0   fail:11  skip:2112 time:7021s

Blacklisted hosts:
shard-kbl total:3498 pass:1942 dwarn:19 dfail:0 fail:12 skip:1525 time:9335s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1220/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev