scvesactl.c (47676) | scvesactl.c (48104) |
---|---|
1/*- 2 * Copyright (c) 1998 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 1998 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * |
26 * $Id: scvesactl.c,v 1.9 1999/01/11 03:18:26 yokota Exp $ | 26 * $Id: scvesactl.c,v 1.10 1999/06/01 18:17:31 jlemon Exp $ |
27 */ 28 29#include "sc.h" 30#include "vga.h" 31#include "opt_syscons.h" 32#include "opt_vga.h" 33#include "opt_vesa.h" 34 --- 4 unchanged lines hidden (view full) --- 39#if (NSC > 0 && NVGA > 0 && defined(VESA)) || defined(KLD_MODULE) 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/conf.h> 44#include <sys/tty.h> 45#include <sys/kernel.h> 46 | 27 */ 28 29#include "sc.h" 30#include "vga.h" 31#include "opt_syscons.h" 32#include "opt_vga.h" 33#include "opt_vesa.h" 34 --- 4 unchanged lines hidden (view full) --- 39#if (NSC > 0 && NVGA > 0 && defined(VESA)) || defined(KLD_MODULE) 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/conf.h> 44#include <sys/tty.h> 45#include <sys/kernel.h> 46 |
47#include <machine/apm_bios.h> | |
48#include <machine/console.h> 49#include <machine/pc/vesa.h> 50 51#include <dev/fb/fbreg.h> 52#include <dev/syscons/syscons.h> 53 54static d_ioctl_t *prev_user_ioctl; 55 --- 10 unchanged lines hidden (view full) --- 66 scp = sc_get_scr_stat(tp->t_dev); 67 68 switch (cmd) { 69 70 /* generic text modes */ 71 case SW_TEXT_132x25: case SW_TEXT_132x30: 72 case SW_TEXT_132x43: case SW_TEXT_132x50: 73 case SW_TEXT_132x60: | 47#include <machine/console.h> 48#include <machine/pc/vesa.h> 49 50#include <dev/fb/fbreg.h> 51#include <dev/syscons/syscons.h> 52 53static d_ioctl_t *prev_user_ioctl; 54 --- 10 unchanged lines hidden (view full) --- 65 scp = sc_get_scr_stat(tp->t_dev); 66 67 switch (cmd) { 68 69 /* generic text modes */ 70 case SW_TEXT_132x25: case SW_TEXT_132x30: 71 case SW_TEXT_132x43: case SW_TEXT_132x50: 72 case SW_TEXT_132x60: |
74 if (!(scp->adp->va_flags & V_ADP_MODECHANGE)) | 73 if (!(scp->sc->adp->va_flags & V_ADP_MODECHANGE)) |
75 return ENODEV; 76 return sc_set_text_mode(scp, tp, cmd & 0xff, 0, 0, 0); 77 78 /* text modes */ 79 case SW_VESA_C80x60: 80 case SW_VESA_C132x25: 81 case SW_VESA_C132x43: 82 case SW_VESA_C132x50: 83 case SW_VESA_C132x60: | 74 return ENODEV; 75 return sc_set_text_mode(scp, tp, cmd & 0xff, 0, 0, 0); 76 77 /* text modes */ 78 case SW_VESA_C80x60: 79 case SW_VESA_C132x25: 80 case SW_VESA_C132x43: 81 case SW_VESA_C132x50: 82 case SW_VESA_C132x60: |
84 if (!(scp->adp->va_flags & V_ADP_MODECHANGE)) | 83 if (!(scp->sc->adp->va_flags & V_ADP_MODECHANGE)) |
85 return ENODEV; 86 mode = (cmd & 0xff) + M_VESA_BASE; 87 return sc_set_text_mode(scp, tp, mode, 0, 0, 0); 88 89 /* graphics modes */ 90 case SW_VESA_32K_320: case SW_VESA_64K_320: 91 case SW_VESA_FULL_320: 92 --- 9 unchanged lines hidden (view full) --- 102 103 case SW_VESA_1024x768: case SW_VESA_CG1024x768: 104 case SW_VESA_32K_1024: case SW_VESA_64K_1024: 105 case SW_VESA_FULL_1024: 106 107 case SW_VESA_1280x1024: case SW_VESA_CG1280x1024: 108 case SW_VESA_32K_1280: case SW_VESA_64K_1280: 109 case SW_VESA_FULL_1280: | 84 return ENODEV; 85 mode = (cmd & 0xff) + M_VESA_BASE; 86 return sc_set_text_mode(scp, tp, mode, 0, 0, 0); 87 88 /* graphics modes */ 89 case SW_VESA_32K_320: case SW_VESA_64K_320: 90 case SW_VESA_FULL_320: 91 --- 9 unchanged lines hidden (view full) --- 101 102 case SW_VESA_1024x768: case SW_VESA_CG1024x768: 103 case SW_VESA_32K_1024: case SW_VESA_64K_1024: 104 case SW_VESA_FULL_1024: 105 106 case SW_VESA_1280x1024: case SW_VESA_CG1280x1024: 107 case SW_VESA_32K_1280: case SW_VESA_64K_1280: 108 case SW_VESA_FULL_1280: |
110 if (!(scp->adp->va_flags & V_ADP_MODECHANGE)) | 109 if (!(scp->sc->adp->va_flags & V_ADP_MODECHANGE)) |
111 return ENODEV; 112 mode = (cmd & 0xff) + M_VESA_BASE; 113 return sc_set_graphics_mode(scp, tp, mode); 114 } 115 116 if (prev_user_ioctl) 117 return (*prev_user_ioctl)(dev, cmd, data, flag, p); 118 else --- 24 unchanged lines hidden --- | 110 return ENODEV; 111 mode = (cmd & 0xff) + M_VESA_BASE; 112 return sc_set_graphics_mode(scp, tp, mode); 113 } 114 115 if (prev_user_ioctl) 116 return (*prev_user_ioctl)(dev, cmd, data, flag, p); 117 else --- 24 unchanged lines hidden --- |