tests/kms_legacy_colorkey: Test a lot more things
PATCH 1/1 tests/kms_legacy_colorkey: Test a lot more things
From: Ville Syrjälä <[email protected]>
Try to test that we can actually use the colorkey ioctl to ask for different colorkeying modes, and make sure the kernel rejects invalid/unsupported flags, etc.
What we;re still missing is looking at the crc to make sure the color keying actually works. But let's leave that for the future.
--- tests/kms_legacy_colorkey.c | 132 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 115 insertions(+), 17 deletions(-)
tests/kms_legacy_colorkey.c +115 -17
@@ -22,51 +22,149 @@*/ #include "igt.h" +#include "i915_drm.h" #include <errno.h> -IGT_TEST_DESCRIPTION ("Check that the legacy set colorkey ioctl only works on sprite planes." ); +IGT_TEST_DESCRIPTION ("Check that the legacy set colorkey ioctl works." );static int drm_fd;static igt_display_t display;static int p;static igt_plane_t *plane;static uint32_t max_id; +static uint32_t devid; -static void test_plane (uint32_t plane_id,int expected_ret) +static void test_plane (uint32_t plane_id, +uint32_t flags, +int expected_ret) {struct drm_intel_sprite_colorkey ckey = { .plane_id = plane_id, + .flags = flags, };igt_assert (drmCommandWrite (drm_fd,DRM_I915_SET_SPRITE_COLORKEY , &ckey,sizeof (ckey)) == expected_ret); } -igt_simple_main +igt_main {igt_skip_on_simulation (); - drm_fd =drm_open_driver_master (DRIVER_INTEL ); + igt_fixture { + drm_fd =drm_open_driver_master (DRIVER_INTEL ); -kmstest_set_vt_graphics_mode (); + devid =intel_get_drm_devid (drm_fd); -igt_display_init (&display, drm_fd); +kmstest_set_vt_graphics_mode (); -for_each_pipe (&display, p) { -for_each_plane_on_pipe (&display, p, plane) { -bool is_valid = (plane->type ==DRM_PLANE_TYPE_PRIMARY || - plane->type ==DRM_PLANE_TYPE_CURSOR ); -test_plane (plane->drm_plane->plane_id, - is_valid ? -ENOENT :0 ); +igt_display_init (&display, drm_fd); + } + + igt_subtest("invalid-plane-id") { +/* try some invalid plane IDs */ +test_plane (0 ,0 , -ENOENT ); + +for_each_pipe (&display, p) { +for_each_plane_on_pipe (&display, p, plane) { + max_id =max (max_id, plane->drm_plane->plane_id); + } + } +test_plane (max_id +1 ,0 , -ENOENT ); + } + +for_each_pipe_static (p) { + igt_subtest_f("pipe-%s-unsupported-plane", kmstest_pipe_name(p)) { +igt_skip_on (p >= display.n_pipes); + +for_each_plane_on_pipe (&display, p, plane) { +if (plane->type ==DRM_PLANE_TYPE_OVERLAY ) +continue ; + +/* should be rejected for primary/cursor planes */ +test_plane (plane->drm_plane->plane_id, +0 , -ENOENT ); + } + } + } + +for_each_pipe_static (p) { + igt_subtest_f("pipe-%s-invalid-flags", kmstest_pipe_name(p)) { +igt_skip_on (p >= display.n_pipes); + +for_each_plane_on_pipe (&display, p, plane) { +if (plane->type !=DRM_PLANE_TYPE_OVERLAY ) +continue ; + +/* dst + src keying is not supported */ +test_plane (plane->drm_plane->plane_id, +I915_SET_COLORKEY_DESTINATION | +I915_SET_COLORKEY_SOURCE , + -EINVAL ); + +/* test some undefined flags */ +test_plane (plane->drm_plane->plane_id, +1 <<3 , -EINVAL ); +test_plane (plane->drm_plane->plane_id, +1 <<31 , -EINVAL ); + } + } + } + +for_each_pipe_static (p) { + igt_subtest_f("pipe-%s-no-colorkey", kmstest_pipe_name(p)) { +igt_skip_on (p >= display.n_pipes); + +for_each_plane_on_pipe (&display, p, plane) { +if (plane->type !=DRM_PLANE_TYPE_OVERLAY ) +continue ; + +test_plane (plane->drm_plane->plane_id,0 ,0 ); - max_id =max (max_id, plane->drm_plane->plane_id); +/* the "none" flag should be ignore by the kernel */ +test_plane (plane->drm_plane->plane_id, +I915_SET_COLORKEY_NONE ,0 ); + } } } -/* try some invalid IDs too */ -test_plane (0 , -ENOENT ); -test_plane (max_id +1 , -ENOENT ); +for_each_pipe_static (p) { + igt_subtest_f("pipe-%s-src-colorkey", kmstest_pipe_name(p)) { +igt_skip_on (p >= display.n_pipes); + +for_each_plane_on_pipe (&display, p, plane) { +if (plane->type !=DRM_PLANE_TYPE_OVERLAY ) +continue ; + +test_plane (plane->drm_plane->plane_id, +I915_SET_COLORKEY_SOURCE ,0 ); +test_plane (plane->drm_plane->plane_id,0 ,0 ); + } + } + } -igt_display_fini (&display); +for_each_pipe_static (p) { + igt_subtest_f("pipe-%s-dst-colorkey", kmstest_pipe_name(p)) { +igt_skip_on (p >= display.n_pipes); + +for_each_plane_on_pipe (&display, p, plane) { +/* VLV/CHV don't support dst colorkey */ +bool is_valid = !IS_VALLEYVIEW (devid) && + !IS_CHERRYVIEW (devid); + +if (plane->type !=DRM_PLANE_TYPE_OVERLAY ) +continue ; + +test_plane (plane->drm_plane->plane_id, +I915_SET_COLORKEY_DESTINATION , + is_valid ?0 : -EINVAL ); +test_plane (plane->drm_plane->plane_id,0 ,0 ); + } + } + } + + igt_fixture { +igt_display_fini (&display); + } }
Signature · 6 lines
2.13.6 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for tests/kms_legacy_colorkey: Test a lot more things
== Series Details ==
== Series Details ==
Series: tests/kms_legacy_colorkey: Test a lot more things
URL : https://patchwork.freedesktop.org/series/37765/
State : success
== Summary ==
IGT patchset tested on top of latest successful build 3fd9b578b3138b04178b4ce8ee4a60e74a16ec91 tests/perf_pmu: Use short batches from hotplug test
with latest DRM-Tip kernel build CI_DRM_3728078873da3835 drm-tip: 2018y-02m-06d-11h-21m-36s UTC integration manifest
Testlist changes:
+igt@kms_legacy_colorkey@invalid-plane-id
+igt@kms_legacy_colorkey@pipe-a-dst-colorkey
+igt@kms_legacy_colorkey@pipe-a-invalid-flags
+igt@kms_legacy_colorkey@pipe-a-no-colorkey
+igt@kms_legacy_colorkey@pipe-a-src-colorkey
+igt@kms_legacy_colorkey@pipe-a-unsupported-plane
+igt@kms_legacy_colorkey@pipe-b-dst-colorkey
+igt@kms_legacy_colorkey@pipe-b-invalid-flags
+igt@kms_legacy_colorkey@pipe-b-no-colorkey
+igt@kms_legacy_colorkey@pipe-b-src-colorkey
+igt@kms_legacy_colorkey@pipe-b-unsupported-plane
+igt@kms_legacy_colorkey@pipe-c-dst-colorkey
+igt@kms_legacy_colorkey@pipe-c-invalid-flags
+igt@kms_legacy_colorkey@pipe-c-no-colorkey
+igt@kms_legacy_colorkey@pipe-c-src-colorkey
+igt@kms_legacy_colorkey@pipe-c-unsupported-plane
+igt@kms_legacy_colorkey@pipe-d-dst-colorkey
+igt@kms_legacy_colorkey@pipe-d-invalid-flags
+igt@kms_legacy_colorkey@pipe-d-no-colorkey
+igt@kms_legacy_colorkey@pipe-d-src-colorkey
+igt@kms_legacy_colorkey@pipe-d-unsupported-plane
+igt@kms_legacy_colorkey@pipe-e-dst-colorkey
+igt@kms_legacy_colorkey@pipe-e-invalid-flags
+igt@kms_legacy_colorkey@pipe-e-no-colorkey
+igt@kms_legacy_colorkey@pipe-e-src-colorkey
+igt@kms_legacy_colorkey@pipe-e-unsupported-plane
+igt@kms_legacy_colorkey@pipe-f-dst-colorkey
+igt@kms_legacy_colorkey@pipe-f-invalid-flags
+igt@kms_legacy_colorkey@pipe-f-no-colorkey
+igt@kms_legacy_colorkey@pipe-f-src-colorkey
+igt@kms_legacy_colorkey@pipe-f-unsupported-plane
-igt@kms_legacy_colorkey
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
pass -> INCOMPLETE (fi-snb-2520m) fdo#103713fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:418s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:423s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:376s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:490s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:485s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:485s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:473s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:462s fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:579s fi-cnl-y3 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:585s fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:418s fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:285s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:520s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:392s fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:401s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:418s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:462s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:418s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:457s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:497s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:454s fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:500s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:594s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:424s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:509s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:525s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:491s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:486s fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:417s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:428s fi-snb-2520m total:245 pass:211 dwarn:0 dfail:0 fail:0 skip:33 fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:406s
Blacklisted hosts:
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:475s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_871/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✗ Fi.CI.IGT: failure for tests/kms_legacy_colorkey: Test a lot more things
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: tests/kms_legacy_colorkey: Test a lot more things
URL : https://patchwork.freedesktop.org/series/37765/
State : failure
== Summary ==
Test kms_rotation_crc:
Subgroup sprite-rotation-180-flip:
pass -> FAIL (shard-apl)
Test perf:
Subgroup buffer-fill:
fail -> PASS (shard-apl) fdo#103755
Subgroup oa-exponents:
pass -> FAIL (shard-apl) fdo#102254
Subgroup enable-disable:
fail -> PASS (shard-apl) fdo#103715
Test kms_cursor_legacy:
Subgroup 2x-long-flip-vs-cursor-legacy:
pass -> FAIL (shard-hsw) fdo#104873
Test kms_mmap_write_crc:
skip -> PASS (shard-apl)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass -> SKIP (shard-snb) fdo#103375
Test gem_eio:
Subgroup in-flight:
fail -> PASS (shard-hsw) fdo#104676 +1
Test gem_exec_schedule:
Subgroup reorder-wide-vebox:
incomplete -> PASS (shard-apl) fdo#102848fdo#103755 https://bugs.freedesktop.org/show_bug.cgi?id=103755
fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254
fdo#103715 https://bugs.freedesktop.org/show_bug.cgi?id=103715
fdo#104873 https://bugs.freedesktop.org/show_bug.cgi?id=104873
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#104676 https://bugs.freedesktop.org/show_bug.cgi?id=104676
fdo#102848 https://bugs.freedesktop.org/show_bug.cgi?id=102848
shard-apl total:3469 pass:1791 dwarn:1 dfail:0 fail:25 skip:1651 time:12341s shard-hsw total:3472 pass:1769 dwarn:1 dfail:0 fail:15 skip:1686 time:11868s shard-snb total:3472 pass:1358 dwarn:1 dfail:0 fail:12 skip:2101 time:6682s
Blacklisted hosts:
shard-kbl total:3468 pass:1919 dwarn:1 dfail:0 fail:24 skip:1523 time:9194s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_871/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for tests/kms_legacy_colorkey: Test a lot more things
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: tests/kms_legacy_colorkey: Test a lot more things
URL : https://patchwork.freedesktop.org/series/37765/
State : success
== Summary ==
IGT patchset tested on top of latest successful build 89b915f5aa465d5c3498b170b1572fae20460491 tests/pm_rpm: Don't try to create an X-tiled ARGB8888 framebuffer
with latest DRM-Tip kernel build CI_DRM_39111bf8f00fed0b drm-tip: 2018y-03m-12d-11h-28m-33s UTC integration manifest
Testlist changes:
+igt@kms_legacy_colorkey@invalid-plane-id
+igt@kms_legacy_colorkey@pipe-a-dst-colorkey
+igt@kms_legacy_colorkey@pipe-a-invalid-flags
+igt@kms_legacy_colorkey@pipe-a-no-colorkey
+igt@kms_legacy_colorkey@pipe-a-src-colorkey
+igt@kms_legacy_colorkey@pipe-a-unsupported-plane
+igt@kms_legacy_colorkey@pipe-b-dst-colorkey
+igt@kms_legacy_colorkey@pipe-b-invalid-flags
+igt@kms_legacy_colorkey@pipe-b-no-colorkey
+igt@kms_legacy_colorkey@pipe-b-src-colorkey
+igt@kms_legacy_colorkey@pipe-b-unsupported-plane
+igt@kms_legacy_colorkey@pipe-c-dst-colorkey
+igt@kms_legacy_colorkey@pipe-c-invalid-flags
+igt@kms_legacy_colorkey@pipe-c-no-colorkey
+igt@kms_legacy_colorkey@pipe-c-src-colorkey
+igt@kms_legacy_colorkey@pipe-c-unsupported-plane
+igt@kms_legacy_colorkey@pipe-d-dst-colorkey
+igt@kms_legacy_colorkey@pipe-d-invalid-flags
+igt@kms_legacy_colorkey@pipe-d-no-colorkey
+igt@kms_legacy_colorkey@pipe-d-src-colorkey
+igt@kms_legacy_colorkey@pipe-d-unsupported-plane
+igt@kms_legacy_colorkey@pipe-e-dst-colorkey
+igt@kms_legacy_colorkey@pipe-e-invalid-flags
+igt@kms_legacy_colorkey@pipe-e-no-colorkey
+igt@kms_legacy_colorkey@pipe-e-src-colorkey
+igt@kms_legacy_colorkey@pipe-e-unsupported-plane
+igt@kms_legacy_colorkey@pipe-f-dst-colorkey
+igt@kms_legacy_colorkey@pipe-f-invalid-flags
+igt@kms_legacy_colorkey@pipe-f-no-colorkey
+igt@kms_legacy_colorkey@pipe-f-src-colorkey
+igt@kms_legacy_colorkey@pipe-f-unsupported-plane
-igt@kms_legacy_colorkey
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:433s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:436s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:386s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:530s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:298s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:509s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:511s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:518s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:500s fi-cfl-8700k total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:409s fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:584s fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:426s fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:315s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:533s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:410s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:429s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:473s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:434s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:473s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:466s fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:514s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:629s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:441s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:531s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:544s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:504s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:508s fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:426s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:441s fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:534s fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:397s
Blacklisted hosts:
fi-cnl-drrs total:288 pass:257 dwarn:3 dfail:0 fail:0 skip:28 time:521s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1108/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✗ Fi.CI.IGT: failure for tests/kms_legacy_colorkey: Test a lot more things
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: tests/kms_legacy_colorkey: Test a lot more things
URL : https://patchwork.freedesktop.org/series/37765/
State : failure
== Summary ==
---- Possible new issues:
Test kms_chv_cursor_fail:
Subgroup pipe-a-128x128-top-edge:
fail -> PASS (shard-apl)
Test kms_cursor_crc:
Subgroup cursor-128x42-random:
pass -> DMESG-FAIL (shard-hsw)
Test kms_frontbuffer_tracking:
Subgroup fbc-rgb101010-draw-mmap-cpu:
pass -> FAIL (shard-apl)---- Known issues:
Test gem_eio:
Subgroup in-flight-contexts:
incomplete -> PASS (shard-apl) fdo#105341
Test kms_sysfs_edid_timing:
warn -> PASS (shard-apl) fdo#100047
Test pm_lpsp:
Subgroup screens-disabled:
fail -> PASS (shard-hsw) fdo#104941fdo#105341 https://bugs.freedesktop.org/show_bug.cgi?id=105341
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#104941 https://bugs.freedesktop.org/show_bug.cgi?id=104941
shard-apl total:3503 pass:1845 dwarn:1 dfail:0 fail:8 skip:1649 time:12918s shard-hsw total:3503 pass:1791 dwarn:1 dfail:1 fail:2 skip:1707 time:11793s shard-snb total:3503 pass:1375 dwarn:1 dfail:0 fail:3 skip:2124 time:7212s
Blacklisted hosts:
shard-kbl total:3358 pass:1892 dwarn:1 dfail:0 fail:9 skip:1454 time:9133s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1108/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev