Skip to contentSkip to conversation

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

PATCH Superseded Radhakrishna Sripada 6 participants 10 messages Mar 22, 2018 – Apr 12, 2018

v3 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 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)

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

Cc Radhakrishna Sripada <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Mika Kahola <[email protected]>
Cc Manasi Navare <[email protected]>
---
 tests/kms_rotation_crc.c | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)
tests/kms_rotation_crc.c +16 -15
index 0cd5c6e52b57..60fb9012e14e 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,13 +381,12 @@ 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);
 
 		plane = igt_output_get_plane_type(output, plane_type);
@@ -538,14 +549,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 +568,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 +583,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 +590,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 +600,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 +614,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.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#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

== Series Details ==

== Series Details ==

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

== Summary ==

IGT patchset tested on top of latest successful build c2ee90774496a9772f17a7a359d7a670bf7d6b85 meson: Chamelium depends on GSL

with latest DRM-Tip kernel build CI_DRM_3976
101f8aec6229 drm-tip: 2018y-03m-23d-17h-52m-01s UTC integration manifest

No testlist changes.

---- Known issues:

Test debugfs_test:

        Subgroup read_all_entries:
                incomplete -> PASS       (fi-snb-2520m) fdo#103713 +1
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-c:
                pass       -> DMESG-FAIL (fi-cnl-y3) fdo#104951
Test prime_vgem:
        Subgroup basic-fence-flip:
                fail       -> PASS       (fi-ilk-650) fdo#104008

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008

fi-bdw-5557u     total:285  pass:264  dwarn:0   dfail:0   fail:0   skip:21  time:433s
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:381s
fi-bsw-n3050     total:285  pass:239  dwarn:0   dfail:0   fail:0   skip:46  time:540s
fi-bwr-2160      total:285  pass:180  dwarn:0   dfail:0   fail:0   skip:105 time:299s
fi-bxt-dsi       total:285  pass:255  dwarn:0   dfail:0   fail:0   skip:30  time:520s
fi-bxt-j4205     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:519s
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:509s
fi-cfl-8700k     total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:416s
fi-cfl-u         total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:512s
fi-cnl-y3        total:285  pass:258  dwarn:0   dfail:1   fail:0   skip:26  time:583s
fi-elk-e7500     total:285  pass:225  dwarn:1   dfail:0   fail:0   skip:59  time:423s
fi-gdg-551       total:285  pass:177  dwarn:0   dfail:0   fail:0   skip:108 time:318s
fi-glk-1         total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:540s
fi-hsw-4770      total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:405s
fi-ilk-650       total:285  pass:225  dwarn:0   dfail:0   fail:0   skip:60  time:420s
fi-ivb-3520m     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:473s
fi-ivb-3770      total:285  pass:252  dwarn:0   dfail:0   fail:0   skip:33  time:429s
fi-kbl-7500u     total:285  pass:260  dwarn:1   dfail:0   fail:0   skip:24  time:475s
fi-kbl-7567u     total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:473s
fi-kbl-r         total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:515s
fi-pnv-d510      total:285  pass:219  dwarn:1   dfail:0   fail:0   skip:65  time:656s
fi-skl-6260u     total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:445s
fi-skl-6600u     total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:537s
fi-skl-6700k2    total:285  pass:261  dwarn:0   dfail:0   fail:0   skip:24  time:505s
fi-skl-6770hq    total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:497s
fi-skl-guc       total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:437s
fi-skl-gvtdvm    total:285  pass:262  dwarn:0   dfail:0   fail:0   skip:23  time:448s
fi-snb-2520m     total:242  pass:208  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600      total:285  pass:245  dwarn:0   dfail:0   fail:0   skip:40  time:407s
Blacklisted hosts:
fi-cfl-s3        total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:568s
fi-cnl-psr       total:224  pass:198  dwarn:0   dfail:0   fail:1   skip:24 
fi-glk-j4005     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:488s

== Logs ==

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

#2 lore raw

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

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
URL : https://patchwork.freedesktop.org/series/40553/
State : success

