1# Copyright (C) 2021-2023 HiHope Open Source Organization . 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 16 17root_path = "../../../../../.." 18 19group("display_buffer_model") { 20 deps = [ 21 ":libdisplay_buffer_vdi_impl", 22 ":libdisplay_buffer_vendor", 23 ] 24} 25 26config("libdisplay_buffer_vdi_impl_config") { 27 include_dirs = [ "./src/display_gralloc" ] 28} 29 30ohos_shared_library("libdisplay_buffer_vdi_impl") { 31 sources = [ "src/display_gralloc/display_buffer_vdi_impl.cpp" ] 32 33 public_configs = [ ":libdisplay_buffer_vdi_impl_config" ] 34 35 include_dirs = [ 36 "./src/display_gralloc", 37 "${root_path}/drivers/peripheral/base", 38 "${root_path}/drivers/interface/display/composer/hdifd_parcelable", 39 "${root_path}/drivers/interface/display/buffer", 40 "${root_path}/drivers/peripheral/display/utils/include", 41 "${root_path}/drivers/peripheral/display/buffer/hdi_service/include", 42 ] 43 44 output_name = "libdisplay_buffer_vdi_impl" 45 cflags = [ 46 "-DGRALLOC_GBM_SUPPORT", 47 "-Wno-macro-redefined", 48 ] 49 deps = [ ":libdisplay_buffer_vendor" ] 50 51 external_deps = [ 52 "c_utils:utils", 53 "drivers_interface_display:display_buffer_idl_headers", 54 "drivers_interface_display:display_composer_idl_headers", 55 "hdf_core:libhdf_utils", 56 "hilog:libhilog", 57 "ipc:ipc_single", 58 ] 59 60 install_enable = true 61 install_images = [ chipset_base_dir ] 62 innerapi_tags = [ "chipsetsdk" ] 63 subsystem_name = "hdf" 64 part_name = "device_rk3588" 65} 66 67ohos_shared_library("libdisplay_buffer_vendor") { 68 sources = [ "src/display_gralloc/display_gralloc_gbm.cpp" ] 69 70 include_dirs = [ 71 "include", 72 "./src/display_gralloc", 73 "${root_path}/drivers/peripheral/base", 74 "${root_path}/drivers/interface/display/composer/hdifd_parcelable", 75 "${root_path}/drivers/peripheral/display/utils/include", 76 "${root_path}/foundation/communication/ipc/interfaces/innerkits/ipc_core/include", 77 ] 78 79 output_name = "libdisplay_buffer_vendor" 80 cflags = [ 81 "-DGRALLOC_GBM_SUPPORT", 82 "-Wno-macro-redefined", 83 ] 84 85 deps = [ 86 ":libhigbm_vendor", 87 "${root_path}/third_party/libdrm:libdrm", 88 ] 89 90 external_deps = [ 91 "c_utils:utils", 92 "drivers_interface_display:display_buffer_idl_headers", 93 "drivers_interface_display:display_composer_idl_headers", 94 "hdf_core:libhdf_utils", 95 "hilog:libhilog", 96 ] 97 98 install_enable = true 99 install_images = [ chipset_base_dir ] 100 innerapi_tags = [ "chipsetsdk" ] 101 subsystem_name = "hdf" 102 part_name = "device_rk3588" 103} 104 105ohos_static_library("libhigbm_vendor") { 106 sources = [ "src/display_gralloc/hi_gbm.cpp" ] 107 include_dirs = [ 108 "./src/display_gralloc", 109 "${root_path}/drivers/peripheral/display/utils/include", 110 "${root_path}/foundation/communication/ipc/interfaces/innerkits/ipc_core/include", 111 ] 112 output_name = "libhigbm_vendor" 113 cflags = [ 114 "-DGRALLOC_GBM_SUPPORT", 115 "-Wno-macro-redefined", 116 ] 117 deps = [ "${root_path}/third_party/libdrm:libdrm" ] 118 119 external_deps = [ 120 "c_utils:utils", 121 "hilog:libhilog", 122 ] 123} 124 125group("display_composer_model") { 126 deps = [ 127 ":display_composer_vendor", 128 ":display_gfx", 129 ":libdisplay_composer_vdi_impl", 130 ] 131} 132 133ohos_shared_library("libdisplay_composer_vdi_impl") { 134 sources = [ "src/display_device/display_composer_vdi_impl.cpp" ] 135 136 include_dirs = [ 137 "src/display_device", 138 "${root_path}/drivers/peripheral/display/utils/include", 139 "${root_path}/drivers/interface/display/composer", 140 "${root_path}/drivers/peripheral/display/composer/hdi_service/include", 141 "${root_path}/drivers/interface/display/composer/hdifd_parcelable", 142 ] 143 144 deps = [ ":display_composer_vendor" ] 145 146 external_deps = [ 147 "c_utils:utils", 148 "drivers_interface_display:display_composer_idl_headers", 149 "graphic_surface:buffer_handle", 150 "hilog:libhilog", 151 "ipc:ipc_single", 152 ] 153 154 install_enable = true 155 install_images = [ chipset_base_dir ] 156 subsystem_name = "hdf" 157 part_name = "device_rk3588" 158} 159 160ohos_shared_library("display_composer_vendor") { 161 sources = [ 162 "src/display_device/drm_connector.cpp", 163 "src/display_device/drm_crtc.cpp", 164 "src/display_device/drm_device.cpp", 165 "src/display_device/drm_display.cpp", 166 "src/display_device/drm_encoder.cpp", 167 "src/display_device/drm_plane.cpp", 168 "src/display_device/drm_vsync_worker.cpp", 169 "src/display_device/hdi_composer.cpp", 170 "src/display_device/hdi_device_interface.cpp", 171 "src/display_device/hdi_display.cpp", 172 "src/display_device/hdi_drm_composition.cpp", 173 "src/display_device/hdi_drm_layer.cpp", 174 "src/display_device/hdi_gfx_composition.cpp", 175 "src/display_device/hdi_layer.cpp", 176 "src/display_device/hdi_netlink_monitor.cpp", 177 "src/display_device/hdi_session.cpp", 178 ] 179 output_name = "display_composer_vendor" 180 include_dirs = [ 181 "src/display_gralloc", 182 "src/display_device", 183 "${root_path}/drivers/peripheral/display/buffer/hdi_service/include", 184 "${root_path}/drivers/peripheral/display/utils/include", 185 "${root_path}/drivers/peripheral/base", 186 "${root_path}/drivers/interface/display/composer", 187 "${root_path}/foundation/communication/ipc/interfaces/innerkits/ipc_core/include", 188 "${root_path}/device/soc/rockchip/rk3588/hardware/rga/include", 189 "${root_path}/drivers/interface/display/composer/hdifd_parcelable", 190 ] 191 192 deps = [ 193 ":libdisplay_buffer_vdi_impl", 194 "${root_path}/device/soc/rockchip/rk3588/hardware/rga:librga", 195 "${root_path}/third_party/libdrm:libdrm", 196 ] 197 cflags_cc = [ 198 "-Wno-error=unused-function", 199 "-Wno-error=missing-braces", 200 "-Wno-error=#warnings", 201 ] 202 external_deps = [ 203 "c_utils:utils", 204 "drivers_interface_display:display_buffer_idl_headers", 205 "drivers_interface_display:display_composer_idl_headers", 206 "hdf_core:libhdf_utils", 207 "hilog:libhilog", 208 "hitrace:hitrace_meter", 209 ] 210 install_enable = true 211 install_images = [ chipset_base_dir ] 212 subsystem_name = "hdf" 213 part_name = "device_rk3588" 214} 215 216ohos_shared_library("display_gfx") { 217 sources = [ "src/display_gfx/display_gfx.c" ] 218 include_dirs = [ 219 "./include", 220 "${root_path}/base/hiviewdfx/interfaces/innerkits/libhilog/include", 221 "${root_path}/commonlibrary/c_utils/base/include", 222 "${root_path}/device/soc/rockchip/rk3588/hardware/rga/include/", 223 "${root_path}/drivers/peripheral/display/interfaces/include", 224 "${root_path}/drivers/peripheral/display/utils/include", 225 "${root_path}/drivers/peripheral/base", 226 "${root_path}/foundation/graphic/standard/utils/include", 227 ] 228 output_name = "display_gfx" 229 cflags = [ "-Wno-macro-redefined" ] 230 231 deps = [ "${root_path}/device/soc/rockchip/rk3588/hardware/rga:librga" ] 232 233 external_deps = [ 234 "c_utils:utils", 235 "hdf_core:libhdf_utils", 236 "hilog:libhilog", 237 ] 238 239 install_enable = true 240 install_images = [ chipset_base_dir ] 241 subsystem_name = "hdf" 242 part_name = "device_rk3588" 243} 244