blob: e8daf30c1d1f2411f8588142bc57611419563d2a [file] [log] [blame]
# 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("//build/test/test_package.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",
"//src/devices/bind/fuchsia.composite",
]
}
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",
"//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.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/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",
]
}
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",
]
}
test_package("aml-gpu-test") {
deps = [ ":aml-gpu-test-bin" ]
tests = [
{
name = "aml-gpu-test"
},
]
}