| # 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/config/fuchsia/rules.gni") |
| import("//src/sys/build/components.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":aml-gpu-test", |
| ":aml_gpu_bind_test", |
| ] |
| } |
| |
| bind_rules("aml_gpu_bind") { |
| rules = "aml_gpu.bind" |
| output = "aml_gpu-bind.h" |
| tests = "bind_tests.json" |
| deps = [ "//src/devices/bind/amlogic.platform" ] |
| } |
| |
| source_set("sources") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| if (is_fuchsia) { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| } |
| sources = [ "aml-gpu.cc" ] |
| public_deps = [ |
| ":aml_gpu_bind", |
| "//sdk/banjo/fuchsia.hardware.gpio:fuchsia.hardware.gpio_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.gpu.mali", |
| "//sdk/banjo/fuchsia.hardware.iommu", |
| "//sdk/banjo/fuchsia.hardware.platform.bus", |
| "//sdk/banjo/fuchsia.hardware.platform.device", |
| "//sdk/banjo/fuchsia.hardware.registers", |
| "//sdk/banjo/fuchsia.hardware.sysmem", |
| "//sdk/fidl/fuchsia.hardware.gpu.amlogic:fuchsia.hardware.gpu.amlogic_llcpp", |
| "//sdk/fidl/fuchsia.hardware.gpu.clock:fuchsia.hardware.gpu.clock_c", |
| "//sdk/fidl/fuchsia.hardware.registers:fuchsia.hardware.registers_llcpp", |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_c", |
| "//src/devices/bind/fuchsia.arm.platform:bind.fuchsia.arm.platform", |
| "//src/devices/bind/fuchsia.platform:bind.fuchsia.platform", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/bus/lib/device-protocol-platform-device", |
| "//src/devices/lib/amlogic", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/mmio", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/sync", |
| "//zircon/system/ulib/fidl-utils", |
| "//zircon/system/ulib/inspect", |
| "//zircon/system/ulib/trace:trace-driver", |
| ] |
| |
| # TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated. |
| # Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>). |
| # See linked bug for details. |
| configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ] |
| } |
| |
| driver_module("aml-gpu") { |
| deps = [ ":sources" ] |
| } |
| |
| executable("aml-gpu-test-bin") { |
| testonly = true |
| output_name = "aml-gpu-test" |
| sources = [ "aml-gpu-test.cc" ] |
| deps = [ |
| ":sources", |
| "//src/devices/registers/testing/mock-registers", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| |
| # TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated. |
| # Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>). |
| # See linked bug for details. |
| configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ] |
| } |
| |
| fuchsia_unittest_package("aml-gpu-test") { |
| deps = [ ":aml-gpu-test-bin" ] |
| } |