Deleted Added
full compact
vt_vga.c (271128) vt_vga.c (271769)
1/*-
2 * Copyright (c) 2005 Marcel Moolenaar
3 * All rights reserved.
4 *
5 * Copyright (c) 2009 The FreeBSD Foundation
6 * All rights reserved.
7 *
8 * Portions of this software were developed by Ed Schouten

--- 17 unchanged lines hidden (view full) ---

26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2005 Marcel Moolenaar
3 * All rights reserved.
4 *
5 * Copyright (c) 2009 The FreeBSD Foundation
6 * All rights reserved.
7 *
8 * Portions of this software were developed by Ed Schouten

--- 17 unchanged lines hidden (view full) ---

26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: stable/10/sys/dev/vt/hw/vga/vt_vga.c 271128 2014-09-04 20:18:08Z emaste $");
34__FBSDID("$FreeBSD: stable/10/sys/dev/vt/hw/vga/vt_vga.c 271769 2014-09-18 14:38:18Z dumbbell $");
35
36#include <sys/param.h>
37#include <sys/kernel.h>
38#include <sys/systm.h>
39
40#include <dev/vt/vt.h>
41#include <dev/vt/hw/vga/vt_vga_reg.h>
42

--- 304 unchanged lines hidden (view full) ---

347 MEM_WRITE1(sc, dst, v);
348 }
349}
350
351static void
352vga_setpixel(struct vt_device *vd, int x, int y, term_color_t color)
353{
354
35
36#include <sys/param.h>
37#include <sys/kernel.h>
38#include <sys/systm.h>
39
40#include <dev/vt/vt.h>
41#include <dev/vt/hw/vga/vt_vga_reg.h>
42

--- 304 unchanged lines hidden (view full) ---

347 MEM_WRITE1(sc, dst, v);
348 }
349}
350
351static void
352vga_setpixel(struct vt_device *vd, int x, int y, term_color_t color)
353{
354
355 if (vd->vd_flags & VDF_TEXTMODE)
356 return;
357
355 vga_bitblt_put(vd, (y * VT_VGA_WIDTH / 8) + (x / 8), color,
356 0x80 >> (x % 8));
357}
358
359static void
360vga_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill,
361 term_color_t color)
362{
363 int x, y;
364
358 vga_bitblt_put(vd, (y * VT_VGA_WIDTH / 8) + (x / 8), color,
359 0x80 >> (x % 8));
360}
361
362static void
363vga_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill,
364 term_color_t color)
365{
366 int x, y;
367
368 if (vd->vd_flags & VDF_TEXTMODE)
369 return;
370
365 for (y = y1; y <= y2; y++) {
366 if (fill || (y == y1) || (y == y2)) {
367 for (x = x1; x <= x2; x++)
368 vga_setpixel(vd, x, y, color);
369 } else {
370 vga_setpixel(vd, x1, y, color);
371 vga_setpixel(vd, x2, y, color);
372 }

--- 870 unchanged lines hidden ---
371 for (y = y1; y <= y2; y++) {
372 if (fill || (y == y1) || (y == y2)) {
373 for (x = x1; x <= x2; x++)
374 vga_setpixel(vd, x, y, color);
375 } else {
376 vga_setpixel(vd, x1, y, color);
377 vga_setpixel(vd, x2, y, color);
378 }

--- 870 unchanged lines hidden ---