diff options
author | Tom Rini <trini@konsulko.com> | 2023-03-07 20:54:01 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-03-07 20:54:01 +0300 |
commit | 70ed05ce6c051e55e126e67e72ab20409134c953 (patch) | |
tree | c18e478b83cb9adcc703c060a89d6d00028f15fe /include/video_console.h | |
parent | 36bb622df5ba391271043416c234dd5544a0199f (diff) | |
parent | 72471620e82758b6cbdb9f70d775c0c18b043794 (diff) | |
download | u-boot-70ed05ce6c051e55e126e67e72ab20409134c953.tar.xz |
Merge tag 'next-20230307' of https://source.denx.de/u-boot/custodians/u-boot-video into next
- video console refactoring and optimization
- support for fonts wider than 1 byte
- use named header for 8x16 font data
- support multiple fonts configuration
- move get_font_size() to truetype driver ops
- support font size configuration at runtime
- add 16x32 Terminus font from linux
- add 12x22 Sun font from linux
- add 12x22 console simple font test
Diffstat (limited to 'include/video_console.h')
-rw-r--r-- | include/video_console.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/video_console.h b/include/video_console.h index 9d2c0f210e..770103284b 100644 --- a/include/video_console.h +++ b/include/video_console.h @@ -161,6 +161,15 @@ struct vidconsole_ops { struct vidfont_info *info); /** + * get_font_size() - get the current font name and size + * + * @dev: vidconsole device + * @sizep: Place to put the font size (nominal height in pixels) + * Returns: Current font name + */ + const char *(*get_font_size)(struct udevice *dev, uint *sizep); + + /** * select_font() - Select a particular font by name / size * * @dev: Device to adjust @@ -303,9 +312,10 @@ void vidconsole_list_fonts(struct udevice *dev); * * @dev: vidconsole device * @sizep: Place to put the font size (nominal height in pixels) - * Returns: Current font name + * @name: pointer to font name, a placeholder for result + * Return: 0 if OK, -ENOSYS if not implemented in driver */ -const char *vidconsole_get_font_size(struct udevice *dev, uint *sizep); +int vidconsole_get_font_size(struct udevice *dev, const char **name, uint *sizep); #ifdef CONFIG_VIDEO_COPY /** @@ -340,6 +350,9 @@ int vidconsole_sync_copy(struct udevice *dev, void *from, void *to); int vidconsole_memmove(struct udevice *dev, void *dst, const void *src, int size); #else + +#include <string.h> + static inline int vidconsole_sync_copy(struct udevice *dev, void *from, void *to) { |