blob: 59cf56dbb3acb2cb1ec47e9a4a525710b92c1186 [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/components.gni")
import("//build/drivers.gni")
import("//build/test.gni")
driver_bind_rules("intel-i915-bind") {
rules = "intel-i915.bind"
header_output = "intel-i915-bind.h"
tests = "bind_tests.json"
deps = [
"//src/devices/bind/fuchsia.driver.framework",
"//src/devices/bind/fuchsia.pci",
]
}
source_set("common_srcs") {
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
sources = [
"ddi.cc",
"display-device.cc",
"dp-display.cc",
"dpll.cc",
"gtt.cc",
"hdmi-display.cc",
"igd.cc",
"intel-i915.cc",
"interrupts.cc",
"pipe.cc",
"power.cc",
]
public_deps = [
":intel-i915-bind",
"//sdk/banjo/fuchsia.hardware.display.controller:fuchsia.hardware.display.controller_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.i2cimpl:fuchsia.hardware.i2cimpl_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.intelgpucore:fuchsia.hardware.intelgpucore_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.sysmem:fuchsia.hardware.sysmem_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.backlight:fuchsia.hardware.backlight_llcpp",
"//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_llcpp",
"//src/devices/lib/driver",
"//src/devices/lib/mmio",
"//src/devices/pci/lib/device-protocol-pci",
"//src/devices/pci/lib/fuchsia.hardware.pci:fuchsia.hardware.pci_banjo_cpp",
"//src/devices/pci/lib/pci",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/edid",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/hwreg",
"//zircon/system/ulib/image-format",
"//zircon/system/ulib/inspect",
"//zircon/system/ulib/region-alloc",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
]
# 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_driver("intel-i915-driver") {
output_name = "intel-i915"
deps = [ ":common_srcs" ]
}
fuchsia_driver_component("intel-i915") {
component_name = "intel-i915"
deps = [ ":intel-i915-driver" ]
info = "intel-i915-info.json"
colocate = true
root_resource = true
uses_profiles = true
uses_sysmem = true
}
test("intel-i915-test") {
configs += [ "//build/config:all_source" ]
sources = [
"dp-capabilities-unittest.cc",
"dp-display-unittest.cc",
"fake-dpcd-channel.cc",
"fake-dpcd-channel.h",
"gtt-unittest.cc",
"intel-i915-test.cc",
"interrupts-unittest.cc",
"pipe-unittest.cc",
"power-unittest.cc",
]
deps = [
":common_srcs",
"//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_llcpp_testing",
"//src/devices/pci/testing:pci-protocol-fake",
"//src/devices/testing/fake-mmio-reg",
"//src/devices/testing/mock-ddk",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fidl-async:fidl-async-cpp",
"//zircon/system/ulib/mmio-ptr:mmio-ptr-fake",
]
# TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
# 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" ]
}
group("tests") {
testonly = true
deps = [
":intel-i915-bind_test",
":intel-i915-test-package",
]
}
fuchsia_unittest_package("intel-i915-test-package") {
package_name = "intel-i915-test"
deps = [ ":intel-i915-test" ]
}