[Intel-gfx] [PATCH i-g-t 07/22] lib: clean up header includes

Chris Wilson chris at chris-wilson.co.uk
Wed Sep 6 11:44:20 UTC 2017


Quoting Daniel Vetter (2017-09-05 13:36:09)
> diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
> index f2a94b5572ea..a2061ff6138e 100644
> --- a/lib/igt_dummyload.c
> +++ b/lib/igt_dummyload.c
> @@ -22,11 +22,18 @@
>   *
>   */
>  
> -#include "igt.h"
> -#include "igt_dummyload.h"
>  #include <time.h>
>  #include <signal.h>
>  #include <sys/syscall.h>
> +#include <sys/mman.h>

For PROT_*? It's using the gem_mmap/gem_munmap interfaces, should we not
then be defining PROT_* as part of that interface.

We don't need the raw syscall interface here.

> +
> +#include <i915_drm.h>
> +
> +#include "igt_dummyload.h"
> +#include "igt_gt.h"
> +#include "intel_batchbuffer.h"

What are we pulling in from batchbuffer.h? I think you mean intel_reg.h.
Both are inappropriate places for MI commands.

igt_core.h for igt_require

-#include "igt.h"
-#include "igt_dummyload.h"
 #include <time.h>
 #include <signal.h>
-#include <sys/syscall.h>
+
+#include <i915_drm.h>
+
+#include "igt_core.h"
+#include "igt_dummyload.h"
+#include "igt_gt.h"
+#include "intel_chipset.h"
+#include "intel_reg.h"
+#include "ioctl_wrappers.h"

plus the indirect sys/mman.h via ioctl_wrappers.h
-Chris


More information about the Intel-gfx mailing list