blob: 6135dbe6b5c8f79ba8c4a4e0fc5ebcf4b33f2dd6 [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.gni")
import("//src/sys/build/components.gni")
bind_rules("mt8167s-display-bind") {
rules = "mt8167s-display.bind"
output = "mt8167s-display-bind.h"
tests = "bind-tests.json"
deps = [ "//src/devices/bind/fuchsia.mediatek.platform" ]
}
driver_module("mt8167s-display") {
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
configs += [ "//build/unification/config:zircon-migrated" ]
sources = [
"aal.cc",
"ccorr.cc",
"color.cc",
"disp-rdma.cc",
"dither.cc",
"gamma.cc",
"lcd.cc",
"mt-dsi-host.cc",
"mt-sysconfig.cc",
"mt8167s-display.cc",
"ovl.cc",
]
deps = [ ":common" ]
# 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" ]
}
source_set("common") {
visibility = [ ":*" ]
sources = []
public_deps = [
":mt8167s-display-bind",
"//sdk/banjo/fuchsia.hardware.display.controller",
"//sdk/banjo/fuchsia.hardware.dsiimpl",
"//sdk/banjo/fuchsia.hardware.gpio:fuchsia.hardware.gpio_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.platform.device:fuchsia.hardware.platform.device_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.power",
"//sdk/banjo/fuchsia.hardware.sysmem:fuchsia.hardware.sysmem_banjo_cpp",
"//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_llcpp",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/bus/lib/device-protocol-platform-device",
"//src/devices/lib/driver",
"//src/devices/lib/mmio",
"//src/graphics/display/lib/device-protocol-display",
"//src/lib/ddk",
"//src/lib/ddk:ddk-metadata-headers",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/hwreg",
"//zircon/public/lib/zircon-internal",
"//zircon/public/lib/zx",
"//zircon/system/ulib/image-format",
"//zircon/system/ulib/image-format:image-format-llcpp",
"//zircon/system/ulib/mipi-dsi",
]
}
test("dsi-host") {
configs += [
"//build/unification/config:zircon-migrated",
"//build/config:all_source",
]
sources = [
"aal.cc",
"ccorr.cc",
"color.cc",
"disp-rdma.cc",
"dither.cc",
"gamma.cc",
"lcd.cc",
"mt-dsi-host.cc",
"mt-sysconfig.cc",
"mt8167s-display-test.cc",
"mt8167s-display.cc",
"ovl.cc",
]
deps = [
":common",
"//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_llcpp",
"//src/devices/sysmem/testing/mock-sysmem",
"//src/devices/testing/fake-bti",
"//src/devices/testing/mock-mmio-reg",
"//src/devices/testing/no_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/image-format:image-format-llcpp",
]
# 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 = [
":dsi-host-package",
":mt8167s-display-bind_test",
]
}
fuchsia_unittest_package("dsi-host-package") {
package_name = "dsi-host"
deps = [ ":dsi-host" ]
}