aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2021-12-01 15:13:09 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2021-12-06 10:28:03 +0000
commitca23e9d2ac2cd5443ab7d5b8999da11feddf828a (patch)
treedf9b2154e80249c299481966be54b2cb988f2f6f
parent706f32db8aec5d1e9e6f9210fab7be6f13ac25c3 (diff)
downloadsrc-ca23e9d2ac2cd5443ab7d5b8999da11feddf828a.tar.gz
src-ca23e9d2ac2cd5443ab7d5b8999da11feddf828a.zip
fb: Add new FBTYPE_EFIFB
Currently the type isn't set in the fbtype struct so any userland program that call the FBIOGTYPE ioctl will think it's a FBTYPE_SUN1BW which is far from the truth. No app that I found find checks the type but at least now it's correct. Reviewed by: emaste, tsoome MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33221
-rw-r--r--sys/dev/vt/hw/efifb/efifb.c1
-rw-r--r--sys/sys/fbio.h4
2 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/vt/hw/efifb/efifb.c b/sys/dev/vt/hw/efifb/efifb.c
index de361ea45b97..fd78e53bbaf7 100644
--- a/sys/dev/vt/hw/efifb/efifb.c
+++ b/sys/dev/vt/hw/efifb/efifb.c
@@ -117,6 +117,7 @@ vt_efifb_init(struct vt_device *vd)
if (efifb == NULL)
return (CN_DEAD);
+ info->fb_type = FBTYPE_EFIFB;
info->fb_height = efifb->fb_height;
info->fb_width = efifb->fb_width;
diff --git a/sys/sys/fbio.h b/sys/sys/fbio.h
index 38b544801573..194e08bbfb95 100644
--- a/sys/sys/fbio.h
+++ b/sys/sys/fbio.h
@@ -91,7 +91,9 @@
#define FBTYPE_TCXCOLOR 29 /* SUNW,tcx */
#define FBTYPE_CREATOR 30
-#define FBTYPE_LASTPLUSONE 31 /* max number of fbs (change as add) */
+#define FBTYPE_EFIFB 31 /* EFI Graphical Output Protocol (GOP) */
+
+#define FBTYPE_LASTPLUSONE 32 /* max number of fbs (change as add) */
/*
* Frame buffer descriptor as returned by FBIOGTYPE.