blob: 923686345ff7d36eac54d5417258af63cf8e09af [file] [log] [blame]
Mario Six1b773202018-09-27 09:19:29 +02001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * (C) Copyright 2017
4 * Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
5 */
6
Patrick Delaunay81313352021-04-27 11:02:19 +02007#define LOG_CATEGORY UCLASS_VIDEO_OSD
8
Mario Six1b773202018-09-27 09:19:29 +02009#include <dm.h>
10#include <video_osd.h>
11
12int 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
19int 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
27int 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
34int 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
42UCLASS_DRIVER(video_osd) = {
43 .id = UCLASS_VIDEO_OSD,
44 .name = "video_osd",
45 .flags = DM_UC_FLAG_SEQ_ALIAS,
46};