• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    ":def_display_device",
19    ":def_display_gralloc",
20  ]
21}
22
23ohos_shared_library("def_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("def_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("def_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 = [ ":def_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    ":def_display_gralloc",
112    ":def_display_layer_video",
113    "//third_party/libdrm:libdrm",
114    "//developtools/bytrace_standard/interfaces/innerkits/native:bytrace_core",
115  ]
116
117  cflags = [ "-Wno-unused-function" ]
118
119  external_deps = [
120    "device_driver_framework:libhdf_utils",
121    "hiviewdfx_hilog_native:libhilog",
122    "utils_base:utils",
123  ]
124
125  install_enable = true
126  install_images = [ chipset_base_dir ]
127  subsystem_name = "hdf"
128  part_name = "display_device_driver"
129}
130
131ohos_shared_library("def_display_layer_video") {
132  sources = [ "src/display_layer_video/display_layer_video.cpp" ]
133  public_configs = [ ":def_display_device_pub_config" ]
134
135  output_name = "display_layer_video"
136  include_dirs = [
137    "//drivers/peripheral/display/interfaces/include",
138    "//drivers/peripheral/base",
139    "//drivers/peripheral/display/hdi_service/video_layer/client",
140    "//drivers/adapter/uhdf2/include/hdi",
141  ]
142
143  external_deps = [
144    "device_driver_framework:libhdf_host",
145    "device_driver_framework:libhdf_ipc_adapter",
146    "device_driver_framework:libhdf_utils",
147    "device_driver_framework:libhdi",
148    "hiviewdfx_hilog_native:libhilog",
149    "ipc:ipc_single",
150    "utils_base:utils",
151  ]
152
153  public_deps = [ "//drivers/peripheral/display/hdi_service/video_layer/client:video_layer_client" ]
154
155  install_enable = true
156  install_images = [ chipset_base_dir ]
157  subsystem_name = "hdf"
158  part_name = "display_device_driver"
159}
160