| # Copyright 2019 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/bind/bind.gni") |
| import("//build/components.gni") |
| import("//build/drivers.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":ge2d_bind_test", |
| ":ge2d_task_unittest", |
| ] |
| } |
| |
| driver_bind_rules("ge2d_bind") { |
| rules = "ge2d.bind" |
| header_output = "bind.h" |
| tests = "bind_tests.json" |
| deps = [ "//src/devices/bind/fuchsia.amlogic.platform" ] |
| } |
| |
| source_set("lib") { |
| sources = [ |
| "ge2d.cc", |
| "ge2d.h", |
| "ge2d_regs.h", |
| "ge2d_task.cc", |
| "ge2d_task.h", |
| ] |
| public_deps = [ |
| "//sdk/banjo/fuchsia.hardware.amlogiccanvas:fuchsia.hardware.amlogiccanvas_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.ge2d:fuchsia.hardware.ge2d_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.platform.device:fuchsia.hardware.platform.device_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.sysmem:fuchsia.hardware.sysmem_banjo_cpp", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_c", |
| "//sdk/lib/syslog/cpp", |
| "//src/camera/drivers/hw_accel/task:camera-task", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/bus/lib/device-protocol-platform-device", |
| "//src/devices/lib/mmio", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/hwreg", |
| ] |
| deps = [ |
| "//src/devices/lib/driver", |
| "//zircon/system/ulib/fzl", |
| "//zircon/system/ulib/image-format", |
| "//zircon/system/ulib/trace:trace-driver", |
| "//zircon/system/ulib/zx", |
| ] |
| configs += [ "//build/config/fuchsia:enable_zircon_asserts" ] |
| |
| # TODO(fxbug.dev/95833): This target uses the deprecated C bindings. |
| # Consider switching to the C++ bindings. See linked bug for details. |
| configs += [ "//build/c:fidl-deprecated-c-bindings" ] |
| } |
| |
| fuchsia_driver("ge2d-driver-driver") { |
| output_name = "ge2d" |
| sources = [ "bind.cc" ] |
| deps = [ |
| ":ge2d_bind", |
| ":ge2d_on_device_test", |
| ":lib", |
| "//sdk/lib/syslog/cpp:backend_legacy", |
| "//zircon/system/ulib/driver-unit-test", |
| ] |
| configs += [ "//build/config/fuchsia:enable_zircon_asserts" ] |
| } |
| |
| fuchsia_driver_component("ge2d-driver") { |
| component_name = "ge2d" |
| deps = [ ":ge2d-driver-driver" ] |
| info = "ge2d-driver-info.json" |
| colocate = true |
| } |
| |
| fuchsia_driver_package("ge2d") { |
| driver_components = [ ":ge2d-driver" ] |
| } |
| |
| source_set("ge2d_on_device_test") { |
| sources = [ "ge2d_on_device_test.cc" ] |
| deps = [ |
| "//sdk/lib/fit", |
| "//src/camera/drivers/hw_accel/ge2d:lib", |
| "//src/camera/drivers/test_utils", |
| "//src/lib/ddk", |
| "//zircon/system/ulib/driver-unit-test", |
| "//zircon/system/ulib/fzl", |
| "//zircon/system/ulib/image-format", |
| "//zircon/system/ulib/sync", |
| "//zircon/system/ulib/zxtest", |
| "//zircon/third_party/ulib/safemath", |
| ] |
| |
| # TODO(fxbug.dev/95833): This target uses the deprecated C bindings. |
| # Consider switching to the C++ bindings. See linked bug for details. |
| configs += [ "//build/c:fidl-deprecated-c-bindings" ] |
| } |
| |
| executable("ge2d_task_unittest_bin") { |
| testonly = true |
| sources = [ "ge2d_task_unittest.cc" ] |
| deps = [ |
| ":lib", |
| "//sdk/banjo/fuchsia.hardware.amlogiccanvas:fuchsia.hardware.amlogiccanvas_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.ge2d:fuchsia.hardware.ge2d_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.sysmem:fuchsia.hardware.sysmem_banjo_cpp", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_c", |
| "//src/camera/drivers/test_utils", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/mmio", |
| "//src/devices/lib/sysmem", |
| "//src/devices/testing/fake-bti", |
| "//src/devices/testing/mock-mmio-reg", |
| "//src/devices/testing/no_ddk", |
| "//src/lib/ddk", |
| "//src/lib/fsl", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/zx", |
| "//zircon/system/ulib/zxtest", |
| ] |
| |
| # TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| |
| # TODO(fxbug.dev/95833): This target uses the deprecated C bindings. |
| # Consider switching to the C++ bindings. See linked bug for details. |
| configs += [ "//build/c:fidl-deprecated-c-bindings" ] |
| } |
| |
| fuchsia_unittest_package("ge2d_task_unittest") { |
| deps = [ ":ge2d_task_unittest_bin" ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |