simplefb_common.c 671 B

1234567891011121314151617181920212223242526
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Common code for Amlogic SimpleFB with pipeline.
  4. *
  5. * (C) Copyright 2013-2014 Luc Verhaegen <libv@skynet.be>
  6. * (C) Copyright 2014-2015 Hans de Goede <hdegoede@redhat.com>
  7. * (C) Copyright 2017 Icenowy Zheng <icenowy@aosc.io>
  8. */
  9. #include <fdt_support.h>
  10. int meson_simplefb_fdt_match(void *blob, const char *pipeline)
  11. {
  12. int offset, ret;
  13. /* Find a prefilled simpefb node, matching out pipeline config */
  14. fdt_for_each_node_by_compatible(offset, blob, -1,
  15. "amlogic,simple-framebuffer") {
  16. ret = fdt_stringlist_search(blob, offset, "amlogic,pipeline",
  17. pipeline);
  18. if (ret == 0)
  19. break;
  20. }
  21. return offset;
  22. }