fb.c (42421) | fb.c (42564) |
---|---|
1/*- 2 * Copyright (c) 1999 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 --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 1999 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 --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $Id: $ | 28 * $Id: fb.c,v 1.1 1999/01/09 02:44:49 yokota Exp $ |
29 */ 30 31#include "fb.h" 32#include "opt_fb.h" 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/conf.h> --- 6 unchanged lines hidden (view full) --- 43 44/* local arrays */ 45 46/* 47 * We need at least one entry each in order to initialize a video card 48 * for the kernel console. The arrays will be increased dynamically 49 * when necessary. 50 */ | 29 */ 30 31#include "fb.h" 32#include "opt_fb.h" 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/conf.h> --- 6 unchanged lines hidden (view full) --- 43 44/* local arrays */ 45 46/* 47 * We need at least one entry each in order to initialize a video card 48 * for the kernel console. The arrays will be increased dynamically 49 * when necessary. 50 */ |
51static video_adapter_t *adp_ini; 52static video_switch_t *vidsw_ini; 53static struct cdevsw *vidcdevsw_ini; | |
54 | 51 |
55static video_adapter_t **adapter = &adp_ini; | |
56static int adapters = 1; | 52static int adapters = 1; |
53static video_adapter_t *adp_ini; 54static video_adapter_t **adapter = &adp_ini; 55static video_switch_t *vidsw_ini; |
|
57 video_switch_t **vidsw = &vidsw_ini; | 56 video_switch_t **vidsw = &vidsw_ini; |
58static struct cdevsw **vidcdevsw = &vidcdevsw_ini; | |
59 | 57 |
58#ifdef FB_INSTALL_CDEV 59 |
|
60#define ARRAY_DELTA 4 61 | 60#define ARRAY_DELTA 4 61 |
62static struct cdevsw *vidcdevsw_ini; 63static struct cdevsw **vidcdevsw = &vidcdevsw_ini; 64 |
|
62static void 63vid_realloc_array(void) 64{ 65 video_adapter_t **new_adp; 66 video_switch_t **new_vidsw; 67 struct cdevsw **new_cdevsw; 68 int newsize; 69 int s; --- 19 unchanged lines hidden (view full) --- 89 vidcdevsw = new_cdevsw; 90 adapters = newsize; 91 splx(s); 92 93 if (bootverbose) 94 printf("fb: new array size %d\n", adapters); 95} 96 | 65static void 66vid_realloc_array(void) 67{ 68 video_adapter_t **new_adp; 69 video_switch_t **new_vidsw; 70 struct cdevsw **new_cdevsw; 71 int newsize; 72 int s; --- 19 unchanged lines hidden (view full) --- 92 vidcdevsw = new_cdevsw; 93 adapters = newsize; 94 splx(s); 95 96 if (bootverbose) 97 printf("fb: new array size %d\n", adapters); 98} 99 |
100#endif /* FB_INSTALL_CDEV */ 101 |
|
97/* 98 * Low-level frame buffer driver functions 99 * frame buffer subdrivers, such as the VGA driver, call these functions 100 * to initialize the video_adapter structure and register it to the virtual 101 * frame buffer driver `fb'. 102 */ 103 104/* initialize the video_adapter_t structure */ --- 311 unchanged lines hidden --- | 102/* 103 * Low-level frame buffer driver functions 104 * frame buffer subdrivers, such as the VGA driver, call these functions 105 * to initialize the video_adapter structure and register it to the virtual 106 * frame buffer driver `fb'. 107 */ 108 109/* initialize the video_adapter_t structure */ --- 311 unchanged lines hidden --- |