All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Added support for Android
@ 2012-02-06 10:07 Sateesh Kavuri
  2012-02-10 17:46 ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: Sateesh Kavuri @ 2012-02-06 10:07 UTC (permalink / raw)
  To: intel-gfx

 Added the Android.mk file as per Android make system. Also had to modify
 the headers with the proper location for fcntl.h as per the Android
 bionic headers location

Signed-off-by: Sateesh Kavuri <sateesh.kavuri@intel.com>
---
 Android.mk       |  531 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/intel_drm.c  |    4 +
 lib/intel_mmio.c |    4 +
 lib/intel_pci.c  |    4 +
 4 files changed, 543 insertions(+), 0 deletions(-)
 create mode 100644 Android.mk

diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..3be3462
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,531 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=                     	\
+       tools/intel_reg_write.c         	\
+       lib/intel_pci.c 			\
+       lib/intel_gpu_tools.h         	\
+       tools/intel_reg.h               	\
+       lib/intel_batchbuffer.h       	\
+       lib/intel_batchbuffer.c       	\
+	lib/intel_reg_map.c 		\
+       lib/intel_mmio.c       		\
+       tools/intel_chipset.h
+       
+
+LOCAL_C_INCLUDES +=            	       			\
+       $(LOCAL_PATH)/lib				\
+       $(TOPDIR)hardware/intel/libdrm/include/drm 	\
+       $(TOPDIR)hardware/intel/libdrm/intel 		\
+       $(LOCAL_PATH)/../libpciaccess/include/ 
+
+LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+LOCAL_CFLAGS += -DANDROID
+
+LOCAL_MODULE := intel_reg_write
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := libpciaccess 	\
+                          libdrm 	\
+                          libdrm_intel
+
+include $(BUILD_EXECUTABLE)
+
+#================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=                     	\
+       tools/intel_reg_read.c          	\
+       lib/intel_pci.c			\
+       lib/intel_gpu_tools.h         	\
+       tools/intel_reg.h               	\
+       lib/intel_batchbuffer.h       	\
+       lib/intel_batchbuffer.c       	\
+	lib/intel_reg_map.c 		\
+       lib/intel_mmio.c       		\
+       tools/intel_chipset.h
+       
+
+LOCAL_C_INCLUDES +=					\
+       $(LOCAL_PATH)/lib 				\
+       $(TOPDIR)hardware/intel/libdrm/include/drm 	\
+       $(TOPDIR)hardware/intel/libdrm/intel 		\
+       $(LOCAL_PATH)/../libpciaccess/include/
+
+LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+LOCAL_CFLAGS += -DANDROID
+
+
+LOCAL_MODULE := intel_reg_read
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := libpciaccess 	\
+                          libdrm 	\
+                          libdrm_intel
+
+include $(BUILD_EXECUTABLE)
+
+#================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=				\
+       tools/intel_disable_clock_gating.c	\
+       lib/intel_pci.c 				\
+       lib/intel_gpu_tools.h         		\
+       tools/intel_reg.h               		\
+       lib/intel_batchbuffer.h       		\
+       lib/intel_batchbuffer.c       		\
+       lib/intel_mmio.c       			\
+       tools/intel_chipset.h
+       
+
+LOCAL_C_INCLUDES +=            			        \
+       $(LOCAL_PATH)/lib 				\
+       $(TOPDIR)hardware/intel/libdrm/include/drm 	\
+       $(TOPDIR)hardware/intel/libdrm/intel 		\
+       $(LOCAL_PATH)/../libpciaccess/include/
+
+LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+LOCAL_CFLAGS += -DANDROID
+
+
+LOCAL_MODULE := intel_disable_clock_gating
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := libpciaccess 	\
+                          libdrm 	\
+                          libdrm_intel
+
+include $(BUILD_EXECUTABLE)
+
+#================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=			\
+       tools/intel_audio_dump.c         \
+       lib/intel_pci.c			\
+       lib/intel_gpu_tools.h         	\
+       tools/intel_reg.h		\
+       lib/intel_batchbuffer.h       	\
+       lib/intel_batchbuffer.c       	\
+       lib/intel_mmio.c       		\
+       tools/intel_chipset.h
+       
+
+LOCAL_C_INCLUDES +=                    				\
+       $(LOCAL_PATH)/lib 					\
+       $(TOPDIR)hardware/intel/libdrm/include/drm 		\
+       $(TOPDIR)hardware/intel/libdrm/intel 			\
+       $(LOCAL_PATH)/../libpciaccess/include/
+
+LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+LOCAL_CFLAGS += -DANDROID
+
+
+LOCAL_MODULE := intel_audio_dump
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := libpciaccess 	\
+                          libdrm 	\
+                          libdrm_intel
+
+include $(BUILD_EXECUTABLE)
+
+#================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=                     	\
+       tools/intel_backlight.c          \
+       lib/intel_pci.c 			\
+       lib/intel_gpu_tools.h         	\
+       tools/intel_reg.h               	\
+       lib/intel_batchbuffer.h       	\
+       lib/intel_batchbuffer.c       	\
+       lib/intel_mmio.c       		\
+       tools/intel_chipset.h
+       
+
+LOCAL_C_INCLUDES +=                    			\
+       $(LOCAL_PATH)/lib 				\
+       $(TOPDIR)hardware/intel/libdrm/include/drm	\
+       $(TOPDIR)hardware/intel/libdrm/intel 		\
+       $(LOCAL_PATH)/../libpciaccess/include/
+
+LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+LOCAL_CFLAGS += -DANDROID
+
+
+LOCAL_MODULE := intel_backlight
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := libpciaccess 	\
+                          libdrm 	\
+                          libdrm_intel
+
+include $(BUILD_EXECUTABLE)
+
+#================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=                     	\
+       tools/intel_bios_dumper.c       	\
+       lib/intel_pci.c 			\
+       lib/intel_gpu_tools.h         	\
+       tools/intel_reg.h               	\
+       lib/intel_batchbuffer.h       	\
+       lib/intel_batchbuffer.c       	\
+       lib/intel_mmio.c       		\
+       tools/intel_chipset.h
+       
+
+LOCAL_C_INCLUDES +=                    			\
+       $(LOCAL_PATH)/lib 				\
+       $(TOPDIR)hardware/intel/libdrm/include/drm 	\
+       $(TOPDIR)hardware/intel/libdrm/intel 		\
+       $(LOCAL_PATH)/../libpciaccess/include/
+
+LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+LOCAL_CFLAGS += -DANDROID
+
+
+LOCAL_MODULE := intel_bios_dumper
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := libpciaccess 	\
+                          libdrm 	\
+                          libdrm_intel
+
+include $(BUILD_EXECUTABLE)
+
+#================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=                     	\
+       tools/intel_bios_reader.c        \
+       lib/intel_pci.c 			\
+       lib/intel_gpu_tools.h         	\
+       tools/intel_reg.h               	\
+       lib/intel_batchbuffer.h       	\
+       lib/intel_batchbuffer.c       	\
+       lib/intel_mmio.c       		\
+       tools/intel_chipset.h
+       
+
+LOCAL_C_INCLUDES +=            			        \
+       $(LOCAL_PATH)/lib 				\
+       $(TOPDIR)hardware/intel/libdrm/include/drm 	\
+       $(TOPDIR)hardware/intel/libdrm/intel 		\
+       $(LOCAL_PATH)/../libpciaccess/include/
+
+LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+LOCAL_CFLAGS += -DANDROID
+
+
+LOCAL_MODULE := intel_bios_reader
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := libpciaccess 	\
+                          libdrm 	\
+                          libdrm_intel
+
+include $(BUILD_EXECUTABLE)
+
+#================
+# Disabling intel_error_decode tool, since Android still does not have libdrm2.4.30
+#================
+#include $(CLEAR_VARS)
+#
+#LOCAL_SRC_FILES :=                     	\
+#       tools/intel_error_decode.c      	\
+#       lib/intel_pci.c 			\
+#       lib/intel_gpu_tools.h         	\
+#       tools/intel_reg.h               	\
+#       lib/intel_batchbuffer.h       	\
+#       lib/intel_batchbuffer.c       	\
+#       lib/intel_mmio.c       		\
+#       tools/intel_chipset.h 		\
+#       lib/instdone.h  			\
+#       lib/instdone.c  			\
+#       tools/intel_decode.h  		\
+#	lib/intel_drm.c
+#       
+#
+#LOCAL_C_INCLUDES +=            			        \
+#       $(LOCAL_PATH)/lib 				\
+#       $(TOPDIR)hardware/intel/libdrm/include/drm 	\
+#       $(TOPDIR)hardware/intel/libdrm/intel 		\
+#       $(LOCAL_PATH)/../libpciaccess/include/
+#
+#LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+#LOCAL_CFLAGS += -DANDROID
+#LOCAL_CFLAGS += -std=c99
+#
+#
+#LOCAL_MODULE := intel_error_decode
+#LOCAL_MODULE_TAGS := optional
+#
+#LOCAL_SHARED_LIBRARIES := libpciaccess 	\
+#                          libdrm 	\
+#                          libdrm_intel
+#
+#include $(BUILD_EXECUTABLE)
+#
+#================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=                     	\
+       tools/intel_gpu_top.c          	\
+       lib/intel_pci.c 			\
+       lib/intel_gpu_tools.h         	\
+       tools/intel_reg.h               	\
+       lib/intel_batchbuffer.h       	\
+       lib/intel_batchbuffer.c       	\
+       lib/intel_mmio.c       		\
+       tools/intel_chipset.h 		\
+       lib/instdone.h  			\
+       lib/instdone.c  			\
+	lib/intel_reg_map.c
+       
+
+LOCAL_C_INCLUDES +=    			                \
+       $(LOCAL_PATH)/lib 				\
+       $(TOPDIR)hardware/intel/libdrm/include/drm 	\
+       $(TOPDIR)hardware/intel/libdrm/intel 		\
+       $(LOCAL_PATH)/../libpciaccess/include/
+
+LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+LOCAL_CFLAGS += -DANDROID
+
+
+LOCAL_MODULE := intel_gpu_top
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := libpciaccess 	\
+                          libdrm 	\
+                          libdrm_intel
+
+include $(BUILD_EXECUTABLE)
+
+#================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=                     	\
+       tools/intel_gpu_time.c          	\
+       lib/intel_pci.c 			\
+       lib/intel_gpu_tools.h         	\
+       tools/intel_reg.h               	\
+       lib/intel_batchbuffer.h       	\
+       lib/intel_batchbuffer.c       	\
+       lib/intel_mmio.c       		\
+       tools/intel_chipset.h
+       
+
+LOCAL_C_INCLUDES +=            			        \
+       $(LOCAL_PATH)/lib 				\
+       $(TOPDIR)hardware/intel/libdrm/include/drm 	\
+       $(TOPDIR)hardware/intel/libdrm/intel 		\
+       $(LOCAL_PATH)/../libpciaccess/include/
+
+LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+LOCAL_CFLAGS += -DANDROID
+
+
+LOCAL_MODULE := intel_gpu_time
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := libpciaccess 	\
+                          libdrm 	\
+                          libdrm_intel
+
+include $(BUILD_EXECUTABLE)
+
+#================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=                     	\
+       tools/intel_gtt.c          	\
+       lib/intel_pci.c 			\
+       lib/intel_gpu_tools.h         	\
+       tools/intel_reg.h               	\
+       lib/intel_batchbuffer.h       	\
+       lib/intel_batchbuffer.c       	\
+       lib/intel_mmio.c       		\
+       tools/intel_chipset.h
+       
+
+LOCAL_C_INCLUDES +=            			        \
+       $(LOCAL_PATH)/lib 				\
+       $(TOPDIR)hardware/intel/libdrm/include/drm 	\
+       $(TOPDIR)hardware/intel/libdrm/intel 		\
+       $(LOCAL_PATH)/../libpciaccess/include/
+
+LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+
+LOCAL_MODULE := intel_gtt
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := libpciaccess 	\
+                          libdrm 	\
+                          libdrm_intel
+
+include $(BUILD_EXECUTABLE)
+
+#================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=                     	\
+       tools/intel_stepping.c          	\
+       lib/intel_pci.c 			\
+       lib/intel_gpu_tools.h         	\
+       tools/intel_reg.h               	\
+       lib/intel_batchbuffer.h       	\
+       lib/intel_batchbuffer.c       	\
+       lib/intel_mmio.c       		\
+       tools/intel_chipset.h
+       
+
+LOCAL_C_INCLUDES +=            			        \
+       $(LOCAL_PATH)/lib 				\
+       $(TOPDIR)hardware/intel/libdrm/include/drm 	\
+       $(TOPDIR)hardware/intel/libdrm/intel 		\
+       $(LOCAL_PATH)/../libpciaccess/include/
+
+LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+LOCAL_CFLAGS += -DANDROID
+
+
+LOCAL_MODULE := intel_stepping
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := libpciaccess 	\
+                          libdrm 	\
+                          libdrm_intel
+
+include $(BUILD_EXECUTABLE)
+
+#================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=			\
+       tools/intel_reg_dumper.c         \
+       lib/intel_pci.c 			\
+       lib/intel_gpu_tools.h 	        \
+       tools/intel_reg.h       	        \
+       lib/intel_batchbuffer.h		\
+       lib/intel_batchbuffer.c		\
+       lib/intel_mmio.c      		\
+       tools/intel_chipset.h
+       
+
+LOCAL_C_INCLUDES +=                    			\
+       $(LOCAL_PATH)/lib 				\
+       $(TOPDIR)hardware/intel/libdrm/include/drm 	\
+       $(TOPDIR)hardware/intel/libdrm/intel 		\
+       $(LOCAL_PATH)/../libpciaccess/include/
+
+LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+LOCAL_CFLAGS += -DANDROID
+
+
+LOCAL_MODULE := intel_reg_dumper
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := libpciaccess 	\
+                          libdrm 	\
+                          libdrm_intel
+
+include $(BUILD_EXECUTABLE)
+
+#================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=                     	\
+       tools/intel_reg_snapshot.c       \
+       lib/intel_pci.c 			\
+       lib/intel_gpu_tools.h 	        \
+       tools/intel_reg.h       	        \
+       lib/intel_batchbuffer.h		\
+       lib/intel_batchbuffer.c		\
+       lib/intel_mmio.c       		\
+       tools/intel_chipset.h
+       
+
+LOCAL_C_INCLUDES +=            			        \
+       $(LOCAL_PATH)/lib 				\
+       $(TOPDIR)hardware/intel/libdrm/include/drm 	\
+       $(TOPDIR)hardware/intel/libdrm/intel 		\
+       $(LOCAL_PATH)/../libpciaccess/include/
+
+LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+
+LOCAL_MODULE := intel_reg_snapshot
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := libpciaccess 	\
+                          libdrm 	\
+                          libdrm_intel
+
+include $(BUILD_EXECUTABLE)
+
+#================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=                     	\
+       tools/forcewaked.c          	\
+       lib/intel_pci.c 			\
+       lib/intel_gpu_tools.h		\
+       tools/intel_reg.h               	\
+       lib/intel_batchbuffer.h       	\
+       lib/intel_batchbuffer.c       	\
+       lib/intel_mmio.c       		\
+       tools/intel_chipset.h 		\
+       lib/intel_reg_map.c		\
+       lib/intel_drm.c
+       
+
+LOCAL_C_INCLUDES +=            			        \
+       $(LOCAL_PATH)/lib 				\
+       $(TOPDIR)hardware/intel/libdrm/include/drm 	\
+       $(TOPDIR)hardware/intel/libdrm/intel 		\
+       $(LOCAL_PATH)/../libpciaccess/include/
+
+LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+LOCAL_CFLAGS += -DANDROID
+
+
+LOCAL_MODULE := forcewaked
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := libpciaccess 	\
+                          libdrm 	\
+                          libdrm_intel
+
+include $(BUILD_EXECUTABLE)
+
+#================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES :=                     	\
+       lib/intel_gpu_tools.h		\
+       tools/intel_reg_checker.c	\
+	lib/intel_pci.c			\
+	lib/intel_mmio.c
+       
+
+LOCAL_C_INCLUDES +=            			        \
+       $(LOCAL_PATH)/lib 				\
+       $(TOPDIR)hardware/intel/libdrm/include/drm 	\
+       $(TOPDIR)hardware/intel/libdrm/intel 		\
+       $(LOCAL_PATH)/../libpciaccess/include/
+
+LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+LOCAL_CFLAGS += -DANDROID
+
+
+LOCAL_MODULE := intel_reg_checker
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SHARED_LIBRARIES := libpciaccess 	
+
+include $(BUILD_EXECUTABLE)
+
diff --git a/lib/intel_drm.c b/lib/intel_drm.c
index 42cad3e..4a919d3 100644
--- a/lib/intel_drm.c
+++ b/lib/intel_drm.c
@@ -36,7 +36,11 @@
 #include <err.h>
 #include <assert.h>
 #include <sys/ioctl.h>
