aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2017-03-21 13:51:19 -0500
committerCasey Dahlin <sadmac@google.com>2017-05-02 20:48:49 +0000
commit74d41339087d2e1facb8e5d03845014e1b767a6f (patch)
tree09722cfc2f08c11eb2f9261a6cfd27ed27aed6ea
parenta0331a941cd8c798c0d7470930fedc5e4c43551a (diff)
downloadmesa3d-74d41339087d2e1facb8e5d03845014e1b767a6f.tar.gz
Android: kill off {MESA_}ANDROID_VERSION defines aka Android 4.1 and older
The Android version defines are only needed for versions less than 4.2 which aren't really supported or tested. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from upstream commit 0e1ff22d55816c9a3710257c2e705a98ad3282bc) Test: None Bug: 32336912 Change-Id: I6e5f47f7595345969a01dcfd98437fa83df8777a
-rw-r--r--Android.common.mk4
-rw-r--r--Android.mk1
-rw-r--r--src/egl/Android.mk5
-rw-r--r--src/egl/drivers/dri2/egl_dri2.h8
-rw-r--r--src/egl/drivers/dri2/platform_android.c15
5 files changed, 3 insertions, 30 deletions
diff --git a/Android.common.mk b/Android.common.mk
index 46e4e645851..583f1ba0082 100644
--- a/Android.common.mk
+++ b/Android.common.mk
@@ -30,7 +30,6 @@ LOCAL_C_INCLUDES += \
$(MESA_TOP)/include
MESA_VERSION := $(shell cat $(MESA_TOP)/VERSION)
-# define ANDROID_VERSION (e.g., 4.0.x => 0x0400)
LOCAL_CFLAGS += \
-Wno-unused-parameter \
-Wno-date-time \
@@ -39,8 +38,7 @@ LOCAL_CFLAGS += \
-Wno-initializer-overrides \
-Wno-mismatched-tags \
-DPACKAGE_VERSION=\"$(MESA_VERSION)\" \
- -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\" \
- -DANDROID_VERSION=0x0$(MESA_ANDROID_MAJOR_VERSION)0$(MESA_ANDROID_MINOR_VERSION)
+ -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"
LOCAL_CFLAGS += \
-DENABLE_SHADER_CACHE \
diff --git a/Android.mk b/Android.mk
index fb29105a608..3cf7461d99c 100644
--- a/Android.mk
+++ b/Android.mk
@@ -33,7 +33,6 @@ MESA_TOP := $(call my-dir)
MESA_ANDROID_MAJOR_VERSION := $(word 1, $(subst ., , $(PLATFORM_VERSION)))
MESA_ANDROID_MINOR_VERSION := $(word 2, $(subst ., , $(PLATFORM_VERSION)))
-MESA_ANDROID_VERSION := $(MESA_ANDROID_MAJOR_VERSION).$(MESA_ANDROID_MINOR_VERSION)
ifeq ($(filter 1 2 3 4,$(MESA_ANDROID_MAJOR_VERSION)),)
MESA_LOLLIPOP_BUILD := true
else
diff --git a/src/egl/Android.mk b/src/egl/Android.mk
index 72ec02a23d6..4f92fad792a 100644
--- a/src/egl/Android.mk
+++ b/src/egl/Android.mk
@@ -57,10 +57,7 @@ LOCAL_SHARED_LIBRARIES := \
liblog \
libcutils \
libgralloc_drm \
-
-ifeq ($(shell echo "$(MESA_ANDROID_VERSION) >= 4.2" | bc),1)
-LOCAL_SHARED_LIBRARIES += libsync
-endif
+ libsync
ifeq ($(strip $(MESA_BUILD_CLASSIC)),true)
# require i915_dri and/or i965_dri
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index 1b351f544dd..686a937c47a 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -56,13 +56,7 @@
#ifdef HAVE_ANDROID_PLATFORM
#define LOG_TAG "EGL-DRI2"
-#if ANDROID_VERSION >= 0x0400
-# include <system/window.h>
-#else
-# define android_native_buffer_t ANativeWindowBuffer
-# include <ui/egl/android_natives.h>
-# include <ui/android_native_buffer.h>
-#endif
+#include <system/window.h>
#include "platform_android_gralloc_drm.h"
#include <hardware/gralloc.h>
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 60aca632e86..ef77ce7ab1c 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -32,10 +32,7 @@
#include <fcntl.h>
#include <xf86drm.h>
#include <stdbool.h>
-
-#if ANDROID_VERSION >= 0x402
#include <sync/sync.h>
-#endif
#include "loader.h"
#include "egl_dri2.h"
@@ -160,7 +157,6 @@ get_native_buffer_name(struct ANativeWindowBuffer *buf)
static EGLBoolean
droid_window_dequeue_buffer(struct dri2_egl_surface *dri2_surf)
{
-#if ANDROID_VERSION >= 0x0402
int fence_fd;
if (dri2_surf->window->dequeueBuffer(dri2_surf->window, &dri2_surf->buffer,
@@ -195,13 +191,6 @@ droid_window_dequeue_buffer(struct dri2_egl_surface *dri2_surf)
}
dri2_surf->buffer->common.incRef(&dri2_surf->buffer->common);
-#else
- if (dri2_surf->window->dequeueBuffer(dri2_surf->window, &dri2_surf->buffer))
- return EGL_FALSE;
-
- dri2_surf->buffer->common.incRef(&dri2_surf->buffer->common);
- dri2_surf->window->lockBuffer(dri2_surf->window, dri2_surf->buffer);
-#endif
return EGL_TRUE;
}
@@ -217,7 +206,6 @@ droid_window_enqueue_buffer(_EGLDisplay *disp, struct dri2_egl_surface *dri2_sur
*/
mtx_unlock(&disp->Mutex);
-#if ANDROID_VERSION >= 0x0402
/* Queue the buffer without a sync fence. This informs the ANativeWindow
* that it may access the buffer immediately.
*
@@ -233,9 +221,6 @@ droid_window_enqueue_buffer(_EGLDisplay *disp, struct dri2_egl_surface *dri2_sur
int fence_fd = -1;
dri2_surf->window->queueBuffer(dri2_surf->window, dri2_surf->buffer,
fence_fd);
-#else
- dri2_surf->window->queueBuffer(dri2_surf->window, dri2_surf->buffer);
-#endif
dri2_surf->buffer->common.decRef(&dri2_surf->buffer->common);
dri2_surf->buffer = NULL;