summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons
diff options
context:
space:
mode:
authoryokota <yokota@FreeBSD.org>1998-10-01 11:39:18 +0000
committeryokota <yokota@FreeBSD.org>1998-10-01 11:39:18 +0000
commit3d34bf047babbcd0a199d4a7bc2464a62066bc78 (patch)
treef7fcb33db5f1af78f7a852d912e39a8b0ff77fd5 /sys/dev/syscons
parent5b11e527361dc6279982c78cd72f2438aad9696e (diff)
downloadFreeBSD-src-3d34bf047babbcd0a199d4a7bc2464a62066bc78.zip
FreeBSD-src-3d34bf047babbcd0a199d4a7bc2464a62066bc78.tar.gz
Yet another round of fixes for the VESA support code.
- Express various sizes in bytes, rather than Kbytes, in the video mode and adapter information structures. - Fill 0 in the linear buffer size field if the linear frame buffer is not available. - Remove SW_VESA_USER ioctl. It is still experimetal and was not meant to be released. - Fix missing cast operator. - Correctly handle pointers returned by the VESA BIOS. The pointers may point to the area either in the BIOS ROM or in the buffer supplied by the caller. - Set the destructive cursor at the right moment.
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r--sys/dev/syscons/scvesactl.c11
-rw-r--r--sys/dev/syscons/scvidctl.c9
-rw-r--r--sys/dev/syscons/syscons.c7
-rw-r--r--sys/dev/syscons/syscons.h3
4 files changed, 9 insertions, 21 deletions
diff --git a/sys/dev/syscons/scvesactl.c b/sys/dev/syscons/scvesactl.c
index 47b1862..aabfe19 100644
--- a/sys/dev/syscons/scvesactl.c
+++ b/sys/dev/syscons/scvesactl.c
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: scvesactl.c,v 1.4 1998/09/26 03:34:10 yokota Exp $
+ * $Id: scvesactl.c,v 1.5 1998/09/26 03:38:40 yokota Exp $
*/
#include "sc.h"
@@ -64,15 +64,6 @@ vesa_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
scp = sc_get_scr_stat(tp->t_dev);
switch (cmd) {
- case SW_VESA_USER:
-
- mode = (int)data;
- if ((*biosvidsw.get_info)(scp->adp, mode, &info))
- return ENODEV;
- if (info.vi_flags & V_INFO_GRAPHICS)
- goto vesa_graphics;
- else
- goto vesa_text;
/* generic text modes */
case SW_TEXT_132x25: case SW_TEXT_132x30:
diff --git a/sys/dev/syscons/scvidctl.c b/sys/dev/syscons/scvidctl.c
index e29c209..065dee2 100644
--- a/sys/dev/syscons/scvidctl.c
+++ b/sys/dev/syscons/scvidctl.c
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: scvidctl.c,v 1.3 1998/09/25 11:55:46 yokota Exp $
+ * $Id: scvidctl.c,v 1.4 1998/09/29 02:00:56 ache Exp $
*/
#include "sc.h"
@@ -49,7 +49,6 @@ extern scr_stat *cur_console;
extern int fonts_loaded;
extern int sc_history_size;
extern u_char palette[];
-extern int sc_flags;
int
sc_set_text_mode(scr_stat *scp, struct tty *tp, int mode, int xsize, int ysize,
@@ -122,8 +121,6 @@ sc_set_text_mode(scr_stat *scp, struct tty *tp, int mode, int xsize, int ysize,
if (scp == cur_console)
set_mode(scp);
scp->status &= ~UNKNOWN_MODE;
- if (ISTEXTSC(scp) && (sc_flags & CHAR_CURSOR))
- set_destructive_cursor(scp);
if (tp == NULL)
return 0;
@@ -251,7 +248,7 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, int xsize, int ysize,
* memory size is larger than 64K. Because such modes require
* bank switching to access the entire screen. XXX
*/
- if (info.vi_width*info.vi_height/8 > info.vi_window_size*1024)
+ if (info.vi_width*info.vi_height/8 > info.vi_window_size)
return ENODEV;
/* stop screen saver, etc */
@@ -383,7 +380,7 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p)
return sc_set_graphics_mode(scp, tp, cmd & 0xff);
case KDSETMODE: /* set current mode of this (virtual) console */
- switch (*data) {
+ switch (*(int *)data) {
case KD_TEXT: /* switch to TEXT (known) mode */
/*
* If scp->mode is of graphics modes, we don't know which
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 095bbbd..479b544 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.281 1998/09/26 03:38:38 yokota Exp $
+ * $Id: syscons.c,v 1.282 1998/09/29 02:00:56 ache Exp $
*/
#include "sc.h"
@@ -4068,7 +4068,7 @@ copy_font(scr_stat *scp, int operation, int font_size, u_char *buf)
font_loading_in_progress = FALSE;
}
-void
+static void
set_destructive_cursor(scr_stat *scp)
{
u_char cursor[32];
@@ -4076,7 +4076,8 @@ set_destructive_cursor(scr_stat *scp)
int font_size;
int i;
- if (!ISFONTAVAIL(get_adapter(scp)->va_flags) || !ISTEXTSC(scp))
+ if (!ISFONTAVAIL(get_adapter(scp)->va_flags)
+ || (scp->status & (GRAPHICS_MODE | PIXEL_MODE)))
return;
if (scp->font_size < 14) {
diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h
index 7c263f6..0298cbb 100644
--- a/sys/dev/syscons/syscons.h
+++ b/sys/dev/syscons/syscons.h
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.h,v 1.42 1998/09/26 03:34:10 yokota Exp $
+ * $Id: syscons.h,v 1.43 1998/09/29 02:00:57 ache Exp $
*/
#ifndef _I386_ISA_SYSCONS_H_
@@ -219,7 +219,6 @@ int add_scrn_saver(void (*this)(int));
int remove_scrn_saver(void (*this)(int));
void sc_clear_screen(scr_stat *scp);
-void set_destructive_cursor(scr_stat *scp);
void sc_move_mouse(scr_stat *scp, int x, int y);
int sc_clean_up(scr_stat *scp);
void sc_alloc_scr_buffer(scr_stat *scp, int wait, int clear);
OpenPOWER on IntegriCloud