== Summary ==

---- Known issues:

Test kms_flip:

        Subgroup 2x-plain-flip-fb-recreate-interruptible:
                fail       -> PASS       (shard-hsw) fdo#100368 +1
Test kms_frontbuffer_tracking:
        Subgroup fbc-suspend:
                pass       -> INCOMPLETE (shard-hsw) fdo#103540 +1
Test kms_rotation_crc:
        Subgroup primary-rotation-180:
                pass       -> FAIL       (shard-snb) fdo#103925
Test perf:
        Subgroup blocking:
                pass       -> FAIL       (shard-hsw) fdo#102252

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252

shard-apl        total:3484 pass:1820 dwarn:1   dfail:0   fail:11  skip:1651 time:12928s
shard-hsw        total:3411 pass:1735 dwarn:1   dfail:0   fail:2   skip:1670 time:10943s
shard-snb        total:3484 pass:1362 dwarn:1   dfail:0   fail:4   skip:2117 time:6968s

Blacklisted hosts:
shard-kbl total:3484 pass:1944 dwarn:1 dfail:0 fail:14 skip:1525 time:9852s

== Logs ==

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

Tested-by on v3 1/1
#3 lore raw
In reply to Radhakrishna Sripada
Quoted 12 lines · Radhakrishna Sripada

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)

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

Quoted 7 lines
Cc Radhakrishna Sripada <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Mika Kahola <[email protected]>
Cc Manasi Navare <[email protected]>
Quoted 134 lines

---
 tests/kms_rotation_crc.c | 31 ++++++++++++++++---------------

 1 file changed, 16 insertions(+), 15 deletions(-)
tests/kms_rotation_crc.c +1 -0
index 0cd5c6e52b57..60fb9012e14e 100644
@@ -43,6 +43,7 @@ typedef struct {
  	uint32_t override_fmt;
  	uint64_t override_tiling;
  	int devid;
+	int gen;
  } data_t;


 typedef struct {

tests/kms_rotation_crc.c +0 -0
@@ -301,6 +302,17 @@ static void wait_for_pageflip(int fd)
  	igt_assert(drmHandleEvent(fd, &evctx) == 0);
  }

tests/kms_rotation_crc.c +7 -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-
Quoted 1 line

rotation & IGT_ROTATION_0)));

tests/kms_rotation_crc.c +4 -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,

tests/kms_rotation_crc.c +0 -0
@@ -369,13 +381,12 @@ static void test_plane_rotation(data_t *data,

int plane_type, bool test_bad_form

  igt_display_require_output(display);

tests/kms_rotation_crc.c +2 -0
+	igt_check_rotation(data);
+

  for_each_pipe_with_valid_output(display, pipe, output) { igt_plane_t *plane;
  int i, j;

tests/kms_rotation_crc.c +0 -3
-		if (IS_CHERRYVIEW(data->devid) && pipe != PIPE_B)
-			continue;
-

  igt_output_set_pipe(output, pipe);
  plane = igt_output_get_plane_type(output, plane_type);

tests/kms_rotation_crc.c +0 -0
@@ -538,14 +549,13 @@ igt_main
  	};


  data_t data = {};

tests/kms_rotation_crc.c +0 -1
-	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);

tests/kms_rotation_crc.c +1 -1
-		gen = intel_gen(data.devid);
+		data.gen = intel_gen(data.devid);


  kmstest_set_vt_graphics_mode();

tests/kms_rotation_crc.c +0 -2
@@ -558,16 +568,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)) ||

