• 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
16ohos_shared_library("display_gralloc") {
17  sources = [
18    "src/display_gralloc/display_gralloc.c",
19    "src/display_gralloc/display_gralloc_gbm.c",
20    "src/display_gralloc/seed_gbm.c",
21  ]
22  include_dirs = [
23    "include",
24    "//drivers/peripheral/display/interfaces/include",
25    "//drivers/peripheral/base",
26    "//commonlibrary/c_utils/base/include",
27    "//base/hiviewdfx/interfaces/innerkits/libhilog/include",
28  ]
29  output_name = "display_gralloc"
30  cflags = [
31    "-DGRALLOC_GBM_SUPPORT",
32    "-Wno-macro-redefined",
33  ]
34  deps = [ "//third_party/libdrm:libdrm" ]
35
36  external_deps = [
37    "c_utils:utils",
38    "hdf_core:libhdf_utils",
39    "hilog:libhilog",
40  ]
41
42  install_enable = true
43  install_images = [ chipset_base_dir ]
44  subsystem_name = "hdf"
45  part_name = "drivers_peripheral_display"
46}
47
48ohos_shared_library("display_gfx") {
49  sources = [ "src/display_gfx/display_gfx.c" ]
50  include_dirs = [
51    "include",
52    "//drivers/peripheral/display/interfaces/include",
53    "//drivers/peripheral/base",
54    "//commonlibrary/c_utils/base/include",
55    "//device/soc/allwinner/t507/hardware/rga/include/",
56    "//base/hiviewdfx/interfaces/innerkits/libhilog/include",
57    "//device/soc/allwinner/t507/hardware/display/src/display_gralloc",
58  ]
59  output_name = "display_gfx"
60  cflags = [ "-Wno-macro-redefined" ]
61  deps = [
62    ":display_gralloc",
63    "//device/soc/allwinner/t507/hardware/rga:librga",
64  ]
65
66  external_deps = [
67    "c_utils:utils",
68    "hdf_core:libhdf_utils",
69    "hilog:libhilog",
70  ]
71
72  install_enable = true
73  install_images = [ chipset_base_dir ]
74  subsystem_name = "hdf"
75  part_name = "drivers_peripheral_display"
76}
77
78ohos_shared_library("display_device") {
79  sources = [
80    "src/display_device/drm_connector.cpp",
81    "src/display_device/drm_crtc.cpp",
82    "src/display_device/drm_device.cpp",
83    "src/display_device/drm_display.cpp",
84    "src/display_device/drm_encoder.cpp",
85    "src/display_device/drm_plane.cpp",
86    "src/display_device/drm_vsync_worker.cpp",
87    "src/display_device/hdi_composer.cpp",
88    "src/display_device/hdi_device_interface.cpp",
89    "src/display_device/hdi_display.cpp",
90    "src/display_device/hdi_drm_composition.cpp",
91    "src/display_device/hdi_drm_layer.cpp",
92    "src/display_device/hdi_layer.cpp",
93    "src/display_device/hdi_session.cpp",
94  ]
95  output_name = "display_device"
96  include_dirs = [
97    "src/display_device",
98    "include",
99    "//drivers/peripheral/display/interfaces/include",
100    "//drivers/peripheral/base",
101    "//commonlibrary/c_utils/base/include",
102    "//base/hiviewdfx/interfaces/innerkits/libhilog/include",
103  ]
104  deps = [
105    ":display_gralloc",
106    "//third_party/libdrm:libdrm",
107  ]
108  cflags_cc = [
109    "-Wno-error=unused-function",
110    "-Wno-error=missing-braces",
111    "-Wno-error=#warnings",
112  ]
113  external_deps = [
114    "c_utils:utils",
115    "hdf_core:libhdf_utils",
116    "hilog:libhilog",
117  ]
118
119  symlink_target_name = [ "libdisplay_layer.z.so" ]
120
121  install_enable = true
122  install_images = [ chipset_base_dir ]
123  subsystem_name = "hdf"
124  part_name = "drivers_peripheral_display"
125}
126
127group("display_layer") {
128  deps = [
129    ":display_device",
130    ":display_gfx",
131    ":display_gralloc",
132  ]
133}
134