1/*-
2 * Copyright (c) 1998 Dag-Erling Co�dan Sm�rgrav
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 AUTHOR 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: logo_saver.c,v 1.6 1999/04/12 13:34:57 des Exp $
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/module.h>
35#include <sys/syslog.h>
36#include <sys/consio.h>
37#include <sys/fbio.h>
38
39#include <dev/fb/fbreg.h>
40#include <dev/fb/splashreg.h>
41#include <dev/syscons/syscons.h>
42
43static u_char *vid;
44static int banksize, scrmode, bpsl, scrw, scrh;
45static int blanked;
46
47#include "logo.c"
48
49static void
--- 53 unchanged lines hidden (view full) ---
103 pl = splhigh();
104 set_video_mode(adp, scrmode);
105 load_palette(adp, logo_pal);
106#if 0 /* XXX conflict */
107 set_border(adp, 0);
108#endif
109 blanked++;
110 vid = (u_char *)adp->va_window;
111 banksize = adp->va_window_size;
112 bpsl = adp->va_line_width;
113 splx(pl);
114 for (i = 0; i < bpsl*scrh; i += banksize) {
115 set_origin(adp, i);
116 bzero(vid, banksize);
117 }
118 }
119 logo_update(adp);
--- 12 unchanged lines hidden (view full) ---
132 scrmode = M_VESA_CG800x600;
133 } else if (!get_mode_info(adp, M_VGA_CG320, &info)) {
134 scrmode = M_VGA_CG320;
135 } else {
136 log(LOG_NOTICE, "logo_saver: no suitable graphics mode\n");
137 return ENODEV;
138 }
139
140 scrw = info.vi_width;
141 scrh = info.vi_height;
142 blanked = 0;
143
144 return 0;
145}
146
147static int
148logo_term(video_adapter_t *adp)
149{
150 return 0;
151}
152
153static scrn_saver_t logo_module = {
154 "logo_saver", logo_init, logo_term, logo_saver, NULL,
155};
156
157SAVER_MODULE(logo_saver, logo_module);
2 * Copyright (c) 1998 Dag-Erling Co�dan Sm�rgrav
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 AUTHOR 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: logo_saver.c,v 1.6 1999/04/12 13:34:57 des Exp $
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/module.h>
35#include <sys/syslog.h>
36#include <sys/consio.h>
37#include <sys/fbio.h>
38
39#include <dev/fb/fbreg.h>
40#include <dev/fb/splashreg.h>
41#include <dev/syscons/syscons.h>
42
43static u_char *vid;
44static int banksize, scrmode, bpsl, scrw, scrh;
45static int blanked;
46
47#include "logo.c"
48
49static void
--- 53 unchanged lines hidden (view full) ---
103 pl = splhigh();
104 set_video_mode(adp, scrmode);
105 load_palette(adp, logo_pal);
106#if 0 /* XXX conflict */
107 set_border(adp, 0);
108#endif
109 blanked++;
110 vid = (u_char *)adp->va_window;
111 banksize = adp->va_window_size;
112 bpsl = adp->va_line_width;
113 splx(pl);
114 for (i = 0; i < bpsl*scrh; i += banksize) {
115 set_origin(adp, i);
116 bzero(vid, banksize);
117 }
118 }
119 logo_update(adp);
--- 12 unchanged lines hidden (view full) ---
132 scrmode = M_VESA_CG800x600;
133 } else if (!get_mode_info(adp, M_VGA_CG320, &info)) {
134 scrmode = M_VGA_CG320;
135 } else {
136 log(LOG_NOTICE, "logo_saver: no suitable graphics mode\n");
137 return ENODEV;
138 }
139
140 scrw = info.vi_width;
141 scrh = info.vi_height;
142 blanked = 0;
143
144 return 0;
145}
146
147static int
148logo_term(video_adapter_t *adp)
149{
150 return 0;
151}
152
153static scrn_saver_t logo_module = {
154 "logo_saver", logo_init, logo_term, logo_saver, NULL,
155};
156
157SAVER_MODULE(logo_saver, logo_module);