diff mbox

[i-g-t] lib/igt_kms.c: Unconditionally include poll.h

Message ID 20180109101124.29060-1-petri.latvala@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Petri Latvala Jan. 9, 2018, 10:11 a.m. UTC
Commit 98c64b33a793 ("lib/igt_kms: Drop all stale events on first
commit.") added a use of poll() to igt_kms.c, but that file only
includes poll.h when HAVE_UDEV is defined. Move the include outside
the UDEV conditional.

Fixes: 98c64b33a793 ("lib/igt_kms: Drop all stale events on first commit.")
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/igt_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chris Wilson Jan. 9, 2018, 10:22 a.m. UTC | #1
Quoting Petri Latvala (2018-01-09 10:11:24)
> Commit 98c64b33a793 ("lib/igt_kms: Drop all stale events on first
> commit.") added a use of poll() to igt_kms.c, but that file only
> includes poll.h when HAVE_UDEV is defined. Move the include outside
> the UDEV conditional.

We should probably stop making udev conditional. We rely on udev for
uevent detection, in particular for detecting GPU hangs.
-Chris
Chris Wilson Jan. 9, 2018, 11:03 a.m. UTC | #2
Quoting Petri Latvala (2018-01-09 10:11:24)
> Commit 98c64b33a793 ("lib/igt_kms: Drop all stale events on first
> commit.") added a use of poll() to igt_kms.c, but that file only
> includes poll.h when HAVE_UDEV is defined. Move the include outside
> the UDEV conditional.
> 
> Fixes: 98c64b33a793 ("lib/igt_kms: Drop all stale events on first commit.")
> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
Rhys Kidd Jan. 10, 2018, 5:22 a.m. UTC | #3
On 9 January 2018 at 05:11, Petri Latvala <petri.latvala@intel.com> wrote:

> Commit 98c64b33a793 ("lib/igt_kms: Drop all stale events on first
> commit.") added a use of poll() to igt_kms.c, but that file only
> includes poll.h when HAVE_UDEV is defined. Move the include outside
> the UDEV conditional.
>
> Fixes: 98c64b33a793 ("lib/igt_kms: Drop all stale events on first commit.")
> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>

I have also hit this issue, and spun up locally the equivalent patch fix,
so also gets my:

Reviewed-by: Rhys Kidd <rhyskidd@gmail.com>


> ---
>  lib/igt_kms.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index ec3b7167..069752ec 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -40,8 +40,8 @@
>  #endif
>  #ifdef HAVE_UDEV
>  #include <libudev.h>
> -#include <poll.h>
>  #endif
> +#include <poll.h>
>  #include <errno.h>
>  #include <time.h>
>
> --
> 2.14.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
diff mbox

Patch

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index ec3b7167..069752ec 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -40,8 +40,8 @@ 
 #endif
 #ifdef HAVE_UDEV
 #include <libudev.h>
-#include <poll.h>
 #endif
+#include <poll.h>
 #include <errno.h>
 #include <time.h>