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: releng/10.3/sys/dev/syscons/green/green_saver.c 230132 2012-01-15 13:23:18Z uqs $ 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 4342504Syokotagreen_saver(video_adapter_t *adp, int blank) 446628Ssos{ 45174985Swkoszek vidd_blank_display(adp, 46174985Swkoszek (blank) ? V_DISPLAY_STAND_BY : V_DISPLAY_ON); 4742504Syokota return 0; 486628Ssos} 496628Ssos 5012276Sbdestatic int 5142504Syokotagreen_init(video_adapter_t *adp) 526628Ssos{ 53174985Swkoszek if (vidd_blank_display(adp, V_DISPLAY_ON) == 0) 5448104Syokota return 0; 5548104Syokota return ENODEV; 566628Ssos} 576628Ssos 5812276Sbdestatic int 5942504Syokotagreen_term(video_adapter_t *adp) 606628Ssos{ 6142504Syokota return 0; 626628Ssos} 636628Ssos 6442504Syokotastatic scrn_saver_t green_module = { 6542504Syokota "green_saver", green_init, green_term, green_saver, NULL, 6642504Syokota}; 6742504Syokota 6842504SyokotaSAVER_MODULE(green_saver, green_module); 69