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 * $FreeBSD: head/sys/dev/syscons/scvidctl.c 91140 2002-02-23 11:12:57Z tanimura $ |
27 */ 28 29#include "opt_syscons.h" 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/conf.h> 34#include <sys/signalvar.h> 35#include <sys/tty.h> 36#include <sys/kernel.h> 37#include <sys/fbio.h> 38#include <sys/consio.h> |
39#include <sys/filedesc.h> 40#include <sys/lock.h> 41#include <sys/sx.h> 42#include <sys/mutex.h> 43#include <sys/proc.h> |
44 45#include <dev/fb/fbreg.h> 46#include <dev/syscons/syscons.h> 47 48SET_DECLARE(scrndr_set, const sc_renderer_t); 49 50/* for compatibility with previous versions */ 51/* 3.0-RELEASE used the following structure */ --- 176 unchanged lines hidden (view full) --- 228 if (tp == NULL) 229 return 0; 230 DPRINTF(5, ("ws_*size (%d,%d), size (%d,%d)\n", 231 tp->t_winsize.ws_col, tp->t_winsize.ws_row, scp->xsize, scp->ysize)); 232 if (tp->t_winsize.ws_col != scp->xsize 233 || tp->t_winsize.ws_row != scp->ysize) { 234 tp->t_winsize.ws_col = scp->xsize; 235 tp->t_winsize.ws_row = scp->ysize; |
236 if (tp->t_pgrp != NULL) { 237 PGRP_LOCK(tp->t_pgrp); 238 pgsignal(tp->t_pgrp, SIGWINCH, 1); 239 PGRP_UNLOCK(tp->t_pgrp); 240 } |
241 } 242 243 return 0; 244} 245 246int 247sc_set_graphics_mode(scr_stat *scp, struct tty *tp, int mode) 248{ --- 46 unchanged lines hidden (view full) --- 295 scp->status &= ~UNKNOWN_MODE; 296 297 if (tp == NULL) 298 return 0; 299 if (tp->t_winsize.ws_xpixel != scp->xpixel 300 || tp->t_winsize.ws_ypixel != scp->ypixel) { 301 tp->t_winsize.ws_xpixel = scp->xpixel; 302 tp->t_winsize.ws_ypixel = scp->ypixel; |
303 if (tp->t_pgrp != NULL) { 304 PGRP_LOCK(tp->t_pgrp); 305 pgsignal(tp->t_pgrp, SIGWINCH, 1); 306 PGRP_UNLOCK(tp->t_pgrp); 307 } |
308 } 309 310 return 0; 311#endif /* SC_NO_MODE_CHANGE */ 312} 313 314int 315sc_set_pixel_mode(scr_stat *scp, struct tty *tp, int xsize, int ysize, --- 115 unchanged lines hidden (view full) --- 431 scp->status &= ~UNKNOWN_MODE; 432 433 if (tp == NULL) 434 return 0; 435 if (tp->t_winsize.ws_col != scp->xsize 436 || tp->t_winsize.ws_row != scp->ysize) { 437 tp->t_winsize.ws_col = scp->xsize; 438 tp->t_winsize.ws_row = scp->ysize; |
439 if (tp->t_pgrp != NULL) { 440 PGRP_LOCK(tp->t_pgrp); 441 pgsignal(tp->t_pgrp, SIGWINCH, 1); 442 PGRP_UNLOCK(tp->t_pgrp); 443 } |
444 } 445 446 return 0; 447#endif /* SC_PIXEL_MODE */ 448} 449 450#define fb_ioctl(a, c, d) \ 451 (((a) == NULL) ? ENODEV : \ --- 391 unchanged lines hidden --- |