1# Copyright (c) 2021 Huawei Device 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") 15 16group("display_group") { 17 deps = [ 18 ":hisi_display_gralloc", 19 ":hisi_display_device", 20 ] 21} 22 23ohos_shared_library("hisi_display_gralloc") { 24 sources = [ 25 "src/display_gralloc/allocator.cpp", 26 "src/display_gralloc/allocator_manager.cpp", 27 "src/display_gralloc/display_gralloc.cpp", 28 "src/display_gralloc/dmabufferheap_allocator.cpp", 29 "src/display_gralloc/drm_allocator.cpp", 30 "src/display_gralloc/framebuffer_allocator.cpp", 31 "src/utils/display_adapter.cpp", 32 ] 33 include_dirs = [ 34 "include", 35 "//drivers/peripheral/display/interfaces/include", 36 "//drivers/peripheral/base", 37 "src/utils/", 38 ] 39 40 output_name = "display_gralloc" 41 cflags = [ "-Wno-macro-redefined" ] 42 deps = [ 43 "//third_party/libdrm:libdrm", 44 "//utils/memory/libdmabufheap:libdmabufheap", 45 ] 46 47 external_deps = [ 48 "device_driver_framework:libhdf_utils", 49 "hiviewdfx_hilog_native:libhilog", 50 "utils_base:utils", 51 ] 52 53 install_enable = true 54 install_images = [ chipset_base_dir ] 55 subsystem_name = "hdf" 56 part_name = "display_device_driver" 57} 58 59config("hisi_display_device_pub_config") { 60 visibility = [ ":*" ] 61 62 include_dirs = [ 63 "//drivers/peripheral/display/interfaces/include", 64 "//drivers/peripheral/base", 65 "//drivers/peripheral/display/hal/default_standard/src/display_device", 66 "//drivers/peripheral/display/hal/default_standard/include", 67 ] 68} 69 70ohos_shared_library("hisi_display_device") { 71 sources = [ 72 "src/display_device/composer/hdi_composer.cpp", 73 "src/display_device/composer/hdi_gfx_composition.cpp", 74 "src/display_device/composer/hdi_video_composition.cpp", 75 "src/display_device/core/hdi_device_interface.cpp", 76 "src/display_device/core/hdi_display.cpp", 77 "src/display_device/core/hdi_layer.cpp", 78 "src/display_device/core/hdi_session.cpp", 79 "src/display_device/drm/drm_connector.cpp", 80 "src/display_device/drm/drm_crtc.cpp", 81 "src/display_device/drm/drm_device.cpp", 82 "src/display_device/drm/drm_display.cpp", 83 "src/display_device/drm/drm_encoder.cpp", 84 "src/display_device/drm/drm_plane.cpp", 85 "src/display_device/drm/drm_vsync_worker.cpp", 86 "src/display_device/drm/hdi_drm_composition.cpp", 87 "src/display_device/drm/hdi_drm_layer.cpp", 88 "src/display_device/fbdev/fb_composition.cpp", 89 "src/display_device/fbdev/fb_device.cpp", 90 "src/display_device/fbdev/fb_display.cpp", 91 "src/display_device/vsync/sorft_vsync.cpp", 92 "src/utils/display_adapter.cpp", 93 ] 94 public_configs = [ ":hisi_display_device_pub_config" ] 95 96 output_name = "display_device" 97 98 include_dirs = [ 99 "src/display_device", 100 "include", 101 "//drivers/peripheral/display/interfaces/include", 102 "//drivers/peripheral/base", 103 "src/display_device/drm", 104 "src/display_device/fbdev", 105 "src/display_device/core", 106 "src/display_device/composer", 107 "src/utils", 108 ] 109 110 deps = [ 111 ":hisi_display_gralloc", 112 ":hisi_display_layer_video", 113 "//third_party/libdrm:libdrm", 114 "//developtools/bytrace_standard/interfaces/innerkits/native:bytrace_core", 115 "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", 116 "src/display_device/composer/gles:gles_composition" 117 ] 118 119 cflags_cc = [ 120 "-Wno-error=unused-function", 121 "-Wno-error=missing-braces", 122 "-Wno-error=#warnings", 123 ] 124 125 external_deps = [ 126 "device_driver_framework:libhdf_utils", 127 "hiviewdfx_hilog_native:libhilog", 128 "utils_base:utils", 129 ] 130 131 defines = [ 132 "ENABLE_GLES_COMPOSITION" 133 ] 134 135 install_enable = true 136 install_images = [ chipset_base_dir ] 137 subsystem_name = "hdf" 138 part_name = "display_device_driver" 139} 140 141ohos_shared_library("hisi_display_layer_video") { 142 sources = [ "src/display_layer_video/display_layer_video.cpp" ] 143 public_configs = [ ":hisi_display_device_pub_config" ] 144 145 output_name = "display_layer_video" 146 include_dirs = [ 147 "//drivers/peripheral/display/interfaces/include", 148 "//drivers/peripheral/base", 149 "//drivers/peripheral/display/hdi_service/video_layer/client", 150 "//drivers/adapter/uhdf2/include/hdi", 151 ] 152 153 external_deps = [ 154 "device_driver_framework:libhdf_host", 155 "device_driver_framework:libhdf_ipc_adapter", 156 "device_driver_framework:libhdf_utils", 157 "device_driver_framework:libhdi", 158 "hiviewdfx_hilog_native:libhilog", 159 "ipc:ipc_single", 160 "utils_base:utils", 161 ] 162 163 public_deps = [ "//drivers/peripheral/display/hdi_service/video_layer/client:video_layer_client" ] 164 165 install_enable = true 166 install_images = [ chipset_base_dir ] 167 subsystem_name = "hdf" 168 part_name = "display_device_driver" 169} 170