[PATCH] Add VIDEO_TYPE_LINEAR

From: Gerd Hoffmann
Date: Tue Sep 09 2014 - 02:10:09 EST


Add VIDEO_TYPE_LINEAR for a simple linear framebuffer,
initialized by the firmware (for example coreboot).

Needs CONFIG_X86_SYSFB=y and CONFIG_FB_SIMPLE=y to work.

Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxxxxx>
---
arch/x86/kernel/sysfb_simplefb.c | 4 +++-
include/uapi/linux/screen_info.h | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/sysfb_simplefb.c b/arch/x86/kernel/sysfb_simplefb.c
index 86179d4..0742c82 100644
--- a/arch/x86/kernel/sysfb_simplefb.c
+++ b/arch/x86/kernel/sysfb_simplefb.c
@@ -36,7 +36,9 @@ __init bool parse_mode(const struct screen_info *si,
unsigned int i;

type = si->orig_video_isVGA;
- if (type != VIDEO_TYPE_VLFB && type != VIDEO_TYPE_EFI)
+ if (type != VIDEO_TYPE_VLFB &&
+ type != VIDEO_TYPE_EFI &&
+ type != VIDEO_TYPE_LINEAR)
return false;

for (i = 0; i < ARRAY_SIZE(formats); ++i) {
diff --git a/include/uapi/linux/screen_info.h b/include/uapi/linux/screen_info.h
index 7530e74..d27126d 100644
--- a/include/uapi/linux/screen_info.h
+++ b/include/uapi/linux/screen_info.h
@@ -66,6 +66,8 @@ struct screen_info {

#define VIDEO_TYPE_EFI 0x70 /* EFI graphic mode */

+#define VIDEO_TYPE_LINEAR 0x80 /* simple linear framebuffer */
+
#define VIDEO_FLAGS_NOCURSOR (1 << 0) /* The video mode has no cursor set */

#define VIDEO_CAPABILITY_SKIP_QUIRKS (1 << 0)
--
1.8.3.1


--=-hMOnEh5SBrPpicfp0eCC--

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/