tests/kms_rotation_crc.c +0 -1
-				    gen >= 9);

  data.rotation = subtest->rot; test_plane_rotation(&data, subtest->plane, false);
  }
  }

  igt_subtest_f("sprite-rotation-90-pos-100-0") {

tests/kms_rotation_crc.c +0 -1
-		igt_require(gen >= 9);

  data.rotation = IGT_ROTATION_90;
  data.pos_x = 100,
  data.pos_y = 0;

tests/kms_rotation_crc.c +0 -0
@@ -577,7 +583,6 @@ igt_main
  	data.pos_y = 0;


  igt_subtest_f("bad-pixel-format") {

tests/kms_rotation_crc.c +0 -1
-		igt_require(gen >= 9);

  data.rotation = IGT_ROTATION_90; data.override_fmt = DRM_FORMAT_RGB565; test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY, true);

tests/kms_rotation_crc.c +0 -0
@@ -585,7 +590,6 @@ igt_main
  	data.override_fmt = 0;


  igt_subtest_f("bad-tiling") {

tests/kms_rotation_crc.c +0 -1
-		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);

tests/kms_rotation_crc.c +0 -2
@@ -596,9 +600,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

tests/kms_rotation_crc.c +0 -1
-				     && reflect_x->tiling ==

LOCAL_I915_FORMAT_MOD_X_TILED));
  data.rotation = (IGT_REFLECT_X | reflect_x-

Quoted 1 line

rot);

  data.override_tiling = reflect_x->tiling; test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY, false);

tests/kms_rotation_crc.c +0 -0
@@ -613,7 +614,7 @@ igt_main
  		enum pipe pipe;
  		igt_output_t *output;

tests/kms_rotation_crc.c +1 -1
-		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
Mika Kahola - Intel OTC

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#5 lore raw
In reply to Radhakrishna Sripada

Op 22-03-18 om 23:10 schreef Radhakrishna Sripada:

Quoted 40 lines

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)

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

Cc Radhakrishna Sripada <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Mika Kahola <[email protected]>
Cc Manasi Navare <[email protected]>
---
 tests/kms_rotation_crc.c | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)
tests/kms_rotation_crc.c +1 -0
index 0cd5c6e52b57..60fb9012e14e 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);
 }
 

tests/kms_rotation_crc.c static void wait_for_pageflip(int fd) · line 314

Quoted 10 lines
tests/kms_rotation_crc.c +10 -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);
+}

This still won't work as intended on CHV as it only has reflection on PIPE_B, for X tiled fb's.

Quoted 79 lines
tests/kms_rotation_crc.c +3 -14
 static void test_single_case(data_t *data, enum pipe pipe,
 			     igt_output_t *output, igt_plane_t *plane,
 			     enum rectangle_type rect,
@@ -369,13 +381,12 @@ 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);
 
 		plane = igt_output_get_plane_type(output, plane_type);
@@ -538,14 +549,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 +568,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 +583,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 +590,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 +600,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);

tests/kms_rotation_crc.c igt_main · line 620

Quoted 8 lines
tests/kms_rotation_crc.c +1 -1
@@ -613,7 +614,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) {

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

#6 lore raw
Quoted 41 lines · Maarten Lankhorst

Op 22-03-18 om 23:10 schreef Radhakrishna Sripada:

Quoted 40 lines

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)

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

Cc Radhakrishna Sripada <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Mika Kahola <[email protected]>
Cc Manasi Navare <[email protected]>
---
 tests/kms_rotation_crc.c | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)
tests/kms_rotation_crc.c +1 -0
index 0cd5c6e52b57..60fb9012e14e 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);
 }
 
Quoted 11 lines

tests/kms_rotation_crc.c static void wait_for_pageflip(int fd) · line 314

Quoted 10 lines
tests/kms_rotation_crc.c +10 -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);
+}

This still won't work as intended on CHV as it only has reflection on PIPE_B, for X tiled fb's.

s/X tiled//

Quoted 90 lines
Quoted 89 lines
tests/kms_rotation_crc.c +4 -15
 static void test_single_case(data_t *data, enum pipe pipe,
 			     igt_output_t *output, igt_plane_t *plane,
 			     enum rectangle_type rect,
@@ -369,13 +381,12 @@ 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);
 
 		plane = igt_output_get_plane_type(output, plane_type);
@@ -538,14 +549,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 +568,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 +583,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 +590,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 +600,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 +614,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
Ville Syrjälä
Intel OTC
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Reviewed-by
#4 lore raw
In reply to Mika Kahola

The rework looks good to me.

