vesa.c (8d521790d0ee82630996e41d38d6997a4c28d9ac) vesa.c (aa3d547d095ff07fdc39ffc5ae4c371844b504ab)
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

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

1480vesa_blank_display(video_adapter_t *adp, int mode)
1481{
1482
1483 /* XXX: use VESA DPMS */
1484 return ((*prevvidsw->blank_display)(adp, mode));
1485}
1486
1487static int
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

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

1480vesa_blank_display(video_adapter_t *adp, int mode)
1481{
1482
1483 /* XXX: use VESA DPMS */
1484 return ((*prevvidsw->blank_display)(adp, mode));
1485}
1486
1487static int
1488vesa_mmap(video_adapter_t *adp, vm_ooffset_t offset, vm_paddr_t *paddr,
1489 int prot, vm_memattr_t *memattr)
1488vesa_mmap(video_adapter_t *adp, vm_offset_t offset, vm_paddr_t *paddr,
1489 int prot)
1490{
1491
1492#if VESA_DEBUG > 0
1490{
1491
1492#if VESA_DEBUG > 0
1493 printf("vesa_mmap(): window:0x%tx, buffer:0x%tx, offset:0x%jx\n",
1493 printf("vesa_mmap(): window:0x%tx, buffer:0x%tx, offset:0x%tx\n",
1494 adp->va_info.vi_window, adp->va_info.vi_buffer, offset);
1495#endif
1496
1497 if ((adp == vesa_adp) &&
1498 (adp->va_info.vi_flags & V_INFO_LINEAR) != 0) {
1499 /* va_window_size == va_buffer_size/vi_planes */
1500 /* XXX: is this correct? */
1501 if (offset > adp->va_window_size - PAGE_SIZE)
1502 return (-1);
1503 *paddr = adp->va_info.vi_buffer + offset;
1504 return (0);
1505 }
1494 adp->va_info.vi_window, adp->va_info.vi_buffer, offset);
1495#endif
1496
1497 if ((adp == vesa_adp) &&
1498 (adp->va_info.vi_flags & V_INFO_LINEAR) != 0) {
1499 /* va_window_size == va_buffer_size/vi_planes */
1500 /* XXX: is this correct? */
1501 if (offset > adp->va_window_size - PAGE_SIZE)
1502 return (-1);
1503 *paddr = adp->va_info.vi_buffer + offset;
1504 return (0);
1505 }
1506 return ((*prevvidsw->mmap)(adp, offset, paddr, prot, memattr));
1506 return ((*prevvidsw->mmap)(adp, offset, paddr, prot));
1507}
1508
1509static int
1510vesa_clear(video_adapter_t *adp)
1511{
1512
1513 return ((*prevvidsw->clear)(adp));
1514}

--- 352 unchanged lines hidden ---
1507}
1508
1509static int
1510vesa_clear(video_adapter_t *adp)
1511{
1512
1513 return ((*prevvidsw->clear)(adp));
1514}

--- 352 unchanged lines hidden ---