1# Copyright (C) 2021–2022 Beijing OSWare Technology Co., Ltd 2# This file contains confidential and proprietary information of 3# OSWare Technology Co., Ltd 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 17import("//build/ohos.gni") 18import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 19 20group("display_group") { 21 deps = [ 22 ":display_device", 23 ":display_gfx", 24 ":display_gralloc", 25 ] 26} 27 28ohos_shared_library("display_gralloc") { 29 sources = [ 30 "src/display_gralloc/allocator.cpp", 31 "src/display_gralloc/allocator_manager.cpp", 32 "src/display_gralloc/display_gralloc.cpp", 33 "src/display_gralloc/dmabufferheap_allocator.cpp", 34 "src/display_gralloc/drm_allocator.cpp", 35 "src/display_gralloc/framebuffer_allocator.cpp", 36 "src/utils/display_adapter.cpp", 37 ] 38 include_dirs = [ 39 "include", 40 "//drivers/peripheral/display/interfaces/include", 41 "//drivers/peripheral/base", 42 "src/utils/", 43 ] 44 45 output_name = "display_gralloc" 46 cflags = [ "-Wno-macro-redefined" ] 47 deps = [ 48 "$hdf_uhdf_path/utils:libhdf_utils", 49 "//third_party/libdrm:libdrm", 50 "//utils/memory/libdmabufheap:libdmabufheap", 51 ] 52 53 external_deps = [ 54 "c_utils:utils", 55 "hilog:libhilog", 56 ] 57 58 install_enable = true 59 install_images = [ chipset_base_dir ] 60 subsystem_name = "hdf" 61 part_name = "drivers_peripheral_display" 62} 63 64config("def_display_device_pub_config") { 65 visibility = [ ":*" ] 66 67 include_dirs = [ 68 "//drivers/peripheral/display/interfaces/include", 69 "//drivers/peripheral/base", 70 "//drivers/peripheral/display/hal/default_standard/src/display_device", 71 "//drivers/peripheral/display/hal/default_standard/include", 72 ] 73} 74 75ohos_shared_library("display_device") { 76 sources = [ 77 "src/display_device/composer/hdi_composer.cpp", 78 "src/display_device/composer/hdi_gfx_composition.cpp", 79 "src/display_device/composer/hdi_video_composition.cpp", 80 "src/display_device/core/hdi_device_interface.cpp", 81 "src/display_device/core/hdi_display.cpp", 82 "src/display_device/core/hdi_layer.cpp", 83 "src/display_device/core/hdi_session.cpp", 84 "src/display_device/drm/drm_connector.cpp", 85 "src/display_device/drm/drm_crtc.cpp", 86 "src/display_device/drm/drm_device.cpp", 87 "src/display_device/drm/drm_display.cpp", 88 "src/display_device/drm/drm_encoder.cpp", 89 "src/display_device/drm/drm_plane.cpp", 90 "src/display_device/drm/drm_vsync_worker.cpp", 91 "src/display_device/drm/hdi_drm_composition.cpp", 92 "src/display_device/drm/hdi_drm_layer.cpp", 93 "src/display_device/fbdev/fb_composition.cpp", 94 "src/display_device/fbdev/fb_device.cpp", 95 "src/display_device/fbdev/fb_display.cpp", 96 "src/display_device/vsync/sorft_vsync.cpp", 97 "src/utils/display_adapter.cpp", 98 ] 99 public_configs = [ ":def_display_device_pub_config" ] 100 101 output_name = "display_device" 102 103 include_dirs = [ 104 "src/display_device", 105 "include", 106 "//drivers/peripheral/display/interfaces/include", 107 "//drivers/peripheral/base", 108 "src/display_device/drm", 109 "src/display_device/fbdev", 110 "src/display_device/core", 111 "src/display_device/composer", 112 "src/utils", 113 ] 114 115 deps = [ 116 ":def_display_layer_video", 117 ":display_gralloc", 118 "$hdf_uhdf_path/utils:libhdf_utils", 119 "//third_party/libdrm:libdrm", 120 ] 121 122 cflags = [ "-Wno-unused-function" ] 123 124 external_deps = [ 125 "c_utils:utils", 126 "hilog:libhilog", 127 "hitrace:hitrace_meter", 128 ] 129 130 install_enable = true 131 install_images = [ chipset_base_dir ] 132 subsystem_name = "hdf" 133 part_name = "drivers_peripheral_display" 134} 135 136ohos_shared_library("def_display_layer_video") { 137 sources = [ "src/display_layer_video/display_layer_video.cpp" ] 138 public_configs = [ ":def_display_device_pub_config" ] 139 140 output_name = "display_layer_video" 141 include_dirs = [ 142 "//drivers/peripheral/display/interfaces/include", 143 "//drivers/peripheral/base", 144 "//drivers/peripheral/display/hdi_service/video_layer/client", 145 "//drivers/adapter/uhdf2/include/hdi", 146 ] 147 148 deps = [ 149 "$hdf_uhdf_path/hdi:libhdi", 150 "$hdf_uhdf_path/host:libhdf_host", 151 "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", 152 "$hdf_uhdf_path/utils:libhdf_utils", 153 ] 154 155 external_deps = [ 156 "c_utils:utils", 157 "hilog:libhilog", 158 "ipc:ipc_single", 159 ] 160 161 public_deps = [ "//drivers/peripheral/display/hdi_service/video_layer/client:video_layer_client" ] 162 163 install_enable = true 164 install_images = [ chipset_base_dir ] 165 subsystem_name = "hdf" 166 part_name = "drivers_peripheral_display" 167} 168 169ohos_shared_library("display_gfx") { 170 output_name = "display_gfx" 171 sources = [ "src/display_gfx/display_gfx.c" ] 172 include_dirs = [ 173 "include", 174 "//drivers/peripheral/display/hal", 175 "//drivers/peripheral/display/interfaces/include", 176 "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", 177 "//drivers/peripheral/base", 178 "//device/soc/nxp/hardware/g2d/include", 179 ] 180 181 deps = [ 182 "$hdf_uhdf_path/utils:libhdf_utils", 183 "//device/soc/nxp/hardware/g2d:libnxp_clc", 184 "//device/soc/nxp/hardware/g2d:libnxp_egl", 185 "//device/soc/nxp/hardware/g2d:libnxp_egl_1", 186 "//device/soc/nxp/hardware/g2d:libnxp_egl_1_5", 187 "//device/soc/nxp/hardware/g2d:libnxp_g2d", 188 "//device/soc/nxp/hardware/g2d:libnxp_g2d_so_2", 189 "//device/soc/nxp/hardware/g2d:libnxp_g2d_viv", 190 "//device/soc/nxp/hardware/g2d:libnxp_gal", 191 "//device/soc/nxp/hardware/g2d:libnxp_gl", 192 "//device/soc/nxp/hardware/g2d:libnxp_gl_1", 193 "//device/soc/nxp/hardware/g2d:libnxp_gl_1_2", 194 "//device/soc/nxp/hardware/g2d:libnxp_gles_cl", 195 "//device/soc/nxp/hardware/g2d:libnxp_gles_cl_1", 196 "//device/soc/nxp/hardware/g2d:libnxp_gles_cl_1_1", 197 "//device/soc/nxp/hardware/g2d:libnxp_gles_cm", 198 "//device/soc/nxp/hardware/g2d:libnxp_gles_cm_1", 199 "//device/soc/nxp/hardware/g2d:libnxp_gles_cm_1_1", 200 "//device/soc/nxp/hardware/g2d:libnxp_glesv1_cl", 201 "//device/soc/nxp/hardware/g2d:libnxp_glesv1_cl_1", 202 "//device/soc/nxp/hardware/g2d:libnxp_glesv1_cl_1_1", 203 "//device/soc/nxp/hardware/g2d:libnxp_glesv1_cm", 204 "//device/soc/nxp/hardware/g2d:libnxp_glesv1_cm_1", 205 "//device/soc/nxp/hardware/g2d:libnxp_glesv1_cm_1_1", 206 "//device/soc/nxp/hardware/g2d:libnxp_glesv2", 207 "//device/soc/nxp/hardware/g2d:libnxp_glesv2_2", 208 "//device/soc/nxp/hardware/g2d:libnxp_glesv2_2_0", 209 "//device/soc/nxp/hardware/g2d:libnxp_glslc", 210 "//device/soc/nxp/hardware/g2d:libnxp_opencl", 211 "//device/soc/nxp/hardware/g2d:libnxp_opencl_1", 212 "//device/soc/nxp/hardware/g2d:libnxp_opencl_1_2", 213 "//device/soc/nxp/hardware/g2d:libnxp_vdk", 214 "//device/soc/nxp/hardware/g2d:libnxp_vdk_1", 215 "//device/soc/nxp/hardware/g2d:libnxp_vdk_1_2", 216 "//device/soc/nxp/hardware/g2d:libnxp_vg", 217 "//device/soc/nxp/hardware/g2d:libnxp_vg_1", 218 "//device/soc/nxp/hardware/g2d:libnxp_vg_2d_1_1", 219 "//device/soc/nxp/hardware/g2d:libnxp_vg_3d_1_1", 220 "//device/soc/nxp/hardware/g2d:libnxp_vsc", 221 "//device/soc/nxp/hardware/g2d:libnxp_wayland_client", 222 "//device/soc/nxp/hardware/g2d:libnxp_wayland_server", 223 "//third_party/bounds_checking_function:libsec_shared", 224 ] 225 external_deps = [ 226 "c_utils:utils", 227 "hilog:libhilog", 228 ] 229 cflags = [ 230 "-Wall", 231 "-Wextra", 232 "-Werror", 233 "-fsigned-char", 234 "-fno-common", 235 "-fno-strict-aliasing", 236 "-Wno-format", 237 "-Wno-format-extra-args", 238 ] 239 install_enable = true 240 install_images = [ chipset_base_dir ] 241 subsystem_name = "hdf" 242 part_name = "drivers_peripheral_display" 243} 244 245ohos_shared_library("display_layer") { 246 output_name = "display_layer" 247 sources = [ 248 "//drivers/peripheral/display/hal/disp_hal.c", 249 "src/display_layer/display_layer.c", 250 ] 251 include_dirs = [ 252 "include", 253 "//drivers/peripheral/display/hal", 254 "//drivers/peripheral/display/interfaces/include", 255 "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", 256 "//drivers/peripheral/base", 257 ] 258 deps = [ 259 "$hdf_uhdf_path/utils:libhdf_utils", 260 "//third_party/bounds_checking_function:libsec_shared", 261 ] 262 external_deps = [ 263 "c_utils:utils", 264 "hilog:libhilog", 265 ] 266 defines = [ "__USER__" ] 267 cflags = [ 268 "-Wall", 269 "-Wextra", 270 "-Werror", 271 "-fsigned-char", 272 "-fno-common", 273 "-fno-strict-aliasing", 274 "-Wno-format", 275 "-Wno-format-extra-args", 276 ] 277 install_enable = true 278 install_images = [ chipset_base_dir ] 279 subsystem_name = "hdf" 280 part_name = "drivers_peripheral_display" 281} 282