| # 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.gni") |
| import("//src/sys/build/components.gni") |
| |
| bind_rules("intel-i915-bind") { |
| rules = "intel-i915.bind" |
| output = "intel-i915-bind.h" |
| tests = "bind_tests.json" |
| deps = [ "//src/devices/bind/fuchsia.pci" ] |
| } |
| |
| source_set("common_srcs") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ |
| "display-device.cc", |
| "dp-display.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", |
| "//sdk/banjo/fuchsia.hardware.i2cimpl", |
| "//sdk/banjo/fuchsia.hardware.intelgpucore", |
| "//sdk/banjo/fuchsia.hardware.pci", |
| "//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_c", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/mmio", |
| "//src/devices/pci/lib/device-protocol-pci", |
| "//src/devices/pci/lib/pci", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/hwreg", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/edid", |
| "//zircon/system/ulib/image-format", |
| "//zircon/system/ulib/region-alloc", |
| ] |
| } |
| |
| driver_module("intel-i915") { |
| deps = [ ":common_srcs" ] |
| } |
| |
| test("intel-i915-test") { |
| configs += [ |
| "//build/unification/config:zircon-migrated", |
| "//build/config:all_source", |
| ] |
| sources = [ |
| "intel-i915-test-interrupts.cc", |
| "intel-i915-test.cc", |
| ] |
| deps = [ |
| ":common_srcs", |
| "//src/devices/pci/testing:pci-protocol-fake", |
| "//src/devices/sysmem/testing/mock-sysmem", |
| "//src/devices/testing/fake_ddk", |
| "//zircon/public/lib/zxtest", |
| "//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(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" ] |
| } |