blob: 6187977d33db0106d94e2b0e2a4fbc0beef6cc12 [file] [log] [blame]
# Copyright 2021 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")
import("//build/test.gni")
driver_bind_rules("aml_hdmi_bind") {
rules = "aml-hdmi.bind"
header_output = "aml-hdmi-bind.h"
tests = "bind_tests.json"
deps = [
"//src/devices/bind/fuchsia.amlogic.platform",
"//src/devices/bind/fuchsia.platform",
]
}
source_set("common_srcs") {
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
public_deps = [
":aml_hdmi_bind",
"//sdk/banjo/fuchsia.hardware.display.controller:fuchsia.hardware.display.controller_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.hdmi:fuchsia.hardware.hdmi_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.i2cimpl:fuchsia.hardware.i2cimpl_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.hdmi:fuchsia.hardware.hdmi_cpp_wire",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/lib/driver",
"//src/devices/lib/mmio",
"//src/graphics/display/lib/designware:hdmi-dw",
"//src/graphics/display/lib/hdmi",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/fidl-async:fidl-async-cpp",
"//zircon/system/ulib/zircon-internal",
]
}
fuchsia_driver("aml-hdmi-driver") {
output_name = "aml-hdmi"
sources = [ "aml-hdmi.cc" ]
deps = [ ":common_srcs" ]
# TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
fuchsia_driver_component("aml-hdmi") {
component_name = "aml-hdmi"
deps = [ ":aml-hdmi-driver" ]
info = "aml-hdmi-info.json"
colocate = true
}
test("aml-hdmi-test-bin") {
output_name = "aml-hdmi-test"
sources = [
"aml-hdmi-test.cc",
"aml-hdmi.cc",
]
deps = [
":common_srcs",
"//src/devices/testing/fake_ddk",
"//src/devices/testing/mock-mmio-reg",
"//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/94768): This target uses mutable tables which are deprecated,
# rather than builders.
configs += [ "//build/cpp:fidl-wire-deprecated-mutable-tables" ]
}
fuchsia_unittest_package("aml-hdmi-test") {
deps = [ ":aml-hdmi-test-bin" ]
test_specs = {
environments = basic_envs
}
}
group("tests") {
testonly = true
deps = [
":aml-hdmi-test",
":aml_hdmi_bind_test",
]
}