• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021-2022 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")
15
16group("display_group") {
17  deps = [
18    ":display_device",
19    ":display_gfx",
20    ":display_gralloc",
21    ":higbm",
22  ]
23}
24
25ohos_static_library("higbm") {
26  sources = [ "src/display_gralloc/hi_gbm.c" ]
27  include_dirs = [
28    "include",
29    "//utils/native/base/include",
30    "//base/hiviewdfx/interfaces/innerkits/libhilog/include",
31  ]
32  output_name = "higbm"
33  cflags = [
34    "-DGRALLOC_GBM_SUPPORT",
35    "-Wno-macro-redefined",
36  ]
37  deps = [
38    "//third_party/libdrm:libdrm",
39    "//utils/native/base:utils",
40  ]
41  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
42}
43
44ohos_shared_library("display_gralloc") {
45  sources = [
46    "src/display_gralloc/display_gralloc.c",
47    "src/display_gralloc/display_gralloc_gbm.c",
48    "src/display_gralloc/wayland_drm_auth_client.c",
49  ]
50  include_dirs = [
51    "include",
52    "//drivers/peripheral/display/interfaces/include",
53    "//drivers/peripheral/base",
54    "//drivers/framework/include/utils",
55    "//drivers/adapter/uhdf2/osal/include",
56    "//utils/native/base/include",
57    "//foundation/graphic/standard/utils/include",
58    "//foundation/graphic/standard/prebuilts/librarys/drm/include",
59    "//base/hiviewdfx/interfaces/innerkits/libhilog/include",
60  ]
61  output_name = "display_gralloc"
62  cflags = [
63    "-DGRALLOC_GBM_SUPPORT",
64    "-Wno-macro-redefined",
65  ]
66  deps = [
67    ":higbm",
68    "//third_party/libdrm:libdrm",
69    "//third_party/wayland_standard:libwayland_client",
70    "//third_party/weston:drm_auth_protocol",
71    "//utils/native/base:utils",
72  ]
73
74  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
75
76  install_enable = true
77  install_images = [ chipset_base_dir ]
78  subsystem_name = "hdf"
79  part_name = "display_device_driver"
80}
81
82ohos_shared_library("display_gfx") {
83  sources = [ "src/display_gfx/display_gfx.c" ]
84  include_dirs = [
85    "include",
86    "//drivers/peripheral/display/interfaces/include",
87    "//drivers/peripheral/base",
88    "//drivers/framework/include/utils",
89    "//drivers/adapter/uhdf2/adapter/osal/include/",
90    "//utils/native/base/include",
91    "//foundation/graphic/standard/utils/include",
92    "//device/hihope/hardware/rga/include/",
93    "//base/hiviewdfx/interfaces/innerkits/libhilog/include",
94  ]
95  output_name = "display_gfx"
96  cflags = [ "-Wno-macro-redefined" ]
97  deps = [
98    ":display_gralloc",
99    "//device/hihope/hardware/rga:librga",
100    "//utils/native/base:utils",
101  ]
102
103  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
104
105  install_enable = true
106  install_images = [ chipset_base_dir ]
107  subsystem_name = "hdf"
108  part_name = "display_device_driver"
109}
110
111ohos_shared_library("display_device") {
112  sources = [
113    "src/display_device/drm_connector.cpp",
114    "src/display_device/drm_crtc.cpp",
115    "src/display_device/drm_device.cpp",
116    "src/display_device/drm_display.cpp",
117    "src/display_device/drm_encoder.cpp",
118    "src/display_device/drm_plane.cpp",
119    "src/display_device/drm_vsync_worker.cpp",
120    "src/display_device/hdi_composer.cpp",
121    "src/display_device/hdi_device_interface.cpp",
122    "src/display_device/hdi_display.cpp",
123    "src/display_device/hdi_drm_composition.cpp",
124    "src/display_device/hdi_drm_layer.cpp",
125    "src/display_device/hdi_gfx_composition.cpp",
126    "src/display_device/hdi_layer.cpp",
127    "src/display_device/hdi_netlink_monitor.cpp",
128    "src/display_device/hdi_session.cpp",
129  ]
130  output_name = "display_device"
131  include_dirs = [
132    "src/display_device",
133    "include",
134    "//drivers/peripheral/display/interfaces/include",
135    "//drivers/peripheral/base",
136    "//drivers/framework/include/utils",
137    "//drivers/adapter/uhdf2/osal/include",
138    "//utils/native/base/include",
139    "//foundation/graphic/standard/utils/include",
140    "//foundation/graphic/standard/prebuilts/librarys/drm/include",
141    "//base/hiviewdfx/interfaces/innerkits/libhilog/include",
142  ]
143  deps = [
144    ":display_gfx",
145    ":display_gralloc",
146    "//third_party/libdrm:libdrm",
147    "//utils/native/base:utils",
148  ]
149  cflags_cc = [
150    "-Wno-error=unused-function",
151    "-Wno-error=missing-braces",
152    "-Wno-error=#warnings",
153  ]
154  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
155
156  install_enable = true
157  install_images = [ chipset_base_dir ]
158  subsystem_name = "hdf"
159  part_name = "display_device_driver"
160}
161
162group("display_layer") {
163  deps = [
164    ":display_device",
165    ":display_gfx",
166    ":display_gralloc",
167    ":higbm",
168  ]
169}
170