Thanks Mika for testing this.

Quoted 34 lines

-----Original Message-----
From: Kahola, Mika
Sent: Wednesday, March 28, 2018 1:26 AM
To: Sripada, Radhakrishna <[email protected]>; igt- [email protected]
Cc: [email protected]; Srivatsa, Anusha <[email protected]>; Ville Syrjälä <[email protected]>; Vetter, Daniel <[email protected]>; Vivi, Rodrigo <[email protected]>; Maarten Lankhorst <[email protected]>; Navare, Manasi D <[email protected]>
Subject: Re: [PATCH i-g-t v3] tests/kms_rotation_crc: Move platform checks to one place for non exhaust fence cases

Quoted 12 lines · Radhakrishna Sripada

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)

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

Quoted 7 lines
Cc Radhakrishna Sripada <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Mika Kahola <[email protected]>
Cc Manasi Navare <[email protected]>
Quoted 1 line
Quoted 125 lines
Quoted 52 lines

---
 tests/kms_rotation_crc.c | 31 ++++++++++++++++---------------

 1 file changed, 16 insertions(+), 15 deletions(-)
tests/kms_rotation_crc.c index renamed from tests/kms_rotation_crc.c +0 -0

0cd5c6e52b57..60fb9012e14e 100644

tests/kms_rotation_crc.c +11 -0
@@ -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,

tests/kms_rotation_crc.c +0 -0
@@ -369,13 +381,12 @@ static void test_plane_rotation(data_t *data,

int plane_type, bool test_bad_form

  igt_display_require_output(display);

tests/kms_rotation_crc.c +2 -0
+	igt_check_rotation(data);
+

  for_each_pipe_with_valid_output(display, pipe, output) { igt_plane_t *plane;
  int i, j;

tests/kms_rotation_crc.c +0 -3
-		if (IS_CHERRYVIEW(data->devid) && pipe != PIPE_B)
-			continue;
-

  igt_output_set_pipe(output, pipe);

Quoted 1 line

  plane = igt_output_get_plane_type(output, plane_type); @@ -

538,14

Quoted 35 lines

+549,13 @@ igt_main
  };

  data_t data = {};

tests/kms_rotation_crc.c +0 -1
-	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);

tests/kms_rotation_crc.c +1 -1
-		gen = intel_gen(data.devid);
+		data.gen = intel_gen(data.devid);

  kmstest_set_vt_graphics_mode();

tests/kms_rotation_crc.c +0 -2
@@ -558,16 +568,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)) ||

tests/kms_rotation_crc.c +0 -1
-				    gen >= 9);

  data.rotation = subtest->rot; test_plane_rotation(&data, subtest->plane, false); }
  }

  igt_subtest_f("sprite-rotation-90-pos-100-0") {

tests/kms_rotation_crc.c +0 -1
-		igt_require(gen >= 9);

  data.rotation = IGT_ROTATION_90;
  data.pos_x = 100,
  data.pos_y = 0;

tests/kms_rotation_crc.c igt_main · line 588

Quoted 7 lines
tests/kms_rotation_crc.c +0 -1
@@ -577,7 +583,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

Quoted 9 lines

+590,6 @@ igt_main
  data.override_fmt = 0;

  igt_subtest_f("bad-tiling") {

tests/kms_rotation_crc.c +0 -1
-		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

Quoted 18 lines

+600,6 @@ igt_main igt_subtest_f("primary-%s-reflect-x-%s", tiling_test_str(reflect_x->tiling), rot_test_str(reflect_x->rot)) {

tests/kms_rotation_crc.c +0 -2
-			igt_require(gen >= 10 ||
-				    (IS_CHERRYVIEW(data.devid) &&

reflect_x->rot == IGT_ROTATION_0

tests/kms_rotation_crc.c +0 -1
-				     && reflect_x->tiling ==

LOCAL_I915_FORMAT_MOD_X_TILED));
  data.rotation = (IGT_REFLECT_X | reflect_x-

Quoted 1 line

rot);

  data.override_tiling = reflect_x->tiling; test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY, false);

tests/kms_rotation_crc.c +0 -0
@@ -613,7 +614,7 @@ igt_main
  		enum pipe pipe;
  		igt_output_t *output;
 
Quoted 8 lines
Quoted 6 lines
tests/kms_rotation_crc.c +1 -1
-		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) {

--
Mika Kahola - Intel OTC

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw
In reply to Ville Syrjälä
Quoted 62 lines

-----Original Message-----
From: Ville Syrjälä [mailto:[email protected]]
Sent: Wednesday, March 28, 2018 3:36 AM
To: Maarten Lankhorst <[email protected]>
Cc: Sripada, Radhakrishna <[email protected]>; igt- [email protected]; [email protected]; Srivatsa, Anusha <[email protected]>; Vetter, Daniel <[email protected]>; Vivi, Rodrigo <[email protected]>; Kahola, Mika <[email protected]>; Navare, Manasi D <[email protected]>
Subject: Re: [PATCH i-g-t v3] tests/kms_rotation_crc: Move platform checks to one place for non exhaust fence cases

Quoted 40 lines · Maarten Lankhorst

Op 22-03-18 om 23:10 schreef Radhakrishna Sripada:

Quoted 39 lines

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)

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

Cc Radhakrishna Sripada <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Mika Kahola <[email protected]>
Cc Manasi Navare <[email protected]>
---
 tests/kms_rotation_crc.c | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)
