blob: 0d776e93a969e2dfea4d899899e1b46d4a9c76e1 [file] [log] [blame]
# Copyright 2018 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("//src/graphics/lib/magma/gnbuild/magma.gni")
declare_args() {
# Enable suspend.
# This will stop the ring buffer and suspend the clks when there are no
# submitted commands.
msd_vsi_vip_enable_suspend = true
}
config("msd_vsi_vip_config") {
defines = []
if (msd_vsi_vip_enable_suspend) {
defines += [ "MSD_VSI_VIP_ENABLE_SUSPEND" ]
}
}
fuchsia_driver_package("msd-vsi-vip") {
driver_components = [ ":msd_vsi" ]
}
fuchsia_driver_package("msd-vsi-vip-test") {
testonly = true
driver_components = [
":msd_vsi_test",
"//src/graphics/lib/magma/tests/unit_tests:test_firmware",
]
}
fuchsia_driver("msd_vsi-driver") {
output_name = "libmsd_vsi"
deps = [
":msd_vsi_entry",
"$magma_build_root/src/magma_util/platform:logger_for_system_drivers",
"src",
]
}
fuchsia_driver_component("msd_vsi") {
info = "msd_vsi-info.json"
component_name = "libmsd_vsi"
deps = [ ":msd_vsi-driver" ]
colocate = true
root_resource = true
uses_profiles = true
}
fuchsia_driver("msd_vsi_test-driver") {
testonly = true
output_name = "libmsd_vsi_test"
deps = [
":msd_vsi_test_entry",
"$magma_build_root/src/magma_util/platform:logger_for_system_drivers",
"src",
]
}
fuchsia_driver_component("msd_vsi_test") {
info = "msd_vsi_test-info.json"
testonly = true
component_name = "libmsd_vsi_test"
deps = [ ":msd_vsi_test-driver" ]
colocate = true
}
driver_bind_rules("msd_vsi_bind") {
rules = "msd_vsi.bind"
header_output = "bind.h"
tests = "tests/bind_tests.json"
deps = [
"//src/devices/bind/fuchsia.platform",
"//src/devices/bind/fuchsia.verisilicon.platform",
]
}
driver_bind_rules("msd_vsi_test_bind") {
rules = "msd_vsi.bind"
header_output = "test_bind.h"
disable_autobind = true
deps = [
"//src/devices/bind/fuchsia.platform",
"//src/devices/bind/fuchsia.verisilicon.platform",
]
}
magma_pdev_entry("msd_vsi_entry") {
deps = [ ":msd_vsi_bind" ]
}
magma_pdev_entry("msd_vsi_test_entry") {
test_entry = true
deps = [
":msd_vsi_test_bind",
"tests/unit_tests:hardware_tests",
"//src/graphics/lib/magma/tests/unit_tests:magma_platform_hardware_tests",
"//src/graphics/lib/magma/tests/unit_tests:msd_conformance_tests",
]
}
group("tests") {
testonly = true
deps = [ ":msd_vsi_bind_test" ]
}
group("test-driver") {
testonly = true
public_deps = [ ":msd-vsi-vip-test" ]
}