# Copyright (C) 2021–2022 Beijing OSWare Technology Co., Ltd # This file contains confidential and proprietary information of # OSWare Technology Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") group("display_group") { deps = [ ":display_device", ":display_gfx", ":display_gralloc", ] } ohos_shared_library("display_gralloc") { sources = [ "src/display_gralloc/allocator.cpp", "src/display_gralloc/allocator_manager.cpp", "src/display_gralloc/display_gralloc.cpp", "src/display_gralloc/dmabufferheap_allocator.cpp", "src/display_gralloc/drm_allocator.cpp", "src/display_gralloc/framebuffer_allocator.cpp", "src/utils/display_adapter.cpp", ] include_dirs = [ "include", "//drivers/peripheral/display/interfaces/include", "//drivers/peripheral/base", "src/utils/", ] output_name = "display_gralloc" cflags = [ "-Wno-macro-redefined" ] deps = [ "$hdf_uhdf_path/utils:libhdf_utils", "//third_party/libdrm:libdrm", "//utils/memory/libdmabufheap:libdmabufheap", ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] install_enable = true install_images = [ chipset_base_dir ] subsystem_name = "hdf" part_name = "drivers_peripheral_display" } config("def_display_device_pub_config") { visibility = [ ":*" ] include_dirs = [ "//drivers/peripheral/display/interfaces/include", "//drivers/peripheral/base", "//drivers/peripheral/display/hal/default_standard/src/display_device", "//drivers/peripheral/display/hal/default_standard/include", ] } ohos_shared_library("display_device") { sources = [ "src/display_device/composer/hdi_composer.cpp", "src/display_device/composer/hdi_gfx_composition.cpp", "src/display_device/composer/hdi_video_composition.cpp", "src/display_device/core/hdi_device_interface.cpp", "src/display_device/core/hdi_display.cpp", "src/display_device/core/hdi_layer.cpp", "src/display_device/core/hdi_session.cpp", "src/display_device/drm/drm_connector.cpp", "src/display_device/drm/drm_crtc.cpp", "src/display_device/drm/drm_device.cpp", "src/display_device/drm/drm_display.cpp", "src/display_device/drm/drm_encoder.cpp", "src/display_device/drm/drm_plane.cpp", "src/display_device/drm/drm_vsync_worker.cpp", "src/display_device/drm/hdi_drm_composition.cpp", "src/display_device/drm/hdi_drm_layer.cpp", "src/display_device/fbdev/fb_composition.cpp", "src/display_device/fbdev/fb_device.cpp", "src/display_device/fbdev/fb_display.cpp", "src/display_device/vsync/sorft_vsync.cpp", "src/utils/display_adapter.cpp", ] public_configs = [ ":def_display_device_pub_config" ] output_name = "display_device" include_dirs = [ "src/display_device", "include", "//drivers/peripheral/display/interfaces/include", "//drivers/peripheral/base", "src/display_device/drm", "src/display_device/fbdev", "src/display_device/core", "src/display_device/composer", "src/utils", ] deps = [ ":def_display_layer_video", ":display_gralloc", "$hdf_uhdf_path/utils:libhdf_utils", "//third_party/libdrm:libdrm", ] cflags = [ "-Wno-unused-function" ] external_deps = [ "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", ] install_enable = true install_images = [ chipset_base_dir ] subsystem_name = "hdf" part_name = "drivers_peripheral_display" } ohos_shared_library("def_display_layer_video") { sources = [ "src/display_layer_video/display_layer_video.cpp" ] public_configs = [ ":def_display_device_pub_config" ] output_name = "display_layer_video" include_dirs = [ "//drivers/peripheral/display/interfaces/include", "//drivers/peripheral/base", "//drivers/peripheral/display/hdi_service/video_layer/client", "//drivers/adapter/uhdf2/include/hdi", ] deps = [ "$hdf_uhdf_path/hdi:libhdi", "$hdf_uhdf_path/host:libhdf_host", "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", "$hdf_uhdf_path/utils:libhdf_utils", ] external_deps = [ "c_utils:utils", "hilog:libhilog", "ipc:ipc_single", ] public_deps = [ "//drivers/peripheral/display/hdi_service/video_layer/client:video_layer_client" ] install_enable = true install_images = [ chipset_base_dir ] subsystem_name = "hdf" part_name = "drivers_peripheral_display" } ohos_shared_library("display_gfx") { output_name = "display_gfx" sources = [ "src/display_gfx/display_gfx.c" ] include_dirs = [ "include", "//drivers/peripheral/display/hal", "//drivers/peripheral/display/interfaces/include", "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", "//drivers/peripheral/base", "//device/soc/nxp/hardware/g2d/include", ] deps = [ "$hdf_uhdf_path/utils:libhdf_utils", "//device/soc/nxp/hardware/g2d:libnxp_clc", "//device/soc/nxp/hardware/g2d:libnxp_egl", "//device/soc/nxp/hardware/g2d:libnxp_egl_1", "//device/soc/nxp/hardware/g2d:libnxp_egl_1_5", "//device/soc/nxp/hardware/g2d:libnxp_g2d", "//device/soc/nxp/hardware/g2d:libnxp_g2d_so_2", "//device/soc/nxp/hardware/g2d:libnxp_g2d_viv", "//device/soc/nxp/hardware/g2d:libnxp_gal", "//device/soc/nxp/hardware/g2d:libnxp_gl", "//device/soc/nxp/hardware/g2d:libnxp_gl_1", "//device/soc/nxp/hardware/g2d:libnxp_gl_1_2", "//device/soc/nxp/hardware/g2d:libnxp_gles_cl", "//device/soc/nxp/hardware/g2d:libnxp_gles_cl_1", "//device/soc/nxp/hardware/g2d:libnxp_gles_cl_1_1", "//device/soc/nxp/hardware/g2d:libnxp_gles_cm", "//device/soc/nxp/hardware/g2d:libnxp_gles_cm_1", "//device/soc/nxp/hardware/g2d:libnxp_gles_cm_1_1", "//device/soc/nxp/hardware/g2d:libnxp_glesv1_cl", "//device/soc/nxp/hardware/g2d:libnxp_glesv1_cl_1", "//device/soc/nxp/hardware/g2d:libnxp_glesv1_cl_1_1", "//device/soc/nxp/hardware/g2d:libnxp_glesv1_cm", "//device/soc/nxp/hardware/g2d:libnxp_glesv1_cm_1", "//device/soc/nxp/hardware/g2d:libnxp_glesv1_cm_1_1", "//device/soc/nxp/hardware/g2d:libnxp_glesv2", "//device/soc/nxp/hardware/g2d:libnxp_glesv2_2", "//device/soc/nxp/hardware/g2d:libnxp_glesv2_2_0", "//device/soc/nxp/hardware/g2d:libnxp_glslc", "//device/soc/nxp/hardware/g2d:libnxp_opencl", "//device/soc/nxp/hardware/g2d:libnxp_opencl_1", "//device/soc/nxp/hardware/g2d:libnxp_opencl_1_2", "//device/soc/nxp/hardware/g2d:libnxp_vdk", "//device/soc/nxp/hardware/g2d:libnxp_vdk_1", "//device/soc/nxp/hardware/g2d:libnxp_vdk_1_2", "//device/soc/nxp/hardware/g2d:libnxp_vg", "//device/soc/nxp/hardware/g2d:libnxp_vg_1", "//device/soc/nxp/hardware/g2d:libnxp_vg_2d_1_1", "//device/soc/nxp/hardware/g2d:libnxp_vg_3d_1_1", "//device/soc/nxp/hardware/g2d:libnxp_vsc", "//device/soc/nxp/hardware/g2d:libnxp_wayland_client", "//device/soc/nxp/hardware/g2d:libnxp_wayland_server", "//third_party/bounds_checking_function:libsec_shared", ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] cflags = [ "-Wall", "-Wextra", "-Werror", "-fsigned-char", "-fno-common", "-fno-strict-aliasing", "-Wno-format", "-Wno-format-extra-args", ] install_enable = true install_images = [ chipset_base_dir ] subsystem_name = "hdf" part_name = "drivers_peripheral_display" } ohos_shared_library("display_layer") { output_name = "display_layer" sources = [ "//drivers/peripheral/display/hal/disp_hal.c", "src/display_layer/display_layer.c", ] include_dirs = [ "include", "//drivers/peripheral/display/hal", "//drivers/peripheral/display/interfaces/include", "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", "//drivers/peripheral/base", ] deps = [ "$hdf_uhdf_path/utils:libhdf_utils", "//third_party/bounds_checking_function:libsec_shared", ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] defines = [ "__USER__" ] cflags = [ "-Wall", "-Wextra", "-Werror", "-fsigned-char", "-fno-common", "-fno-strict-aliasing", "-Wno-format", "-Wno-format-extra-args", ] install_enable = true install_images = [ chipset_base_dir ] subsystem_name = "hdf" part_name = "drivers_peripheral_display" }