Deleted Added
full compact
vesa.c (199230) vesa.c (201223)
1/*-
2 * Copyright (c) 1998 Kazutaka YOKOTA and Michael Smith
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

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

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
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1998 Kazutaka YOKOTA and Michael Smith
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

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

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
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/dev/fb/vesa.c 199230 2009-11-12 18:16:35Z jkim $");
28__FBSDID("$FreeBSD: head/sys/dev/fb/vesa.c 201223 2009-12-29 21:51:28Z rnoland $");
29
30#include "opt_vga.h"
31#include "opt_vesa.h"
32
33#ifndef VGA_NO_MODE_CHANGE
34
35#include <sys/param.h>
36#include <sys/bus.h>

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

1523vesa_blank_display(video_adapter_t *adp, int mode)
1524{
1525
1526 /* XXX: use VESA DPMS */
1527 return ((*prevvidsw->blank_display)(adp, mode));
1528}
1529
1530static int
29
30#include "opt_vga.h"
31#include "opt_vesa.h"
32
33#ifndef VGA_NO_MODE_CHANGE
34
35#include <sys/param.h>
36#include <sys/bus.h>

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

1523vesa_blank_display(video_adapter_t *adp, int mode)
1524{
1525
1526 /* XXX: use VESA DPMS */
1527 return ((*prevvidsw->blank_display)(adp, mode));
1528}
1529
1530static int
1531vesa_mmap(video_adapter_t *adp, vm_offset_t offset, vm_paddr_t *paddr,
1532 int prot)
1531vesa_mmap(video_adapter_t *adp, vm_ooffset_t offset, vm_paddr_t *paddr,
1532 int prot, vm_memattr_t *memattr)
1533{
1534
1535#if VESA_DEBUG > 0
1533{
1534
1535#if VESA_DEBUG > 0
1536 printf("vesa_mmap(): window:0x%tx, buffer:0x%tx, offset:0x%tx\n",
1536 printf("vesa_mmap(): window:0x%tx, buffer:0x%tx, offset:0x%jx\n",
1537 adp->va_info.vi_window, adp->va_info.vi_buffer, offset);
1538#endif
1539
1540 if ((adp == vesa_adp) &&
1541 (adp->va_info.vi_flags & V_INFO_LINEAR) != 0) {
1542 /* va_window_size == va_buffer_size/vi_planes */
1543 /* XXX: is this correct? */
1544 if (offset > adp->va_window_size - PAGE_SIZE)
1545 return (-1);
1546 *paddr = adp->va_info.vi_buffer + offset;
1547 return (0);
1548 }
1537 adp->va_info.vi_window, adp->va_info.vi_buffer, offset);
1538#endif
1539
1540 if ((adp == vesa_adp) &&
1541 (adp->va_info.vi_flags & V_INFO_LINEAR) != 0) {
1542 /* va_window_size == va_buffer_size/vi_planes */
1543 /* XXX: is this correct? */
1544 if (offset > adp->va_window_size - PAGE_SIZE)
1545 return (-1);
1546 *paddr = adp->va_info.vi_buffer + offset;
1547 return (0);
1548 }
1549 return ((*prevvidsw->mmap)(adp, offset, paddr, prot));
1549 return ((*prevvidsw->mmap)(adp, offset, paddr, prot, memattr));
1550}
1551
1552static int
1553vesa_clear(video_adapter_t *adp)
1554{
1555
1556 return ((*prevvidsw->clear)(adp));
1557}

--- 351 unchanged lines hidden ---
1550}
1551
1552static int
1553vesa_clear(video_adapter_t *adp)
1554{
1555
1556 return ((*prevvidsw->clear)(adp));
1557}

--- 351 unchanged lines hidden ---