video_osd-uclass.c 1.1 KB

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