tests/kms_rotation_crc.c +1 -0
index 0cd5c6e52b57..60fb9012e14e 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);  }
 
Quoted 6 lines

tests/kms_rotation_crc.c static void wait_for_pageflip(int fd)

Quoted 6 lines
tests/kms_rotation_crc.c +6 -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)));

Quoted 7 lines
Quoted 4 lines

tests/kms_rotation_crc.c static void wait_for_pageflip(int fd) · line 314

Quoted 3 lines
tests/kms_rotation_crc.c +3 -0
+	else if (data->rotation & IGT_ROTATION_180)
+		igt_require(data->gen >= 4);
+}

This still won't work as intended on CHV as it only has reflection on PIPE_B,

for X tiled fb's.

s/X tiled//

So should we hack the reflect subtest to partially run for a single pipe and skip for the other pipes on Chv? If so is there a non-murky way to do it?

Thanks,
Radhakrishna

Quoted 97 lines
Quoted 17 lines
Quoted 17 lines
tests/kms_rotation_crc.c +0 -0
 static void test_single_case(data_t *data, enum pipe pipe,
 			     igt_output_t *output, igt_plane_t *plane,
 			     enum rectangle_type rect,
@@ -369,13 +381,12 @@ static void test_plane_rotation(data_t *data,

int plane_type, bool test_bad_form

tests/kms_rotation_crc.c +2 -0
 	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;
Quoted 6 lines

tests/kms_rotation_crc.c static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form

Quoted 6 lines
tests/kms_rotation_crc.c +0 -3
-		if (IS_CHERRYVIEW(data->devid) && pipe != PIPE_B)
-			continue;
-
 		igt_output_set_pipe(output, pipe);
 
 		plane = igt_output_get_plane_type(output, plane_type); @@

-538,14

Quoted 14 lines
Quoted 14 lines

+549,13 @@ igt_main

tests/kms_rotation_crc.c +1 -2
 	};
 
 	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);
Quoted 8 lines

tests/kms_rotation_crc.c igt_main · line 562

Quoted 8 lines
tests/kms_rotation_crc.c +0 -2
 		kmstest_set_vt_graphics_mode();
@@ -558,16 +568,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);
> >  		}
> >  	}
Quoted 9 lines
Quoted 9 lines
tests/kms_rotation_crc.c +0 -1
 	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 +583,6 @@ igt_main
 	data.pos_y = 0;
 
Quoted 5 lines

tests/kms_rotation_crc.c igt_main

Quoted 5 lines
tests/kms_rotation_crc.c +0 -1
 	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); @@

Quoted 8 lines

tests/kms_rotation_crc.c igt_main

