diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2024-02-12 12:06:09 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-08-11 13:47:15 +0300 |
commit | 5b4d995dfdd0d5823c302b43c9d78750889d69ce (patch) | |
tree | bfb17947a3fffa74fe073cf9d62be6a73423f235 /drivers/video/console | |
parent | bab0a828543a315143cf84ab1f7fc5002aa28043 (diff) | |
download | linux-5b4d995dfdd0d5823c302b43c9d78750889d69ce.tar.xz |
video: Add helpers for decoding screen_info
[ Upstream commit 75fa9b7e375e35739663cde0252d31e586c6314a ]
The plain values as stored in struct screen_info need to be decoded
before being used. Add helpers that decode the type of video output
and the framebuffer I/O aperture.
Old or non-x86 systems may not set the type of video directly, but
only indicate the presence by storing 0x01 in orig_video_isVGA. The
decoding logic in screen_info_video_type() takes this into account.
It then follows similar code in vgacon's vgacon_startup() to detect
the video type from the given values.
A call to screen_info_resources() returns all known resources of the
given screen_info. The resources' values have been taken from existing
code in vgacon and vga16fb. These drivers can later be converted to
use the new interfaces.
v2:
* return ssize_t from screen_info_resources()
* don't call __screen_info_has_lfb() unnecessarily
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240212090736.11464-2-tzimmermann@suse.de
Stable-dep-of: c2bc958b2b03 ("fbdev: vesafb: Detect VGA compatibility from screen info's VESA attributes")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/video/console')
0 files changed, 0 insertions, 0 deletions