+#ifdef ANDROID
+#include <fcntl.h>
+#else
 #include <sys/fcntl.h>
+#endif
 #include <sys/stat.h>
 #include <sys/mman.h>
 #ifdef HAVE_STRUCT_SYSINFO_TOTALRAM
diff --git a/lib/intel_mmio.c b/lib/intel_mmio.c
index 19ea6ad..a158b04 100644
--- a/lib/intel_mmio.c
+++ b/lib/intel_mmio.c
@@ -38,7 +38,11 @@
 #include <err.h>
 #include <assert.h>
 #include <sys/ioctl.h>
+#ifdef ANDROID
+#include <fcntl.h>
+#else
 #include <sys/fcntl.h>
+#endif
 #include <sys/stat.h>
 #include <sys/mman.h>
 
diff --git a/lib/intel_pci.c b/lib/intel_pci.c
index 150434a..08fac3e 100644
--- a/lib/intel_pci.c
+++ b/lib/intel_pci.c
@@ -33,7 +33,11 @@
 #include <err.h>
 #include <assert.h>
 #include <sys/ioctl.h>
+#ifdef ANDROID
+#include <fcntl.h>
+#else
 #include <sys/fcntl.h>
+#endif
 #include <sys/stat.h>
 #include <sys/mman.h>
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Added support for Android
  2012-02-06 10:07 [PATCH] Added support for Android Sateesh Kavuri