Quoted 8 lines

-585,7 +590,6 @@ igt_main

tests/kms_rotation_crc.c +0 -1
 	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); @@

Quoted 8 lines

tests/kms_rotation_crc.c igt_main

Quoted 6 lines

-596,9 +600,6 @@ igt_main

tests/kms_rotation_crc.c +0 -2
 		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

tests/kms_rotation_crc.c

Quoted 1 line
tests/kms_rotation_crc.c +0 -1
-				     && reflect_x->tiling ==

LOCAL_I915_FORMAT_MOD_X_TILED));

Quoted 3 lines

tests/kms_rotation_crc.c igt_main

Quoted 3 lines
tests/kms_rotation_crc.c +0 -0
 			data.rotation = (IGT_REFLECT_X | reflect_x->rot);
 			data.override_tiling = reflect_x->tiling;
 			test_plane_rotation(&data,

DRM_PLANE_TYPE_PRIMARY, false); @@

Quoted 8 lines
Quoted 8 lines

-613,7 +614,7 @@ igt_main

tests/kms_rotation_crc.c +1 -1
 		enum pipe pipe;
 		igt_output_t *output;
 
-		igt_require(gen >= 9);
+		igt_require(data.gen >= 9);
 		igt_display_require_output(&data.display);
Quoted 7 lines
Quoted 1 line
Quoted 1 line

for_each_pipe_with_valid_output(&data.display, pipe,

output) {

Quoted 1 line

--
Ville Syrjälä
Intel OTC

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

#8 lore raw
Quoted 62 lines · Radhakrishna
Quoted 62 lines

-----Original Message-----
From: Ville Syrjälä [mailto:[email protected]]
Sent: Wednesday, March 28, 2018 3:36 AM
To: Maarten Lankhorst <[email protected]>
Cc: Sripada, Radhakrishna <[email protected]>; igt- [email protected]; [email protected]; Srivatsa, Anusha <[email protected]>; Vetter, Daniel <[email protected]>; Vivi, Rodrigo <[email protected]>; Kahola, Mika <[email protected]>; Navare, Manasi D <[email protected]>
Subject: Re: [PATCH i-g-t v3] tests/kms_rotation_crc: Move platform checks to one place for non exhaust fence cases

Quoted 40 lines · Maarten Lankhorst

Op 22-03-18 om 23:10 schreef Radhakrishna Sripada:

Quoted 39 lines

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)

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

Cc Radhakrishna Sripada <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Mika Kahola <[email protected]>
Cc Manasi Navare <[email protected]>
---
 tests/kms_rotation_crc.c | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)
tests/kms_rotation_crc.c +1 -0
index 0cd5c6e52b57..60fb9012e14e 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);  }
 
Quoted 6 lines

tests/kms_rotation_crc.c static void wait_for_pageflip(int fd)

Quoted 6 lines
tests/kms_rotation_crc.c +6 -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)));

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines

tests/kms_rotation_crc.c static void wait_for_pageflip(int fd) · line 314

Quoted 3 lines
tests/kms_rotation_crc.c +3 -0
+	else if (data->rotation & IGT_ROTATION_180)
+		igt_require(data->gen >= 4);
+}

This still won't work as intended on CHV as it only has reflection on PIPE_B,

for X tiled fb's.

s/X tiled//

So should we hack the reflect subtest to partially run for a single pipe and skip for the other pipes on Chv? If so is there a non-murky way to do it?

At least skipping for pipe A/C should happen automagically if we ask the plane what it supports. The pipe B case still needs to be special cased though.

Quoted 108 lines

Thanks,
Radhakrishna

