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 | |
Tom Rini | abb9a04 | 2024-05-18 20:20:43 -0600 | [diff] [blame] | 9 | #include <common.h> |
Mario Six | 1b77320 | 2018-09-27 09:19:29 +0200 | [diff] [blame] | 10 | #include <dm.h> |
| 11 | #include <video_osd.h> |
| 12 | |
| 13 | int video_osd_get_info(struct udevice *dev, struct video_osd_info *info) |
| 14 | { |
| 15 | struct video_osd_ops *ops = video_osd_get_ops(dev); |
| 16 | |
| 17 | return ops->get_info(dev, info); |
| 18 | } |
| 19 | |
| 20 | int video_osd_set_mem(struct udevice *dev, uint col, uint row, u8 *buf, |
| 21 | size_t buflen, uint count) |
| 22 | { |
| 23 | struct video_osd_ops *ops = video_osd_get_ops(dev); |
| 24 | |
| 25 | return ops->set_mem(dev, col, row, buf, buflen, count); |
| 26 | } |
| 27 | |
| 28 | int video_osd_set_size(struct udevice *dev, uint col, uint row) |
| 29 | { |
| 30 | struct video_osd_ops *ops = video_osd_get_ops(dev); |
| 31 | |
| 32 | return ops->set_size(dev, col, row); |
| 33 | } |
| 34 | |
| 35 | int video_osd_print(struct udevice *dev, uint col, uint row, ulong color, |
| 36 | char *text) |
| 37 | { |
| 38 | struct video_osd_ops *ops = video_osd_get_ops(dev); |
| 39 | |
| 40 | return ops->print(dev, col, row, color, text); |
| 41 | } |
| 42 | |
| 43 | UCLASS_DRIVER(video_osd) = { |
| 44 | .id = UCLASS_VIDEO_OSD, |
| 45 | .name = "video_osd", |
| 46 | .flags = DM_UC_FLAG_SEQ_ALIAS, |
| 47 | }; |