From 6246c32f6a4bb5fa495a77c35725faf142401154 Mon Sep 17 00:00:00 2001 From: yokota Date: Thu, 2 Sep 1999 08:08:49 +0000 Subject: Do not call the VESA BIOS if the current video mode is not one of the VESA modes. --- sys/i386/isa/vesa.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sys/i386') diff --git a/sys/i386/isa/vesa.c b/sys/i386/isa/vesa.c index 1015471..a209251 100644 --- a/sys/i386/isa/vesa.c +++ b/sys/i386/isa/vesa.c @@ -1397,9 +1397,13 @@ vesa_ioctl(video_adapter_t *adp, u_long cmd, caddr_t arg) switch (cmd) { case FBIO_SETWINORG: /* set frame buffer window origin */ + if (!VESA_MODE(adp->va_mode)) + return (*prevvidsw->ioctl)(adp, cmd, arg); return (vesa_set_origin(adp, *(off_t *)arg) ? ENODEV : 0); case FBIO_SETDISPSTART: /* set display start address */ + if (!VESA_MODE(adp->va_mode)) + return (*prevvidsw->ioctl)(adp, cmd, arg); if (vesa_bios_set_start(((video_display_start_t *)arg)->x, ((video_display_start_t *)arg)->y)) return ENODEV; @@ -1408,6 +1412,8 @@ vesa_ioctl(video_adapter_t *adp, u_long cmd, caddr_t arg) return 0; case FBIO_SETLINEWIDTH: /* set line length in pixel */ + if (!VESA_MODE(adp->va_mode)) + return (*prevvidsw->ioctl)(adp, cmd, arg); if (vesa_bios_set_line_length(*(u_int *)arg, &bytes, NULL)) return ENODEV; adp->va_line_width = bytes; -- cgit v1.1