Commit d75e676f authored by Antonio Argenziano's avatar Antonio Argenziano Committed by Arkadiusz Hiler

igt: Make libudev mandatory

Since more essential components use libudev, make its dependency
mandatory.
Signed-off-by: Antonio Argenziano's avatarAntonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
Acked-by: Petri Latvala's avatarPetri Latvala <petri.latvala@intel.com>
parent 148737b8
......@@ -176,11 +176,7 @@ PKG_CHECK_MODULES(XRANDR, xrandr >= 1.3, AC_DEFINE(HAVE_XRANDR, 1, [Have libXran
# for testdisplay
PKG_CHECK_MODULES(CAIRO, [cairo >= 1.12.0])
PKG_CHECK_MODULES(LIBUDEV, [libudev], [udev=yes], [udev=no])
AM_CONDITIONAL(HAVE_UDEV, [test "x$udev" = xyes])
if test x"$udev" = xyes; then
AC_DEFINE(HAVE_UDEV,1,[Enable udev-based monitor hotplug detection])
fi
PKG_CHECK_MODULES(LIBUDEV, [libudev])
PKG_CHECK_MODULES(GLIB, [glib-2.0], [glib=yes], [glib=no])
if test x"$glib" = xyes; then
AC_DEFINE(HAVE_GLIB,1,[Enable glib support])
......@@ -210,9 +206,6 @@ if test "x$enable_chamelium" = xyes; then
fi
PKG_CHECK_MODULES(PIXMAN, pixman-1, [],
[AC_MSG_ERROR([Failed to find pixman, required by chamelium.])])
if test x"$udev" != xyes; then
AC_MSG_ERROR([Failed to find udev, required by chamelium.])
fi
if test x"$glib" != xyes; then
AC_MSG_ERROR([Failed to find glib, required by chamelium.])
fi
......
......@@ -50,6 +50,7 @@
#include <assert.h>
#include <proc/readproc.h>
#include <libudev.h>
#include "drmtest.h"
#include "i915_drm.h"
......@@ -425,8 +426,6 @@ void igt_stop_shrink_helper(void)
igt_stop_helper(&shrink_helper);
}
#ifdef HAVE_UDEV
#include <libudev.h>
static struct igt_helper_process hang_detector;
static void __attribute__((noreturn))
......@@ -506,17 +505,6 @@ void igt_stop_hang_detector(void)
{
igt_stop_helper(&hang_detector);
}
#else
void igt_fork_hang_detector(int fd)
{
if (igt_only_list_subtests())
return;
}
void igt_stop_hang_detector(void)
{
}
#endif
/**
* igt_check_boolean_env_var:
......
......@@ -39,9 +39,8 @@
#elif HAVE_SYS_KD_H
#include <sys/kd.h>
#endif
#ifdef HAVE_UDEV
#include <libudev.h>
#endif
#include <poll.h>
#include <errno.h>
#include <time.h>
......@@ -3698,8 +3697,6 @@ void igt_reset_connectors(void)
"detect");
}
#ifdef HAVE_UDEV
/**
* igt_watch_hotplug:
*
......@@ -3804,7 +3801,6 @@ void igt_cleanup_hotplug(struct udev_monitor *mon)
mon = NULL;
udev_unref(udev);
}
#endif
/**
* kmstest_get_vbl_flag:
......
......@@ -665,12 +665,10 @@ 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__ */
......@@ -48,12 +48,7 @@ if valgrind.found()
endif
cairo = dependency('cairo', version : '>1.12.0', required : true)
libudev = dependency('libudev', required : false)
if libudev.found()
config.set('HAVE_UDEV', 1)
endif
libudev = dependency('libudev', required : true)
glib = dependency('glib-2.0', required : false)
if glib.found()
config.set('HAVE_GLIB', 1)
......
......@@ -32,7 +32,6 @@
#include "config.h"
#ifdef HAVE_UDEV
#include <libudev.h>
static struct udev_monitor *uevent_monitor;
static struct udev *udev;
......@@ -125,14 +124,3 @@ void testdisplay_cleanup_hotplug(void)
if (udev)
udev_unref(udev);
}
#else
gboolean testdisplay_setup_hotplug(void)
{
igt_warn("no hotplug support on this platform\n");
return TRUE;
}
void testdisplay_cleanup_hotplug(void)
{
}
#endif
......@@ -7,11 +7,9 @@ bin_PROGRAMS += $(LIBDRM_INTEL_BIN)
intel_error_decode_LDFLAGS = -lz
endif
if HAVE_UDEV
bin_PROGRAMS += intel_dp_compliance
intel_dp_compliance_CFLAGS = $(AM_CFLAGS)
intel_dp_compliance_LDADD = $(top_builddir)/lib/libintel_tools.la
endif
SUBDIRS = null_state_gen registers
......
......@@ -39,10 +39,8 @@
#include "igt_sysfs.h"
#include "drmtest.h"
#include "config.h"
#ifdef HAVE_UDEV
#include <libudev.h>
#include <syslog.h>
#endif
#include "intel_l3_parity.h"
static unsigned int devid;
......@@ -318,10 +316,6 @@ int main(int argc, char *argv[])
/* Daemon doesn't work like the other commands */
if (action == 'L') {
#ifndef HAVE_UDEV
fprintf(stderr, "Daemon requires udev support. Please reconfigure.\n");
exit(EXIT_FAILURE);
#else
struct l3_parity par;
struct l3_location loc;
if (daemonize) {
......@@ -332,7 +326,6 @@ int main(int argc, char *argv[])
assert(l3_uevent_setup(&par) == 0);
assert(l3_listen(&par, daemonize == 1, &loc) == 0);
exit(EXIT_SUCCESS);
#endif
}
if (action == 'l')
......
......@@ -18,14 +18,9 @@ struct l3_location {
uint8_t subbank;
};
#ifdef HAVE_UDEV
int l3_uevent_setup(struct l3_parity *par);
/* Listens (blocks) for an l3 parity event. Returns the location of the error. */
int l3_listen(struct l3_parity *par, bool daemon, struct l3_location *loc);
#define l3_uevent_teardown(par) {}
#else
#define l3_uevent_setup(par, daemon, loc) -1
#define l3_listen(par) -1
#endif
#endif
......@@ -23,7 +23,6 @@
#include "config.h"
#ifdef HAVE_UDEV
#include <libudev.h>
#include <stdio.h>
#include <stdlib.h>
......@@ -123,4 +122,3 @@ again:
return 0;
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment