blob: 9dc043fef9152557b441aabe66140a8f03a3e541 [file] [log] [blame]
Prabhanjan Kandula96e92342016-03-24 21:03:35 +05301# Gralloc module
2LOCAL_PATH := $(call my-dir)
3include $(LOCAL_PATH)/../common.mk
4include $(CLEAR_VARS)
5
Naseer Ahmed755af6b2019-04-15 19:49:29 -04006LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM)
Naseer Ahmed725789e2017-05-17 13:41:10 -04007LOCAL_VENDOR_MODULE := true
Prabhanjan Kandula96e92342016-03-24 21:03:35 +05308LOCAL_MODULE_RELATIVE_PATH := hw
9LOCAL_MODULE_TAGS := optional
Naseer Ahmede36f2242017-12-01 15:33:56 -050010LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
Prabhanjan Kandula96e92342016-03-24 21:03:35 +053011
Naseer Ahmed4d78d032017-03-22 12:47:30 -040012LOCAL_HEADER_LIBRARIES := display_headers
Naseer Ahmede36f2242017-12-01 15:33:56 -050013LOCAL_SHARED_LIBRARIES := $(common_libs) libqdMetaData libsync libgrallocutils \
14 libgralloccore \
Naseer Ahmed920d71b2018-03-08 16:54:28 -050015 android.hardware.graphics.mapper@2.0 \
16 android.hardware.graphics.mapper@2.1
Naseer Ahmede36f2242017-12-01 15:33:56 -050017LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdgralloc\" -Wall -Werror
Prabhanjan Kandula96e92342016-03-24 21:03:35 +053018LOCAL_CLANG := true
19LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) $(kernel_deps)
Naseer Ahmede36f2242017-12-01 15:33:56 -050020LOCAL_SRC_FILES := gr_device_impl.cpp
Prabhanjan Kandula96e92342016-03-24 21:03:35 +053021include $(BUILD_SHARED_LIBRARY)
Saurabh Shah14c8e5b2017-04-07 10:37:23 -070022
23#libgrallocutils
24include $(CLEAR_VARS)
25LOCAL_MODULE := libgrallocutils
Naseer Ahmed725789e2017-05-17 13:41:10 -040026LOCAL_VENDOR_MODULE := true
Saurabh Shah14c8e5b2017-04-07 10:37:23 -070027LOCAL_MODULE_TAGS := optional
28LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
29LOCAL_HEADER_LIBRARIES := display_headers
Naseer Ahmede36f2242017-12-01 15:33:56 -050030LOCAL_SHARED_LIBRARIES := $(common_libs) libqdMetaData libdl \
Naseer Ahmed920d71b2018-03-08 16:54:28 -050031 android.hardware.graphics.mapper@2.0 \
32 android.hardware.graphics.mapper@2.1
Naseer Ahmede36f2242017-12-01 15:33:56 -050033LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdgralloc\" -Wno-sign-conversion
34LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
Saurabh Shah14c8e5b2017-04-07 10:37:23 -070035LOCAL_SRC_FILES := gr_utils.cpp gr_adreno_info.cpp
36include $(BUILD_SHARED_LIBRARY)
Naseer Ahmede36f2242017-12-01 15:33:56 -050037
38#libgralloccore
39include $(CLEAR_VARS)
40LOCAL_MODULE := libgralloccore
41LOCAL_VENDOR_MODULE := true
42LOCAL_MODULE_TAGS := optional
43LOCAL_C_INCLUDES := $(common_includes) \
44 system/core/libion/include \
45 system/core/libion/kernel-headers \
46 $(kernel_includes)
47
48LOCAL_HEADER_LIBRARIES := display_headers
49LOCAL_SHARED_LIBRARIES := $(common_libs) libqdMetaData libdl libgrallocutils libion \
Naseer Ahmed920d71b2018-03-08 16:54:28 -050050 android.hardware.graphics.mapper@2.1
Naseer Ahmede36f2242017-12-01 15:33:56 -050051LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdgralloc\" -Wno-sign-conversion
52LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) $(kernel_deps)
53LOCAL_SRC_FILES := gr_allocator.cpp gr_buf_mgr.cpp gr_ion_alloc.cpp
54include $(BUILD_SHARED_LIBRARY)
55
Ashish Kumar28fa16f2019-02-22 05:24:02 +053056#Get the display mapper version available
57qti_mapper1_1_version := $(shell \
58 if [ -d "$(TOP)/vendor/qcom/opensource/interfaces/display/mapper/1.1" ];\
59 then echo QTI_MAPPER_1_1; fi)
Naseer Ahmede36f2242017-12-01 15:33:56 -050060
61qti_mapper_version := $(shell \
62 if [ -d "$(TOP)/vendor/qcom/opensource/interfaces/display/mapper/1.0" ];\
63 then echo QTI_MAPPER_1_0; fi)
64
65qti_allocator_version := $(shell \
66 if [ -d "$(TOP)/vendor/qcom/opensource/interfaces/display/allocator/1.0" ];\
67 then echo QTI_ALLOCATOR_1_0; fi)
68
Ashish Kumarf04c3de2018-08-01 14:45:14 +053069ifeq ($(qti_mapper_version), QTI_MAPPER_1_0)
Naseer Ahmede36f2242017-12-01 15:33:56 -050070#mapper
71include $(CLEAR_VARS)
72LOCAL_MODULE := android.hardware.graphics.mapper@2.0-impl-qti-display
73LOCAL_VENDOR_MODULE := true
74LOCAL_MODULE_RELATIVE_PATH := hw
75LOCAL_MODULE_TAGS := optional
76LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
77LOCAL_HEADER_LIBRARIES := display_headers
78LOCAL_SHARED_LIBRARIES := $(common_libs) \
79 libhidlbase \
80 libhidltransport \
81 libqdMetaData \
82 libgrallocutils \
83 libgralloccore \
84 libsync \
Ashish Kumarf04c3de2018-08-01 14:45:14 +053085 vendor.qti.hardware.display.mapper@1.0 \
Naseer Ahmed920d71b2018-03-08 16:54:28 -050086 android.hardware.graphics.mapper@2.0 \
87 android.hardware.graphics.mapper@2.1
Naseer Ahmede36f2242017-12-01 15:33:56 -050088LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdgralloc\" -Wno-sign-conversion
Ashish Kumar28fa16f2019-02-22 05:24:02 +053089ifeq ($(qti_mapper1_1_version), QTI_MAPPER_1_1)
90LOCAL_SHARED_LIBRARIES += vendor.qti.hardware.display.mapper@1.1
91LOCAL_CFLAGS += -DQTI_MAPPER_1_1
92endif
Naseer Ahmede36f2242017-12-01 15:33:56 -050093LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
94LOCAL_SRC_FILES := QtiMapper.cpp
95include $(BUILD_SHARED_LIBRARY)
Ashish Kumarf04c3de2018-08-01 14:45:14 +053096endif
Naseer Ahmede36f2242017-12-01 15:33:56 -050097
Ashish Kumarf04c3de2018-08-01 14:45:14 +053098ifeq ($(qti_allocator_version), QTI_ALLOCATOR_1_0)
99#allocator
Naseer Ahmede36f2242017-12-01 15:33:56 -0500100include $(CLEAR_VARS)
101LOCAL_MODULE := vendor.qti.hardware.display.allocator@1.0-service
102LOCAL_VENDOR_MODULE := true
103LOCAL_MODULE_RELATIVE_PATH := hw
104LOCAL_MODULE_TAGS := optional
105LOCAL_HEADER_LIBRARIES := display_headers
106LOCAL_SHARED_LIBRARIES := $(common_libs) \
107 libhidlbase \
108 libhidltransport\
109 libqdMetaData \
110 libgrallocutils \
111 libgralloccore \
Ashish Kumarf04c3de2018-08-01 14:45:14 +0530112 vendor.qti.hardware.display.allocator@1.0 \
Naseer Ahmed920d71b2018-03-08 16:54:28 -0500113 android.hardware.graphics.mapper@2.1 \
Naseer Ahmede36f2242017-12-01 15:33:56 -0500114 android.hardware.graphics.allocator@2.0
115LOCAL_CFLAGS := -DLOG_TAG=\"qdgralloc\" $(common_flags)
116LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
117LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
118LOCAL_SRC_FILES := QtiAllocator.cpp service.cpp
119LOCAL_INIT_RC := vendor.qti.hardware.display.allocator@1.0-service.rc
120include $(BUILD_EXECUTABLE)
Ashish Kumarf04c3de2018-08-01 14:45:14 +0530121endif