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 = [ "passthrough" ] 63 subsystem_name = "hdf" 64 part_name = "rockchip_products" 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 = [ "passthrough" ] 101 subsystem_name = "hdf" 102 part_name = "rockchip_products" 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 "drivers_interface_display:libdisplay_composer_proxy_1.2", 150 "graphic_surface:buffer_handle", 151 "hilog:libhilog", 152 "ipc:ipc_single", 153 ] 154 155 install_enable = true 156 install_images = [ chipset_base_dir ] 157 subsystem_name = "hdf" 158 part_name = "rockchip_products" 159} 160 161ohos_shared_library("display_composer_vendor") { 162 sources = [ 163 "src/display_device/drm_connector.cpp", 164 "src/display_device/drm_crtc.cpp", 165 "src/display_device/drm_device.cpp", 166 "src/display_device/drm_display.cpp", 167 "src/display_device/drm_encoder.cpp", 168 "src/display_device/drm_plane.cpp", 169 "src/display_device/drm_vsync_worker.cpp", 170 "src/display_device/hdi_composer.cpp", 171 "src/display_device/hdi_device_interface.cpp", 172 "src/display_device/hdi_display.cpp", 173 "src/display_device/hdi_drm_composition.cpp", 174 "src/display_device/hdi_drm_layer.cpp", 175 "src/display_device/hdi_gfx_composition.cpp", 176 "src/display_device/hdi_layer.cpp", 177 "src/display_device/hdi_netlink_monitor.cpp", 178 "src/display_device/hdi_session.cpp", 179 ] 180 output_name = "display_composer_vendor" 181 include_dirs = [ 182 "src/display_gralloc", 183 "src/display_device", 184 "${root_path}/drivers/peripheral/display/buffer/hdi_service/include", 185 "${root_path}/drivers/peripheral/display/utils/include", 186 "${root_path}/drivers/peripheral/base", 187 "${root_path}/drivers/interface/display/composer", 188 "${root_path}/foundation/communication/ipc/interfaces/innerkits/ipc_core/include", 189 "${root_path}/device/soc/rockchip/rk3568/hardware/rga/include", 190 "${root_path}/drivers/interface/display/composer/hdifd_parcelable", 191 ] 192 193 deps = [ 194 ":libdisplay_buffer_vdi_impl", 195 "${root_path}/device/soc/rockchip/rk3568/hardware/rga:librga", 196 "${root_path}/third_party/libdrm:libdrm", 197 ] 198 cflags_cc = [ 199 "-Wno-error=unused-function", 200 "-Wno-error=missing-braces", 201 "-Wno-error=#warnings", 202 ] 203 external_deps = [ 204 "c_utils:utils", 205 "drivers_interface_display:display_buffer_idl_headers", 206 "drivers_interface_display:display_composer_idl_headers", 207 "hdf_core:libhdf_utils", 208 "hilog:libhilog", 209 "hitrace:hitrace_meter", 210 ] 211 install_enable = true 212 install_images = [ chipset_base_dir ] 213 subsystem_name = "hdf" 214 part_name = "rockchip_products" 215} 216 217ohos_shared_library("display_gfx") { 218 sources = [ "src/display_gfx/display_gfx.c" ] 219 include_dirs = [ 220 "${root_path}/base/hiviewdfx/interfaces/innerkits/libhilog/include", 221 "${root_path}/commonlibrary/c_utils/base/include", 222 "${root_path}/device/soc/rockchip/rk3568/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 deps = [ "${root_path}/device/soc/rockchip/rk3568/hardware/rga:librga" ] 231 232 external_deps = [ 233 "c_utils:utils", 234 "hdf_core:libhdf_utils", 235 "hilog:libhilog", 236 ] 237 238 install_enable = true 239 install_images = [ chipset_base_dir ] 240 subsystem_name = "hdf" 241 part_name = "rockchip_products" 242} 243