summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiang Liu <lianliu@codeaurora.org>2020-06-18 14:44:10 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2020-08-05 15:05:13 -0700
commit54cac898e5c75d41496411c17c714ee7629ec6bd (patch)
treeb38b23a82e44b052ae3203eebacf00d64e35cd3c
parent00b71c2184427165f1f23a38a6fd5f6c2458f7ed (diff)
display-hal: fix compile errors with 5.4 kernel
Add uapi/include/display to include search path and add sde_drm.h to fix compile errors with 5.4 kernel. This change is backward compatible and is also working in 4.14 kernel. Change-Id: I47b025301fa53fbd4bc1cceb013db3648b5a61cd Signed-off-by: Liang Liu <lianliu@codeaurora.org>
-rw-r--r--common.mk3
-rw-r--r--libdrmutils/Android.mk3
-rw-r--r--libdrmutils/drm_interface.h1
-rwxr-xr-x[-rw-r--r--]libdrmutils/drm_master.cpp2
4 files changed, 7 insertions, 2 deletions
diff --git a/common.mk b/common.mk
index 0a372005..a30c0d9e 100644
--- a/common.mk
+++ b/common.mk
@@ -75,5 +75,6 @@ ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
# If the macro is not present, the headers are picked from hardware/qcom/msmXXXX
# failing which, they are picked from bionic.
common_deps += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
- kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
+ kernel_includes += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include \
+ $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/display
endif
diff --git a/libdrmutils/Android.mk b/libdrmutils/Android.mk
index 172233f9..e448d4f5 100644
--- a/libdrmutils/Android.mk
+++ b/libdrmutils/Android.mk
@@ -5,7 +5,8 @@ LOCAL_MODULE := libdrmutils
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := external/libdrm \
- $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
+ $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include \
+ $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/display
LOCAL_HEADER_LIBRARIES := display_headers
LOCAL_SHARED_LIBRARIES := libdrm libdl libdisplaydebug
LOCAL_CFLAGS := -DLOG_TAG=\"DRMUTILS\" -Wall -Werror -fno-operator-names
diff --git a/libdrmutils/drm_interface.h b/libdrmutils/drm_interface.h
index 918a7fec..5d27b4e6 100644
--- a/libdrmutils/drm_interface.h
+++ b/libdrmutils/drm_interface.h
@@ -40,6 +40,7 @@
#include "xf86drmMode.h"
#include <drm/msm_drm.h>
#include <drm/msm_drm_pp.h>
+#include <drm/sde_drm.h>
namespace sde_drm {
diff --git a/libdrmutils/drm_master.cpp b/libdrmutils/drm_master.cpp
index f0d14b1b..3a8516d4 100644..100755
--- a/libdrmutils/drm_master.cpp
+++ b/libdrmutils/drm_master.cpp
@@ -33,6 +33,8 @@
#include <unistd.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
+#include <drm/sde_drm.h>
+
// Intentionally included after xf86 headers so that they in-turn include libdrm version of drm.h
// that doesn't use keyword "virtual" for a variable name. Not doing so leads to the kernel version
// of drm.h being included causing compilation to fail