Quoted 104 lines
Quoted 17 lines
Quoted 17 lines
tests/kms_rotation_crc.c +0 -0
 static void test_single_case(data_t *data, enum pipe pipe,
 			     igt_output_t *output, igt_plane_t *plane,
 			     enum rectangle_type rect,
@@ -369,13 +381,12 @@ static void test_plane_rotation(data_t *data,

int plane_type, bool test_bad_form

tests/kms_rotation_crc.c +2 -0
 	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;
Quoted 6 lines

tests/kms_rotation_crc.c static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form

Quoted 6 lines
tests/kms_rotation_crc.c +0 -3
-		if (IS_CHERRYVIEW(data->devid) && pipe != PIPE_B)
-			continue;
-
 		igt_output_set_pipe(output, pipe);
 
 		plane = igt_output_get_plane_type(output, plane_type); @@

-538,14

Quoted 14 lines
Quoted 14 lines

+549,13 @@ igt_main

tests/kms_rotation_crc.c +1 -2
 	};
 
 	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);
Quoted 8 lines

tests/kms_rotation_crc.c igt_main · line 562

Quoted 8 lines
tests/kms_rotation_crc.c +0 -2
 		kmstest_set_vt_graphics_mode();
@@ -558,16 +568,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);
> >  		}
> >  	}
Quoted 9 lines
Quoted 9 lines
tests/kms_rotation_crc.c +0 -1
 	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 +583,6 @@ igt_main
 	data.pos_y = 0;
 
Quoted 5 lines

tests/kms_rotation_crc.c igt_main

Quoted 5 lines
tests/kms_rotation_crc.c +0 -1
 	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); @@

Quoted 8 lines

tests/kms_rotation_crc.c igt_main

Quoted 8 lines

-585,7 +590,6 @@ igt_main

tests/kms_rotation_crc.c +0 -1
 	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); @@

Quoted 8 lines

tests/kms_rotation_crc.c igt_main

Quoted 6 lines

-596,9 +600,6 @@ igt_main

tests/kms_rotation_crc.c +0 -2
 		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

tests/kms_rotation_crc.c

Quoted 1 line
tests/kms_rotation_crc.c +0 -1
-				     && reflect_x->tiling ==

LOCAL_I915_FORMAT_MOD_X_TILED));

Quoted 3 lines

tests/kms_rotation_crc.c igt_main

Quoted 3 lines
tests/kms_rotation_crc.c +0 -0
 			data.rotation = (IGT_REFLECT_X | reflect_x->rot);
 			data.override_tiling = reflect_x->tiling;
 			test_plane_rotation(&data,

DRM_PLANE_TYPE_PRIMARY, false); @@

Quoted 9 lines

tests/kms_rotation_crc.c igt_main

Quoted 9 lines

-613,7 +614,7 @@ igt_main

tests/kms_rotation_crc.c +1 -1
 		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) {

Quoted 1 line

--
Ville Syrjälä
Intel OTC

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#9 lore raw
Quoted 67 lines · Ville Syrjälä
Quoted 66 lines · Radhakrishna
Quoted 66 lines

-----Original Message-----
From: Ville Syrjälä [mailto:[email protected]]
Sent: Wednesday, March 28, 2018 3:36 AM
To: Maarten Lankhorst <[email protected]>
Cc: Sripada, Radhakrishna <[email protected]>; igt- [email protected]; [email protected]; Srivatsa, Anusha <[email protected]>; Vetter, Daniel <[email protected]>; Vivi, Rodrigo <[email protected]>; Kahola, Mika <[email protected]>; Navare, Manasi D <[email protected]>
Subject: Re: [PATCH i-g-t v3] tests/kms_rotation_crc: Move platform checks to one place for non exhaust fence cases

Quoted 40 lines · Maarten Lankhorst

Op 22-03-18 om 23:10 schreef Radhakrishna Sripada:

Quoted 39 lines

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)

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

Cc Radhakrishna Sripada <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Mika Kahola <[email protected]>
Cc Manasi Navare <[email protected]>
---
 tests/kms_rotation_crc.c | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)
tests/kms_rotation_crc.c +1 -0
index 0cd5c6e52b57..60fb9012e14e 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);  }
 
Quoted 6 lines

tests/kms_rotation_crc.c static void wait_for_pageflip(int fd)

Quoted 6 lines
tests/kms_rotation_crc.c +6 -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)));

Quoted 4 lines

tests/kms_rotation_crc.c static void wait_for_pageflip(int fd) · line 314

