• 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
14if (defined(ohos_lite)) {
15  group("hdi_display") {
16    if (device_company == "hisilicon") {
17      public_deps =
18          [ "//device/soc/${device_company}/common/hal/display:hdi_display" ]
19    } else {
20      public_deps =
21          [ "//device/${device_company}/hardware/display:hdi_display" ]
22    }
23  }
24  group("hdi_display_device") {
25    deps = []
26    public_configs = []
27  }
28  group("hdi_display_gralloc") {
29    deps = []
30    public_configs = []
31  }
32} else {
33  import("//build/ohos.gni")
34
35  if (device_company == "hisilicon") {
36    device_hal = "soc/${device_company}/common/hal"
37  } else if (product_name != "ohos-arm64") {
38    device_hal = "${device_company}/hardware"
39  }
40
41  config("display_hdi_public_config") {
42    visibility = [ ":*" ]
43    include_dirs = [
44      "//drivers/peripheral/base",
45      "//drivers/peripheral/display/interfaces/include",
46      "//third_party/bounds_checking_function/include",
47    ]
48  }
49
50  group("hdi_display") {
51    deps = [
52      ":hdi_display_device",
53      ":hdi_display_gfx",
54      ":hdi_display_gralloc",
55      ":hdi_display_layer",
56      "//drivers/peripheral/display/hdi_service/device:display_device_service",
57      "//drivers/peripheral/display/hdi_service/gralloc/client:hdi_gralloc_client",
58      "//drivers/peripheral/display/hdi_service/gralloc/server:hdi_gralloc_stub",
59      "//drivers/peripheral/display/hdi_service/video_layer/client:video_layer_client",
60    ]
61    if (target_cpu == "arm") {
62      deps += [ "//drivers/peripheral/display/hdi_service/video_layer/server:video_layer_service" ]
63    }
64    public_configs = [ ":display_hdi_public_config" ]
65  }
66
67  if (product_name != "ohos-arm64") {
68    group("hdi_display_device") {
69      deps = [ "//device/${device_hal}/display:display_device" ]
70      public_configs = [ ":display_hdi_public_config" ]
71    }
72
73    group("hdi_display_gralloc") {
74      deps = [ "//device/${device_hal}/display:display_gralloc" ]
75      public_configs = [ ":display_hdi_public_config" ]
76    }
77
78    group("hdi_display_gfx") {
79      deps = [ "//device/${device_hal}/display:display_gfx" ]
80      public_configs = [ ":display_hdi_public_config" ]
81    }
82
83    group("hdi_display_layer") {
84      deps = [ "//device/${device_hal}/display:display_layer" ]
85      public_configs = [ ":display_hdi_public_config" ]
86    }
87  } else {
88    group("hdi_display_device") {
89      deps = [ "//device/soc/hisilicon/common/hal/display:display_device" ]
90      public_configs = [ ":display_hdi_public_config" ]
91    }
92
93    group("hdi_display_gralloc") {
94      deps = [ "//device/soc/hisilicon/common/hal/display:display_gralloc" ]
95      public_configs = [ ":display_hdi_public_config" ]
96    }
97
98    group("hdi_display_gfx") {
99      deps = [ "//device/soc/hisilicon/common/hal/display:display_gfx" ]
100      public_configs = [ ":display_hdi_public_config" ]
101    }
102
103    group("hdi_display_layer") {
104      deps = [ "//device/soc/hisilicon/common/hal/display:display_layer" ]
105      public_configs = [ ":display_hdi_public_config" ]
106    }
107  }
108}
109