lib/i915: Query semaphore status using GETPARAM
PATCH 1/1 lib/i915: Query semaphore status using GETPARAM
Wherever possible we want to use existing ioctls rather than poking the volatile modparams, in this case we already provide I915_PARAM_HAS_SEMAPHORES so we have no excuse to peek i915.semaphores.
--- lib/i915/gem_submission.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
lib/i915/gem_submission.c +16 -1
@@ -22,6 +22,9 @@*/ #include <stdbool.h> +#include <sys/ioctl.h> + +#include <i915_drm.h> #include "igt_core.h" #include "igt_sysfs.h"
@@ -41,6 +44,18 @@* semaphores for synchronization between engines. */ +static bool has_semaphores (int fd,int dir) +{ +int val =0 ; +struct drm_i915_getparam gp = { + gp.param =I915_PARAM_HAS_SEMAPHORES , + gp.value = &val, + }; +if (ioctl (fd,DRM_IOCTL_I915_GETPARAM , &gp) <0 ) + val =igt_sysfs_get_boolean (dir,"semaphores" ); +return val; +} +/** * gem_submission_method: * @fd: open i915 drm file descriptor
@@ -69,7 +84,7 @@ unsigned gem_submission_method(int fd) goto out; } - active =igt_sysfs_get_boolean (dir,"semaphores" ); + active =has_semaphores (fd, dir);if (active) { flags |=GEM_SUBMISSION_SEMAPHORES ; }
Signature · 6 lines
2.15.0.rc2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for lib/i915: Query semaphore status using GETPARAM
== Series Details ==
== Series Details ==
Series: lib/i915: Query semaphore status using GETPARAM
URL : https://patchwork.freedesktop.org/series/32799/
State : warning
== Summary ==
IGT patchset tested on top of latest successful build 1fc4de1ca390adec9be8bd7cc0c36cab07465959 igt/gem_exec_latency: Wire up an interloper for preemption
with latest DRM-Tip kernel build CI_DRM_3292d0582552491e drm-tip: 2017y-10m-27d-19h-16m-21s UTC integration manifest
No testlist changes.
Test gem_exec_basic:
Subgroup basic-blt:
pass -> DMESG-WARN (fi-bsw-n3050)fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:442s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:458s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:377s fi-bsw-n3050 total:289 pass:242 dwarn:1 dfail:0 fail:0 skip:46 time:525s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:268s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:501s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:502s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:496s fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:484s fi-cnl-y total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:620s fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:429s fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:261s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:586s fi-glk-dsi total:289 pass:258 dwarn:0 dfail:0 fail:1 skip:30 time:487s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:429s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:429s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:426s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:499s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:459s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:488s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:575s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:481s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:582s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:546s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:446s fi-skl-6600u total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:594s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:654s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:523s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:501s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:456s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:567s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:423s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_433/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 43 lines · Chris Wilson
Wherever possible we want to use existing ioctls rather than poking the volatile modparams, in this case we already provide
I915_PARAM_HAS_SEMAPHORESso we have no excuse to peek i915.semaphores.Signed-off-by Chris Wilson <[email protected]>--- lib/i915/gem_submission.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)lib/i915/gem_submission.c +15
-0@@ -22,6 +22,9 @@*/ #include <stdbool.h> +#include <sys/ioctl.h> + +#include <i915_drm.h> #include "igt_core.h" #include "igt_sysfs.h" @@ -41,6 +44,18 @@* semaphores for synchronization between engines. */ +static bool has_semaphores (int fd,int dir) +{ +int val =0 ; +struct drm_i915_getparam gp = { + gp.param =I915_PARAM_HAS_SEMAPHORES , + gp.value = &val, + }; +if (ioctl (fd,DRM_IOCTL_I915_GETPARAM , &gp) <0 ) + val =igt_sysfs_get_boolean (dir,"semaphores" ); +return val; +} +/** * gem_submission_method: * @fd: open i915 drm file descriptor
lib/i915/gem_submission.c unsigned gem_submission_method(int fd) · line 90
Quoted 8 lines
lib/i915/gem_submission.c +1
-1@@ -69,7 +84,7 @@ unsigned gem_submission_method(int fd) goto out; } - active =igt_sysfs_get_boolean (dir,"semaphores" ); + active =has_semaphores (fd, dir);if (active) { flags |=GEM_SUBMISSION_SEMAPHORES ; }
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx