video_osd-uclass.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * (C) Copyright 2017
  4. * Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
  5. */
  6. #include <common.h>
  7. #include <dm.h>
  8. #include <video_osd.h>
  9. int video_osd_get_info(struct udevice *dev, struct video_osd_info *info)
  10. {
  11. struct video_osd_ops *ops = video_osd_get_ops(dev);
  12. return ops->get_info(dev, info);
  13. }
  14. int video_osd_set_mem(struct udevice *dev, uint col, uint row, u8 *buf,
  15. size_t buflen, uint count)
  16. {
  17. struct video_osd_ops *ops = video_osd_get_ops(dev);
  18. return ops->set_mem(dev, col, row, buf, buflen, count);
  19. }
  20. int video_osd_set_size(struct udevice *dev, uint col, uint row)
  21. {
  22. struct video_osd_ops *ops = video_osd_get_ops(dev);
  23. return ops->set_size(dev, col, row);
  24. }
  25. int video_osd_print(struct udevice *dev, uint col, uint row, ulong color,
  26. char *text)
  27. {
  28. struct video_osd_ops *ops = video_osd_get_ops(dev);
  29. return ops->print(dev, col, row, color, text);
  30. }
  31. UCLASS_DRIVER(video_osd) = {
  32. .id = UCLASS_VIDEO_OSD,
  33. .name = "video_osd",
  34. .flags = DM_UC_FLAG_SEQ_ALIAS,
  35. };