• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2020 Arm Limited.
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18soong_namespace {
19	imports: [
20		"hardware/google/graphics/common",
21		"hardware/google/gchips",
22	]
23}
24
25package {
26    default_applicable_licenses: ["Android-Apache-2.0"],
27}
28
29soong_config_module_type {
30	name: "arm_gralloc_cc_defaults",
31	module_type: "cc_defaults",
32	config_namespace: "arm_gralloc",
33	variables: [
34		"mali_display_version",
35		"gralloc_hwc_force_bgra_8888",
36		"gralloc_hwc_fb_disable_afbc",
37		"gralloc_camera_write_raw16",
38		"soc"
39	],
40	properties: [
41		"cflags",
42	],
43}
44
45soong_config_string_variable {
46	name: "mali_display_version",
47	values: [
48		"v0",
49		"v500",
50		"v550",
51		"v650",
52		"v71",
53	],
54}
55
56soong_config_bool_variable {
57	name: "gralloc_hwc_force_bgra_8888",
58}
59soong_config_bool_variable {
60	name: "gralloc_hwc_fb_disable_afbc",
61}
62soong_config_bool_variable {
63	name: "gralloc_camera_write_raw16",
64}
65
66soong_config_string_variable {
67	name: "soc",
68	values: [
69		"gs101",
70		"gs201",
71		"zuma",
72	],
73}
74
75soong_config_module_type {
76    name: "gralloc_defaults",
77    module_type: "cc_defaults",
78    config_namespace: "arm_gralloc",
79    variables: [
80        "mapper_version",
81    ],
82    properties: [
83        "srcs",
84        "target",
85        "cflags",
86        "shared_libs",
87        "static_libs",
88        "header_libs",
89        "defaults",
90        "stem",
91    ],
92}
93
94soong_config_string_variable {
95    name: "mapper_version",
96    values: [
97        "mapper4",
98        "mapper5",
99    ],
100}
101
102arm_gralloc_cc_defaults {
103	name: "arm_gralloc_defaults",
104	owner: "arm",
105	vendor: true,
106	proprietary: true,
107	cflags: [
108		"-Wundef",
109		"-Werror",
110		"-Wthread-safety",
111		"-DGRALLOC_LIBRARY_BUILD=1",
112		"-DDISABLE_FRAMEBUFFER_HAL=1",
113		"-DGRALLOC_USE_LEGACY_CALCS=0",
114		"-DGRALLOC_USE_LEGACY_LOCK=0",
115	],
116	product_variables: {
117		platform_sdk_version: {
118			cflags: ["-DPLATFORM_SDK_VERSION=%d"],
119		},
120	},
121	header_libs: [
122		"libgralloc_headers",
123		"pixel-gralloc-headers",
124	],
125	target: {
126		android: {
127			cflags: [
128				"-DGRALLOC_HOST_BUILD=0",
129			],
130		},
131		host: {
132			cflags: [
133				"-DGRALLOC_HOST_BUILD=1",
134			],
135		},
136	},
137	soong_config_variables: {
138		mali_display_version: {
139			v0: {
140				cflags: [
141					"-DMALI_DISPLAY_VERSION=0",
142				],
143			},
144			v500: {
145				cflags: [
146					"-DMALI_DISPLAY_VERSION=500",
147				],
148			},
149			v550: {
150				cflags: [
151					"-DMALI_DISPLAY_VERSION=550",
152				],
153			},
154			v650: {
155				cflags: [
156					"-DMALI_DISPLAY_VERSION=650",
157				],
158			},
159			v71: {
160				cflags: [
161					"-DMALI_DISPLAY_VERSION=71",
162				],
163			},
164		},
165		gralloc_hwc_force_bgra_8888: {
166			cflags: [
167				"-DGRALLOC_HWC_FORCE_BGRA_8888=1",
168			],
169		},
170		gralloc_hwc_fb_disable_afbc: {
171			cflags: [
172				"-DGRALLOC_HWC_FB_DISABLE_AFBC=1",
173			],
174		},
175		gralloc_camera_write_raw16: {
176			cflags: [
177				"-DGRALLOC_CAMERA_WRITE_RAW16=1",
178			],
179		},
180		soc: {
181			zuma: {
182				cflags: [
183					"-DSOC_ZUMA"
184				],
185			},
186		},
187	},
188}
189