summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/scvesactl.c
diff options
context:
space:
mode:
authoryokota <yokota@FreeBSD.org>1998-09-23 09:59:00 +0000
committeryokota <yokota@FreeBSD.org>1998-09-23 09:59:00 +0000
commitb326a281a93fffb9bf6a92d3a17a0c1f663fbd32 (patch)
tree19f14876b77bda581eefefa9fd47cfc71ede7f4b /sys/dev/syscons/scvesactl.c
parent0929d70022b41699c512bc1265bd081a55757848 (diff)
downloadFreeBSD-src-b326a281a93fffb9bf6a92d3a17a0c1f663fbd32.zip
FreeBSD-src-b326a281a93fffb9bf6a92d3a17a0c1f663fbd32.tar.gz
Fix and update for VESA BIOS support in syscons.
- Handle pixel (raster text) mode properly. - Clear screen and paint border right. - Paint text attribute (colors). - Fix off-by-one errors. - Add some sanity checks. - Fix some function prototypes. - Add some comment lines. - Define generic text mode numbers so that the user can just give "80x25", "80x60", "132x25"..., rather than "VGA_xxx", to `vidcontrol' to change the current video mode. `vidoio.c' and `vesa.c' will map these numbers to real video mode numbers appropriate and available with the given video hardware. I believe this will be useful to make syscons more portable across archtectures.
Diffstat (limited to 'sys/dev/syscons/scvesactl.c')
-rw-r--r--sys/dev/syscons/scvesactl.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/dev/syscons/scvesactl.c b/sys/dev/syscons/scvesactl.c
index 9678177..5896e24 100644
--- a/sys/dev/syscons/scvesactl.c
+++ b/sys/dev/syscons/scvesactl.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: scvesactl.c,v 1.1 1998/09/15 18:16:37 sos Exp $
*/
#include "sc.h"
@@ -50,7 +50,11 @@
static int (*prev_user_ioctl)(dev_t dev, int cmd, caddr_t data, int flag,
struct proc *p);
-extern struct tty *scdevtotty(dev_t dev);
+/* external functions */
+struct tty *scdevtotty(dev_t dev);
+
+/* functions in this module */
+int vesa_ioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p);
int
vesa_ioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
@@ -79,6 +83,15 @@ vesa_ioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
else
goto vesa_text;
+ /* generic text modes */
+ case SW_TEXT_132x25: case SW_TEXT_132x30:
+ case SW_TEXT_132x43: case SW_TEXT_132x50:
+ case SW_TEXT_132x60:
+ adp = get_adapter(scp);
+ if (!(adp->va_flags & V_ADP_MODECHANGE))
+ return ENODEV;
+ return sc_set_text_mode(scp, tp, cmd & 0xff, 0, 0, 0);
+
/* text modes */
case SW_VESA_C80x60:
case SW_VESA_C132x25:
OpenPOWER on IntegriCloud