@ 2012-02-10 17:46 ` Daniel Vetter
  2012-02-11  6:19   ` [PATCH] Remove pointless Android ifdefs for sys/fcntl.h Kenneth Graunke
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2012-02-10 17:46 UTC (permalink / raw)
  To: Sateesh Kavuri; +Cc: intel-gfx

On Mon, Feb 06, 2012 at 03:37:04PM +0530, Sateesh Kavuri wrote:
>  Added the Android.mk file as per Android make system. Also had to modify
>  the headers with the proper location for fcntl.h as per the Android
>  bionic headers location
> 
> Signed-off-by: Sateesh Kavuri <sateesh.kavuri@intel.com>

Sorry, I've tried to ignore this Android thing ;-) Patch looks good and I
think a few #ifdefs for include files are okish. Applied, thanks.
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Remove pointless Android ifdefs for sys/fcntl.h.
  2012-02-10 17:46 ` Daniel Vetter
@ 2012-02-11  6:19   ` Kenneth Graunke
  2012-02-11 10:48     ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: Kenneth Graunke @ 2012-02-11  6:19 UTC (permalink / raw)
  To: intel-gfx

On my system, sys/fcntl.h contains exactly one line:

   #include <fcntl.h>

So there's really no need to #ifdef it.  Also, intel_mmio.c already
included <fcntl.h>; there's no need to include it twice.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
---
 lib/intel_drm.c  |    4 ----
 lib/intel_mmio.c |    5 -----
 lib/intel_pci.c  |    4 ----
 3 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/lib/intel_drm.c b/lib/intel_drm.c
