diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-21 17:16:03 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-21 17:36:02 +0000 |
commit | 83884e97e18739e3588c6467a210838099d42073 (patch) | |
tree | 778bab4b309c852d3649cc901952267d0cbb5992 /tests/chamelium.c | |
parent | 25fbae15262cf570e207e62f50e7c5233e06bc67 (diff) |
Restore "lib: Open debugfs files for the given DRM device"
This reverts commit 25fbae15262cf570e207e62f50e7c5233e06bc67, restoring
commit 301ad44cdf1b868b1ab89096721da91fa8541fdc
Author: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Thu Mar 2 10:37:11 2017 +0100
lib: Open debugfs files for the given DRM device
with fixes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/chamelium.c')
-rw-r--r-- | tests/chamelium.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/chamelium.c b/tests/chamelium.c index 810c955e..dc631161 100644 --- a/tests/chamelium.c +++ b/tests/chamelium.c @@ -154,7 +154,7 @@ test_basic_hotplug(data_t *data, struct chamelium_port *port) int i; reset_state(data, port); - igt_hpd_storm_set_threshold(0); + igt_hpd_storm_set_threshold(data->drm_fd, 0); for (i = 0; i < 15; i++) { igt_flush_hotplugs(mon); @@ -175,7 +175,7 @@ test_basic_hotplug(data_t *data, struct chamelium_port *port) } igt_cleanup_hotplug(mon); - igt_hpd_storm_reset(); + igt_hpd_storm_reset(data->drm_fd); } static void @@ -536,12 +536,12 @@ test_hpd_storm_detect(data_t *data, struct chamelium_port *port, int width) struct udev_monitor *mon; int count = 0; - igt_require_hpd_storm_ctl(); + igt_require_hpd_storm_ctl(data->drm_fd); reset_state(data, port); - igt_hpd_storm_set_threshold(1); + igt_hpd_storm_set_threshold(data->drm_fd, 1); chamelium_fire_hpd_pulses(data->chamelium, port, width, 10); - igt_assert(igt_hpd_storm_detected()); + igt_assert(igt_hpd_storm_detected(data->drm_fd)); mon = igt_watch_hotplug(); chamelium_fire_hpd_pulses(data->chamelium, port, width, 10); @@ -555,21 +555,21 @@ test_hpd_storm_detect(data_t *data, struct chamelium_port *port, int width) igt_assert_lt(count, 2); igt_cleanup_hotplug(mon); - igt_hpd_storm_reset(); + igt_hpd_storm_reset(data->drm_fd); } static void test_hpd_storm_disable(data_t *data, struct chamelium_port *port, int width) { - igt_require_hpd_storm_ctl(); + igt_require_hpd_storm_ctl(data->drm_fd); reset_state(data, port); - igt_hpd_storm_set_threshold(0); + igt_hpd_storm_set_threshold(data->drm_fd, 0); chamelium_fire_hpd_pulses(data->chamelium, port, width, 10); - igt_assert(!igt_hpd_storm_detected()); + igt_assert(!igt_hpd_storm_detected(data->drm_fd)); - igt_hpd_storm_reset(); + igt_hpd_storm_reset(data->drm_fd); } #define for_each_port(p, port) \ |