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 83366 2001-09-12 08:38:13Z julian $
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
40#include <dev/fb/fbreg.h>
41#include <dev/syscons/syscons.h>
42
43SET_DECLARE(scrndr_set, const sc_renderer_t);
44
45/* for compatibility with previous versions */
46/* 3.0-RELEASE used the following structure */
--- 176 unchanged lines hidden (view full) ---
223 if (tp == NULL)
224 return 0;
225 DPRINTF(5, ("ws_*size (%d,%d), size (%d,%d)\n",
226 tp->t_winsize.ws_col, tp->t_winsize.ws_row, scp->xsize, scp->ysize));
227 if (tp->t_winsize.ws_col != scp->xsize
228 || tp->t_winsize.ws_row != scp->ysize) {
229 tp->t_winsize.ws_col = scp->xsize;
230 tp->t_winsize.ws_row = scp->ysize;
231 pgsignal(tp->t_pgrp, SIGWINCH, 1);
232 }
233
234 return 0;
235}
236
237int
238sc_set_graphics_mode(scr_stat *scp, struct tty *tp, int mode)
239{
--- 46 unchanged lines hidden (view full) ---
286 scp->status &= ~UNKNOWN_MODE;
287
288 if (tp == NULL)
289 return 0;
290 if (tp->t_winsize.ws_xpixel != scp->xpixel
291 || tp->t_winsize.ws_ypixel != scp->ypixel) {
292 tp->t_winsize.ws_xpixel = scp->xpixel;
293 tp->t_winsize.ws_ypixel = scp->ypixel;
294 pgsignal(tp->t_pgrp, SIGWINCH, 1);
295 }
296
297 return 0;
298#endif /* SC_NO_MODE_CHANGE */
299}
300
301int
302sc_set_pixel_mode(scr_stat *scp, struct tty *tp, int xsize, int ysize,
--- 115 unchanged lines hidden (view full) ---
418 scp->status &= ~UNKNOWN_MODE;
419
420 if (tp == NULL)
421 return 0;
422 if (tp->t_winsize.ws_col != scp->xsize
423 || tp->t_winsize.ws_row != scp->ysize) {
424 tp->t_winsize.ws_col = scp->xsize;
425 tp->t_winsize.ws_row = scp->ysize;
426 pgsignal(tp->t_pgrp, SIGWINCH, 1);
427 }
428
429 return 0;
430#endif /* SC_PIXEL_MODE */
431}
432
433#define fb_ioctl(a, c, d) \
434 (((a) == NULL) ? ENODEV : \
--- 391 unchanged lines hidden ---
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 83366 2001-09-12 08:38:13Z julian $
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
40#include <dev/fb/fbreg.h>
41#include <dev/syscons/syscons.h>
42
43SET_DECLARE(scrndr_set, const sc_renderer_t);
44
45/* for compatibility with previous versions */
46/* 3.0-RELEASE used the following structure */
--- 176 unchanged lines hidden (view full) ---
223 if (tp == NULL)
224 return 0;
225 DPRINTF(5, ("ws_*size (%d,%d), size (%d,%d)\n",
226 tp->t_winsize.ws_col, tp->t_winsize.ws_row, scp->xsize, scp->ysize));
227 if (tp->t_winsize.ws_col != scp->xsize
228 || tp->t_winsize.ws_row != scp->ysize) {
229 tp->t_winsize.ws_col = scp->xsize;
230 tp->t_winsize.ws_row = scp->ysize;
231 pgsignal(tp->t_pgrp, SIGWINCH, 1);
232 }
233
234 return 0;
235}
236
237int
238sc_set_graphics_mode(scr_stat *scp, struct tty *tp, int mode)
239{
--- 46 unchanged lines hidden (view full) ---
286 scp->status &= ~UNKNOWN_MODE;
287
288 if (tp == NULL)
289 return 0;
290 if (tp->t_winsize.ws_xpixel != scp->xpixel
291 || tp->t_winsize.ws_ypixel != scp->ypixel) {
292 tp->t_winsize.ws_xpixel = scp->xpixel;
293 tp->t_winsize.ws_ypixel = scp->ypixel;
294 pgsignal(tp->t_pgrp, SIGWINCH, 1);
295 }
296
297 return 0;
298#endif /* SC_NO_MODE_CHANGE */
299}
300
301int
302sc_set_pixel_mode(scr_stat *scp, struct tty *tp, int xsize, int ysize,
--- 115 unchanged lines hidden (view full) ---
418 scp->status &= ~UNKNOWN_MODE;
419
420 if (tp == NULL)
421 return 0;
422 if (tp->t_winsize.ws_col != scp->xsize
423 || tp->t_winsize.ws_row != scp->ysize) {
424 tp->t_winsize.ws_col = scp->xsize;
425 tp->t_winsize.ws_row = scp->ysize;
426 pgsignal(tp->t_pgrp, SIGWINCH, 1);
427 }
428
429 return 0;
430#endif /* SC_PIXEL_MODE */
431}
432
433#define fb_ioctl(a, c, d) \
434 (((a) == NULL) ? ENODEV : \
--- 391 unchanged lines hidden ---