• 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    "//commonlibrary/c_utils/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 = [ "//third_party/libdrm:libdrm" ]
38  external_deps = [
39    "c_utils:utils",
40    "hiviewdfx_hilog_native:libhilog",
41  ]
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  ]
49  include_dirs = [
50    "include",
51    "//drivers/peripheral/display/interfaces/include",
52    "//drivers/peripheral/base",
53    "//drivers/hdf_core/framework/include/utils",
54    "//drivers/hdf_core/adapter/uhdf2/osal/include",
55    "//commonlibrary/c_utils/base/include",
56    "//foundation/graphic/standard/utils/include",
57    "//foundation/graphic/standard/prebuilts/librarys/drm/include",
58    "//base/hiviewdfx/interfaces/innerkits/libhilog/include",
59  ]
60  output_name = "display_gralloc"
61  cflags = [
62    "-DGRALLOC_GBM_SUPPORT",
63    "-Wno-macro-redefined",
64  ]
65  deps = [
66    ":higbm",
67    "//third_party/libdrm:libdrm",
68  ]
69
70  external_deps = [
71    "c_utils:utils",
72    "hiviewdfx_hilog_native:libhilog",
73  ]
74
75  install_enable = true
76  install_images = [ system_base_dir ]
77  relative_install_dir = "chipset-sdk"
78  subsystem_name = "hdf"
79  part_name = "drivers_peripheral_display"
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/hdf_core/framework/include/utils",
89    "//drivers/hdf_core/adapter/uhdf2/adapter/osal/include/",
90    "//commonlibrary/c_utils/base/include",
91    "//foundation/graphic/standard/utils/include",
92    "//device/soc/rockchip/rk3568/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/soc/rockchip/rk3568/hardware/rga:librga",
100  ]
101
102  external_deps = [
103    "c_utils:utils",
104    "hiviewdfx_hilog_native:libhilog",
105  ]
106
107  install_enable = true
108  install_images = [ system_base_dir ]
109  relative_install_dir = "chipset-sdk"
110  subsystem_name = "hdf"
111  part_name = "drivers_peripheral_display"
112}
113
114ohos_shared_library("display_device") {
115  sources = [
116    "src/display_device/drm_connector.cpp",
117    "src/display_device/drm_crtc.cpp",
118    "src/display_device/drm_device.cpp",
119    "src/display_device/drm_display.cpp",
120    "src/display_device/drm_encoder.cpp",
121    "src/display_device/drm_plane.cpp",
122    "src/display_device/drm_vsync_worker.cpp",
123    "src/display_device/hdi_composer.cpp",
124    "src/display_device/hdi_device_interface.cpp",
125    "src/display_device/hdi_display.cpp",
126    "src/display_device/hdi_drm_composition.cpp",
127    "src/display_device/hdi_drm_layer.cpp",
128    "src/display_device/hdi_gfx_composition.cpp",
129    "src/display_device/hdi_layer.cpp",
130    "src/display_device/hdi_netlink_monitor.cpp",
131    "src/display_device/hdi_session.cpp",
132  ]
133  output_name = "display_device"
134  include_dirs = [
135    "src/display_device",
136    "include",
137    "//drivers/peripheral/display/interfaces/include",
138    "//drivers/peripheral/base",
139    "//drivers/hdf_core/framework/include/utils",
140    "//drivers/hdf_core/adapter/uhdf2/osal/include",
141    "//commonlibrary/c_utils/base/include",
142    "//foundation/graphic/standard/utils/include",
143    "//foundation/graphic/standard/prebuilts/librarys/drm/include",
144    "//base/hiviewdfx/interfaces/innerkits/libhilog/include",
145  ]
146  deps = [
147    ":display_gfx",
148    ":display_gralloc",
149    "//third_party/libdrm:libdrm",
150  ]
151  cflags_cc = [
152    "-Wno-error=unused-function",
153    "-Wno-error=missing-braces",
154    "-Wno-error=#warnings",
155  ]
156  external_deps = [
157    "c_utils:utils",
158    "hiviewdfx_hilog_native:libhilog",
159  ]
160
161  install_enable = true
162  install_images = [ system_base_dir ]
163  relative_install_dir = "chipset-sdk"
164  subsystem_name = "hdf"
165  part_name = "drivers_peripheral_display"
166}
167
168group("display_layer") {
169  deps = [
170    ":display_device",
171    ":display_gfx",
172    ":display_gralloc",
173    ":higbm",
174  ]
175}
176