diff options
author | Lyude <lyude@redhat.com> | 2016-11-17 10:06:09 -0500 |
---|---|---|
committer | Lyude <lyude@redhat.com> | 2017-01-26 11:21:42 -0500 |
commit | 6adb7b3737297a32bef50ffb270b83fc314cca6b (patch) | |
tree | 71da9f043eabf8a4c1bed2fa18d0b8916e1b5057 /lib/igt_kms.h | |
parent | c2ddb81c460f95e0074c43687e4bb45fe893198f (diff) |
igt_kms: Add helpers for watching for sysfs hotplug events
This adds some basic helpers for connecting to udev and watching for
sysfs hotplug events.
Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Lyude <lyude@redhat.com>
Changes since v1:
- Remove unused arg from documentation
Changes since v2:
- Make udev_monitor explicit so that we can use this for detecting FSMs
from the Chamelium in rpc calls
Diffstat (limited to 'lib/igt_kms.h')
-rw-r--r-- | lib/igt_kms.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/igt_kms.h b/lib/igt_kms.h index 81be77f5..72ed6a3e 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -502,5 +502,12 @@ uint32_t kmstest_get_vbl_flag(uint32_t pipe_id); const unsigned char* igt_kms_get_base_edid(void); const unsigned char* igt_kms_get_alt_edid(void); +#ifdef HAVE_UDEV +struct udev_monitor *igt_watch_hotplug(void); +bool igt_hotplug_detected(struct udev_monitor *mon, + int timeout_secs); +void igt_flush_hotplugs(struct udev_monitor *mon); +void igt_cleanup_hotplug(struct udev_monitor *mon); +#endif #endif /* __IGT_KMS_H__ */ |