tests/kms_cursor_crc: Open DRM device with DRIVER_ANY
PATCH v2 1/1 tests/kms_cursor_crc: Open DRM device with DRIVER_ANY
So that this test can be run in drivers other than i915. Remove devid and only check it if the driver is i915.
---
changes in v2:
- return false for has_nonsquare_cursors() when driver not i915.
tests/kms_cursor_crc.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-)
tests/kms_cursor_crc.c +21 -10
@@ -59,7 +59,6 @@ typedef struct {int curw, curh;/* cursor size */ int cursor_max_w, cursor_max_h;igt_pipe_crc_t *pipe_crc; -uint32_t devid;unsigned flags; } data_t;
@@ -108,6 +107,13 @@ static void cursor_disable(data_t *data)static bool chv_cursor_broken (data_t *data,int x) { +uint32_t devid; + +if (!is_i915_device (data->drm_fd)) +return false; + + devid =intel_get_drm_devid (data->drm_fd); +/* * CHV gets a FIFO underrun on pipe C when cursor x coordinate * is negative and the cursor visible.
@@ -121,7 +127,7 @@ static bool chv_cursor_broken(data_t *data, int x)if (x >=0 )return false; -return IS_CHERRYVIEW (data->devid) && data->pipe ==PIPE_C ; +return IS_CHERRYVIEW (devid) && data->pipe ==PIPE_C ; }static bool cursor_visible (data_t *data,int x,int y)
@@ -459,8 +465,15 @@ static void create_cursor_fb(data_t *data, int cur_w, int cur_h)igt_put_cairo_ctx (data->drm_fd, &data->fb, cr); } -static bool has_nonsquare_cursors (uint32_t devid) +static bool has_nonsquare_cursors (data_t *data) { +uint32_t devid; + +if (!is_i915_device (data->drm_fd)) +return false; + + devid =intel_get_drm_devid (data->drm_fd); +/* * Test non-square cursors a bit on the platforms * that support such things.
@@ -616,19 +629,19 @@ static void run_test_generic(data_t *data)/* Using created cursor FBs to test cursor support */ igt_subtest_f("cursor-%dx%d-onscreen", w, h) { -igt_require (has_nonsquare_cursors (data->devid)); +igt_require (has_nonsquare_cursors (data));run_test (data, test_crc_onscreen, w, h); } igt_subtest_f("cursor-%dx%d-offscreen", w, h) { -igt_require (has_nonsquare_cursors (data->devid)); +igt_require (has_nonsquare_cursors (data));run_test (data, test_crc_offscreen, w, h); } igt_subtest_f("cursor-%dx%d-sliding", w, h) { -igt_require (has_nonsquare_cursors (data->devid)); +igt_require (has_nonsquare_cursors (data));run_test (data, test_crc_sliding, w, h); } igt_subtest_f("cursor-%dx%d-random", w, h) { -igt_require (has_nonsquare_cursors (data->devid)); +igt_require (has_nonsquare_cursors (data));run_test (data, test_crc_random, w, h); }
@@ -647,9 +660,7 @@ igt_mainigt_skip_on_simulation (); igt_fixture { - data.drm_fd =drm_open_driver_master (DRIVER_INTEL ); - - data.devid =intel_get_drm_devid (data.drm_fd); + data.drm_fd =drm_open_driver_master (DRIVER_ANY ); ret =drmGetCap (data.drm_fd,DRM_CAP_CURSOR_WIDTH , &cursor_width);igt_assert (ret ==0 || errno ==EINVAL );
Signature · 6 lines
2.17.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for tests/kms_cursor_crc: Open DRM device with DRIVER_ANY (rev2)
== Series Details ==
== Series Details ==
Series: tests/kms_cursor_crc: Open DRM device with DRIVER_ANY (rev2)
URL : https://patchwork.freedesktop.org/series/48153/
State : success
== Summary ==
= CI Bug Log - changes from IGT_4603_full -> IGTPW_1725_full =
== Summary - WARNING ==
Minor unknown changes coming with IGTPW_1725_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_1725_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48153/revisions/2/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1725_full:
=== IGT changes ===
==== Warnings ====
igt@pm_rc6_residency@rc6-accuracy:
shard-snb: SKIP -> PASS== Known issues ==
Here are the changes found in IGTPW_1725_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_schedule@pi-ringfull-vebox:
shard-kbl: NOTRUN -> FAIL (fdo#103158) +1
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-wc:
shard-snb: PASS -> INCOMPLETE (fdo#105411)
==== Possible fixes ====
igt@kms_rotation_crc@primary-rotation-180:
shard-snb: FAIL (fdo#103925) -> PASS
igt@kms_setmode@basic:
shard-apl: FAIL (fdo#99912) -> PASS
igt@perf_pmu@semaphore-wait-idle-bcs0:
shard-snb: INCOMPLETE (fdo#105411) -> SKIP fdo#103158 https://bugs.freedesktop.org/show_bug.cgi?id=103158
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* IGT: IGT_4603 -> IGTPW_1725
* Linux: CI_DRM_4677 -> CI_DRM_4680
CI_DRM_4677: 1af9e170b6469a64c82f5a4961a2be2f0fc1ff0a @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4680: c0adc75a6340ba5a3f9cf07c5064627ee73b9ba9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1725: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1725/
IGT_4603: 1598fdb717546e25e8077935daa8e97768ad245d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1725/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Daniel Vetter
AppliedQuoted 7 lines · Haneen Mohammed
So that this test can be run in drivers other than i915. Remove devid and only check it if the driver is i915.
Signed-off-by Haneen Mohammed <[email protected]>---
changes in v2:
- return false forhas_nonsquare_cursors()when driver not i915.
Applied, thanks.
-Daniel
Quoted 94 lines
tests/kms_cursor_crc.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-)tests/kms_cursor_crc.c +21
-10@@ -59,7 +59,6 @@ typedef struct {int curw, curh;/* cursor size */ int cursor_max_w, cursor_max_h;igt_pipe_crc_t *pipe_crc; -uint32_t devid;unsigned flags; } data_t;@@ -108,6 +107,13 @@ static void cursor_disable(data_t *data)static bool chv_cursor_broken (data_t *data,int x) { +uint32_t devid; + +if (!is_i915_device (data->drm_fd)) +return false; + + devid =intel_get_drm_devid (data->drm_fd); +/* * CHV gets a FIFO underrun on pipe C when cursor x coordinate * is negative and the cursor visible. @@ -121,7 +127,7 @@ static bool chv_cursor_broken(data_t *data, int x)if (x >=0 )return false; -return IS_CHERRYVIEW (data->devid) && data->pipe ==PIPE_C ; +return IS_CHERRYVIEW (devid) && data->pipe ==PIPE_C ; }static bool cursor_visible (data_t *data,int x,int y)@@ -459,8 +465,15 @@ static void create_cursor_fb(data_t *data, int cur_w, int cur_h)igt_put_cairo_ctx (data->drm_fd, &data->fb, cr); } -static bool has_nonsquare_cursors (uint32_t devid) +static bool has_nonsquare_cursors (data_t *data) { +uint32_t devid; + +if (!is_i915_device (data->drm_fd)) +return false; + + devid =intel_get_drm_devid (data->drm_fd); +/* * Test non-square cursors a bit on the platforms * that support such things. @@ -616,19 +629,19 @@ static void run_test_generic(data_t *data)/* Using created cursor FBs to test cursor support */ igt_subtest_f("cursor-%dx%d-onscreen", w, h) { -igt_require (has_nonsquare_cursors (data->devid)); +igt_require (has_nonsquare_cursors (data));run_test (data, test_crc_onscreen, w, h); } igt_subtest_f("cursor-%dx%d-offscreen", w, h) { -igt_require (has_nonsquare_cursors (data->devid)); +igt_require (has_nonsquare_cursors (data));run_test (data, test_crc_offscreen, w, h); } igt_subtest_f("cursor-%dx%d-sliding", w, h) { -igt_require (has_nonsquare_cursors (data->devid)); +igt_require (has_nonsquare_cursors (data));run_test (data, test_crc_sliding, w, h); } igt_subtest_f("cursor-%dx%d-random", w, h) { -igt_require (has_nonsquare_cursors (data->devid)); +igt_require (has_nonsquare_cursors (data));run_test (data, test_crc_random, w, h); }@@ -647,9 +660,7 @@ igt_mainigt_skip_on_simulation (); igt_fixture { - data.drm_fd =drm_open_driver_master (DRIVER_INTEL ); - - data.devid =intel_get_drm_devid (data.drm_fd); + data.drm_fd =drm_open_driver_master (DRIVER_ANY ); ret =drmGetCap (data.drm_fd,DRM_CAP_CURSOR_WIDTH , &cursor_width);igt_assert (ret ==0 || errno ==EINVAL );Signature · 1 line
2.17.1
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev