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