index 4a919d3..36a24fa 100644
--- a/lib/intel_drm.c
+++ b/lib/intel_drm.c
@@ -36,11 +36,7 @@
 #include <err.h>
 #include <assert.h>
 #include <sys/ioctl.h>
-#ifdef ANDROID
 #include <fcntl.h>
-#else
-#include <sys/fcntl.h>
-#endif
 #include <sys/stat.h>
 #include <sys/mman.h>
 #ifdef HAVE_STRUCT_SYSINFO_TOTALRAM
diff --git a/lib/intel_mmio.c b/lib/intel_mmio.c
index a158b04..b266847 100644
--- a/lib/intel_mmio.c
+++ b/lib/intel_mmio.c
@@ -38,11 +38,6 @@
 #include <err.h>
 #include <assert.h>
 #include <sys/ioctl.h>
-#ifdef ANDROID
-#include <fcntl.h>
-#else
-#include <sys/fcntl.h>
-#endif
 #include <sys/stat.h>
 #include <sys/mman.h>
 
diff --git a/lib/intel_pci.c b/lib/intel_pci.c
index 08fac3e..7228dae 100644
--- a/lib/intel_pci.c
+++ b/lib/intel_pci.c
@@ -33,11 +33,7 @@
 #include <err.h>
 #include <assert.h>
 #include <sys/ioctl.h>
-#ifdef ANDROID
 #include <fcntl.h>
-#else
-#include <sys/fcntl.h>
-#endif
 #include <sys/stat.h>
 #include <sys/mman.h>
 
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove pointless Android ifdefs for sys/fcntl.h.
  2012-02-11  6:19   ` [PATCH] Remove pointless Android ifdefs for sys/fcntl.h Kenneth Graunke
@ 2012-02-11 10:48     ` Daniel Vetter
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2012-02-11 10:48 UTC (permalink / raw)
  To: Kenneth Graunke; +Cc: intel-gfx

On Fri, Feb 10, 2012 at 10:19:16PM -0800, Kenneth Graunke wrote:
> On my system, sys/fcntl.h contains exactly one line:
> 
>    #include <fcntl.h>
> 
> So there's really no need to #ifdef it.  Also, intel_mmio.c already
> included <fcntl.h>; there's no need to include it twice.
> 
> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Thanks for the patch, this looks much nicer.
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-11 10:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-06 10:07 [PATCH] Added support for Android Sateesh Kavuri
2012-02-10 17:46 ` Daniel Vetter
2012-02-11  6:19   ` [PATCH] Remove pointless Android ifdefs for sys/fcntl.h Kenneth Graunke
2012-02-11 10:48     ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.