[Mesa-dev] [PATCHv2 01/22] gallium/ilo: cleanup intel_winsys.h
Emil Velikov
emil.l.velikov at gmail.com
Tue Aug 19 02:32:17 PDT 2014
Make the header location, inclusion and contents more common with
its i915,r* and nouveau counterparts:
- Move the header within drivers/ilo.
- Separate out intel_winsys_create_for_fd into 'drm_public' header.
- Cleanup the compiler includes.
v2: Move the header to drivers/ilo. Suggested by Chia-I.
Cc: Chia-I Wu <olvaffe at gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
The patch is generated with -M, and likely won't apply as is.
It makes it alot easier to read though ;)
-Emil
src/gallium/auxiliary/target-helpers/inline_drm_helper.h | 2 +-
src/gallium/drivers/ilo/Android.mk | 3 +--
src/gallium/drivers/ilo/Makefile.am | 1 -
src/gallium/winsys/intel/drm/Makefile.am | 1 +
src/gallium/winsys/intel/drm/intel_drm_public.h | 8 ++++++++
src/gallium/winsys/intel/drm/intel_drm_winsys.c | 3 ++-
src/gallium/winsys/intel/{ => drm}/intel_winsys.h | 3 ---
7 files changed, 13 insertions(+), 8 deletions(-)
create mode 100644 src/gallium/winsys/intel/drm/intel_drm_public.h
rename src/gallium/winsys/intel/{ => drm}/intel_winsys.h (99%)
diff --git a/src/gallium/auxiliary/target-helpers/inline_drm_helper.h b/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
index 4ef94de..dd55a71 100644
--- a/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
+++ b/src/gallium/auxiliary/target-helpers/inline_drm_helper.h
@@ -19,7 +19,7 @@
#endif
#if GALLIUM_ILO
-#include "intel/intel_winsys.h"
+#include "intel/drm/intel_drm_public.h"
#include "ilo/ilo_public.h"
#endif
diff --git a/src/gallium/drivers/ilo/Android.mk b/src/gallium/drivers/ilo/Android.mk
index 2b06663..39de3a6 100644
--- a/src/gallium/drivers/ilo/Android.mk
+++ b/src/gallium/drivers/ilo/Android.mk
@@ -28,8 +28,7 @@ include $(LOCAL_PATH)/Makefile.sources
include $(CLEAR_VARS)
LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(GALLIUM_TOP)/winsys/intel
+ $(LOCAL_PATH)/include
LOCAL_SRC_FILES := $(C_SOURCES)
diff --git a/src/gallium/drivers/ilo/Makefile.am b/src/gallium/drivers/ilo/Makefile.am
index 04d4da8..75213d4 100644
--- a/src/gallium/drivers/ilo/Makefile.am
+++ b/src/gallium/drivers/ilo/Makefile.am
@@ -27,7 +27,6 @@ include Makefile.sources
include $(top_srcdir)/src/gallium/Automake.inc
AM_CPPFLAGS = \
- -I$(top_srcdir)/src/gallium/winsys/intel \
$(GALLIUM_DRIVER_CFLAGS)
noinst_LTLIBRARIES = libilo.la
diff --git a/src/gallium/winsys/intel/drm/Makefile.am b/src/gallium/winsys/intel/drm/Makefile.am
index 30f4486..fbe1cea 100644
--- a/src/gallium/winsys/intel/drm/Makefile.am
+++ b/src/gallium/winsys/intel/drm/Makefile.am
@@ -25,6 +25,7 @@ include Makefile.sources
include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
+ -I$(top_srcdir)/src/gallium/drivers \
$(GALLIUM_WINSYS_CFLAGS) \
$(INTEL_CFLAGS)
diff --git a/src/gallium/winsys/intel/drm/intel_drm_public.h b/src/gallium/winsys/intel/drm/intel_drm_public.h
new file mode 100644
index 0000000..0e39dfb
--- /dev/null
+++ b/src/gallium/winsys/intel/drm/intel_drm_public.h
@@ -0,0 +1,8 @@
+#ifndef INTEL_DRM_PUBLIC_H
+#define INTEL_DRM_PUBLIC_H
+
+struct intel_winsys;
+
+struct intel_winsys *intel_winsys_create_for_fd(int fd);
+
+#endif
diff --git a/src/gallium/winsys/intel/drm/intel_drm_winsys.c b/src/gallium/winsys/intel/drm/intel_drm_winsys.c
index b394e5f..2c8f7b2 100644
--- a/src/gallium/winsys/intel/drm/intel_drm_winsys.c
+++ b/src/gallium/winsys/intel/drm/intel_drm_winsys.c
@@ -41,7 +41,8 @@
#include "util/u_inlines.h"
#include "util/u_memory.h"
#include "util/u_debug.h"
-#include "../intel_winsys.h"
+#include "intel_drm_public.h"
+#include "intel/intel_winsys.h"
#define BATCH_SZ (8192 * sizeof(uint32_t))
diff --git a/src/gallium/winsys/intel/intel_winsys.h b/src/gallium/winsys/intel/drm/intel_winsys.h
similarity index 99%
rename from src/gallium/winsys/intel/intel_winsys.h
rename to src/gallium/winsys/intel/drm/intel_winsys.h
index 4bf9a16..932ffb5 100644
--- a/src/gallium/winsys/intel/intel_winsys.h
+++ b/src/gallium/winsys/intel/drm/intel_winsys.h
@@ -82,9 +82,6 @@ struct intel_winsys_info {
bool has_gen7_sol_reset;
};
-struct intel_winsys *
-intel_winsys_create_for_fd(int fd);
-
void
intel_winsys_destroy(struct intel_winsys *winsys);
--
2.0.2
More information about the mesa-dev
mailing list