16628Ssos/*-
2230132Suqs * Copyright (c) 1995-1998 S��ren Schmidt
36628Ssos * All rights reserved.
46628Ssos *
56628Ssos * Redistribution and use in source and binary forms, with or without
66628Ssos * modification, are permitted provided that the following conditions
76628Ssos * are met:
86628Ssos * 1. Redistributions of source code must retain the above copyright
939287Ssos *    notice, this list of conditions and the following disclaimer,
1039287Ssos *    without modification, immediately at the beginning of the file.
116628Ssos * 2. Redistributions in binary form must reproduce the above copyright
126628Ssos *    notice, this list of conditions and the following disclaimer in the
136628Ssos *    documentation and/or other materials provided with the distribution.
146628Ssos * 3. The name of the author may not be used to endorse or promote products
1539287Ssos *    derived from this software without specific prior written permission.
166628Ssos *
176628Ssos * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
186628Ssos * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
196628Ssos * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
206628Ssos * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
216628Ssos * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
226628Ssos * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
236628Ssos * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
246628Ssos * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
256628Ssos * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
266628Ssos * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
276628Ssos *
2850477Speter * $FreeBSD$
296628Ssos */
306628Ssos
316628Ssos#include <sys/param.h>
326628Ssos#include <sys/systm.h>
3340885Speter#include <sys/kernel.h>
3440885Speter#include <sys/module.h>
3548104Syokota#include <sys/consio.h>
3648104Syokota#include <sys/fbio.h>
3727427Syokota
3848104Syokota#include <dev/fb/fbreg.h>
3948104Syokota#include <dev/fb/splashreg.h>
4048104Syokota#include <dev/syscons/syscons.h>
4142504Syokota
4242504Syokotastatic int
4342504Syokotablank_saver(video_adapter_t *adp, int blank)
446628Ssos{
45174985Swkoszek	vidd_blank_display(adp, (blank) ? V_DISPLAY_BLANK : V_DISPLAY_ON);
4642504Syokota	return 0;
476628Ssos}
486628Ssos
4912276Sbdestatic int
5042504Syokotablank_init(video_adapter_t *adp)
516628Ssos{
52174985Swkoszek	if (vidd_blank_display(adp, V_DISPLAY_ON) == 0)
5348104Syokota		return 0;
5448104Syokota	return ENODEV;
556628Ssos}
566628Ssos
5712276Sbdestatic int
5842504Syokotablank_term(video_adapter_t *adp)
596628Ssos{
6042504Syokota	return 0;
616628Ssos}
626628Ssos
6342504Syokotastatic scrn_saver_t blank_module = {
6442504Syokota	"blank_saver", blank_init, blank_term, blank_saver, NULL,
6542504Syokota};
6642504Syokota
6742504SyokotaSAVER_MODULE(blank_saver, blank_module);
68