1# Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd. 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 subsystem_name = "hdf" 63 part_name = "kaihong_products" 64} 65 66ohos_shared_library("libdisplay_buffer_vendor") { 67 sources = [ "src/display_gralloc/display_gralloc_gbm.cpp" ] 68 69 include_dirs = [ 70 "include", 71 "./src/display_gralloc", 72 "${root_path}/drivers/peripheral/base", 73 "${root_path}/drivers/interface/display/composer/hdifd_parcelable", 74 "${root_path}/drivers/peripheral/display/utils/include", 75 "${root_path}/foundation/communication/ipc/interfaces/innerkits/ipc_core/include", 76 ] 77 78 output_name = "libdisplay_buffer_vendor" 79 cflags = [ 80 "-DGRALLOC_GBM_SUPPORT", 81 "-Wno-macro-redefined", 82 ] 83 84 deps = [ 85 ":libhigbm_vendor", 86 "${root_path}/third_party/libdrm:libdrm", 87 ] 88 89 external_deps = [ 90 "c_utils:utils", 91 "drivers_interface_display:display_buffer_idl_headers", 92 "drivers_interface_display:display_composer_idl_headers", 93 "hdf_core:libhdf_utils", 94 "hilog:libhilog", 95 ] 96 97 install_enable = true 98 install_images = [ chipset_base_dir ] 99 subsystem_name = "hdf" 100 part_name = "kaihong_products" 101} 102 103ohos_static_library("libhigbm_vendor") { 104 sources = [ "src/display_gralloc/hi_gbm.cpp" ] 105 include_dirs = [ 106 "./src/display_gralloc", 107 "${root_path}/drivers/peripheral/display/utils/include", 108 "${root_path}/foundation/communication/ipc/interfaces/innerkits/ipc_core/include", 109 ] 110 output_name = "libhigbm_vendor" 111 cflags = [ 112 "-DGRALLOC_GBM_SUPPORT", 113 "-Wno-macro-redefined", 114 ] 115 deps = [ "${root_path}/third_party/libdrm:libdrm" ] 116 117 external_deps = [ 118 "c_utils:utils", 119 "hilog:libhilog", 120 ] 121} 122 123group("display_composer_model") { 124 deps = [ 125 ":display_composer_vendor", 126 ":display_gfx", 127 ":libdisplay_composer_vdi_impl", 128 ] 129} 130 131ohos_shared_library("libdisplay_composer_vdi_impl") { 132 sources = [ "src/display_device/display_composer_vdi_impl.cpp" ] 133 134 include_dirs = [ 135 "src/display_device", 136 "${root_path}/drivers/peripheral/display/utils/include", 137 "${root_path}/drivers/interface/display/composer", 138 "${root_path}/drivers/peripheral/display/composer/hdi_service/include", 139 "${root_path}/drivers/interface/display/composer/hdifd_parcelable", 140 ] 141 142 deps = [ ":display_composer_vendor" ] 143 144 external_deps = [ 145 "c_utils:utils", 146 "drivers_interface_display:display_composer_idl_headers", 147 "graphic_surface:buffer_handle", 148 "hilog:libhilog", 149 "ipc:ipc_single", 150 ] 151 152 install_enable = true 153 install_images = [ chipset_base_dir ] 154 subsystem_name = "hdf" 155 part_name = "kaihong_products" 156} 157 158ohos_shared_library("display_composer_vendor") { 159 sources = [ 160 "src/display_device/drm_connector.cpp", 161 "src/display_device/drm_crtc.cpp", 162 "src/display_device/drm_device.cpp", 163 "src/display_device/drm_display.cpp", 164 "src/display_device/drm_encoder.cpp", 165 "src/display_device/drm_plane.cpp", 166 "src/display_device/drm_vsync_worker.cpp", 167 "src/display_device/hdi_composer.cpp", 168 "src/display_device/hdi_device_interface.cpp", 169 "src/display_device/hdi_display.cpp", 170 "src/display_device/hdi_drm_composition.cpp", 171 "src/display_device/hdi_drm_layer.cpp", 172 "src/display_device/hdi_gfx_composition.cpp", 173 "src/display_device/hdi_layer.cpp", 174 "src/display_device/hdi_netlink_monitor.cpp", 175 "src/display_device/hdi_session.cpp", 176 ] 177 output_name = "display_composer_vendor" 178 include_dirs = [ 179 "src/display_gralloc", 180 "src/display_device", 181 "${root_path}/drivers/peripheral/display/buffer/hdi_service/include", 182 "${root_path}/drivers/peripheral/display/utils/include", 183 "${root_path}/drivers/peripheral/base", 184 "${root_path}/drivers/interface/display/composer", 185 "${root_path}/foundation/communication/ipc/interfaces/innerkits/ipc_core/include", 186 "${root_path}/device/soc/rockchip/common/hardware/rga/include", 187 "${root_path}/drivers/interface/display/composer/hdifd_parcelable", 188 ] 189 190 deps = [ 191 ":libdisplay_buffer_vdi_impl", 192 "${root_path}/device/soc/rockchip/common/hardware/rga:librga", 193 "${root_path}/third_party/libdrm:libdrm", 194 ] 195 cflags_cc = [ 196 "-Wno-error=unused-function", 197 "-Wno-error=missing-braces", 198 "-Wno-error=#warnings", 199 ] 200 external_deps = [ 201 "c_utils:utils", 202 "drivers_interface_display:display_buffer_idl_headers", 203 "drivers_interface_display:display_composer_idl_headers", 204 "hdf_core:libhdf_utils", 205 "hilog:libhilog", 206 "hitrace:hitrace_meter", 207 ] 208 install_enable = true 209 install_images = [ chipset_base_dir ] 210 subsystem_name = "hdf" 211 part_name = "kaihong_products" 212} 213 214ohos_shared_library("display_gfx") { 215 sources = [ "src/display_gfx/display_gfx.c" ] 216 include_dirs = [ 217 "${root_path}/base/hiviewdfx/interfaces/innerkits/libhilog/include", 218 "${root_path}/commonlibrary/c_utils/base/include", 219 "${root_path}/device/soc/rockchip/common/hardware/rga/include/", 220 "${root_path}/drivers/peripheral/display/interfaces/include", 221 "${root_path}/drivers/peripheral/display/utils/include", 222 "${root_path}/drivers/peripheral/base", 223 "${root_path}/foundation/graphic/standard/utils/include", 224 ] 225 output_name = "display_gfx" 226 cflags = [ "-Wno-macro-redefined" ] 227 deps = [ "${root_path}/device/soc/rockchip/common/hardware/rga:librga" ] 228 229 external_deps = [ 230 "c_utils:utils", 231 "hdf_core:libhdf_utils", 232 "hilog:libhilog", 233 ] 234 235 install_enable = true 236 install_images = [ chipset_base_dir ] 237 subsystem_name = "hdf" 238 part_name = "kaihong_products" 239} 240