Quoted 3 lines
tests/kms_rotation_crc.c +3 -0
+	else if (data->rotation & IGT_ROTATION_180)
+		igt_require(data->gen >= 4);
+}

This still won't work as intended on CHV as it only has reflection on PIPE_B,

Quoted 9 lines
Quoted 4 lines
Quoted 3 lines

for X tiled fb's.

s/X tiled//

So should we hack the reflect subtest to partially run for a single pipe and skip for the other pipes on Chv? If so is there a non-murky way to do it?

At least skipping for pipe A/C should happen automagically if we ask the plane what it supports. The pipe B case still needs to be special cased though.

I sent an updated patch [1] making the changes. Is it ok?

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

Quoted 101 lines
Quoted 101 lines

Thanks,
Radhakrishna

Quoted 97 lines
Quoted 17 lines
Quoted 17 lines
tests/kms_rotation_crc.c +0 -0
 static void test_single_case(data_t *data, enum pipe pipe,
 			     igt_output_t *output, igt_plane_t *plane,
 			     enum rectangle_type rect,
@@ -369,13 +381,12 @@ static void test_plane_rotation(data_t *data,

int plane_type, bool test_bad_form

tests/kms_rotation_crc.c +2 -0
 	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;
Quoted 6 lines

tests/kms_rotation_crc.c static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form

Quoted 6 lines
tests/kms_rotation_crc.c +0 -3
-		if (IS_CHERRYVIEW(data->devid) && pipe != PIPE_B)
-			continue;
-
 		igt_output_set_pipe(output, pipe);
 
 		plane = igt_output_get_plane_type(output, plane_type); @@

-538,14

Quoted 14 lines
Quoted 14 lines

+549,13 @@ igt_main

tests/kms_rotation_crc.c +1 -2
 	};
 
 	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);
Quoted 8 lines

tests/kms_rotation_crc.c igt_main · line 562

Quoted 8 lines
tests/kms_rotation_crc.c +0 -2
 		kmstest_set_vt_graphics_mode();
@@ -558,16 +568,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);
> >  		}
> >  	}
Quoted 9 lines
Quoted 9 lines
tests/kms_rotation_crc.c +0 -1
 	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 +583,6 @@ igt_main
 	data.pos_y = 0;
 
Quoted 5 lines

tests/kms_rotation_crc.c igt_main

Quoted 5 lines
tests/kms_rotation_crc.c +0 -1
 	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); @@

Quoted 8 lines

tests/kms_rotation_crc.c igt_main

Quoted 8 lines

-585,7 +590,6 @@ igt_main

tests/kms_rotation_crc.c +0 -1
 	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); @@

Quoted 8 lines

tests/kms_rotation_crc.c igt_main

Quoted 6 lines

-596,9 +600,6 @@ igt_main

tests/kms_rotation_crc.c +0 -2
 		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

tests/kms_rotation_crc.c

Quoted 1 line
tests/kms_rotation_crc.c +0 -1
-				     && reflect_x->tiling ==

LOCAL_I915_FORMAT_MOD_X_TILED));

Quoted 3 lines

tests/kms_rotation_crc.c igt_main

Quoted 3 lines
tests/kms_rotation_crc.c +0 -0
 			data.rotation = (IGT_REFLECT_X | reflect_x->rot);
 			data.override_tiling = reflect_x->tiling;
 			test_plane_rotation(&data,

DRM_PLANE_TYPE_PRIMARY, false); @@

Quoted 8 lines
Quoted 8 lines

-613,7 +614,7 @@ igt_main

tests/kms_rotation_crc.c +1 -1
 		enum pipe pipe;
 		igt_output_t *output;
 
-		igt_require(gen >= 9);
+		igt_require(data.gen >= 9);
 		igt_display_require_output(&data.display);
Quoted 11 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line

for_each_pipe_with_valid_output(&data.display, pipe,

output) {

Quoted 1 line

--
Ville Syrjälä
Intel OTC

Signature · 2 lines
Ville Syrjälä
Intel OTC

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