gdc.c (183397) | gdc.c (201223) |
---|---|
1/*- 2 * Copyright (c) 1999 FreeBSD(98) port team. 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 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 1999 FreeBSD(98) port team. 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 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/pc98/cbus/gdc.c 183397 2008-09-27 08:51:18Z ed $ | 28 * $FreeBSD: head/sys/pc98/cbus/gdc.c 201223 2009-12-29 21:51:28Z rnoland $ |
29 */ 30 31#include "opt_gdc.h" 32#include "opt_fb.h" 33#include "opt_syscons.h" 34 35#include <sys/param.h> 36#include <sys/systm.h> --- 353 unchanged lines hidden (view full) --- 390{ 391 gdc_softc_t *sc; 392 393 sc = GDC_SOFTC(GDC_UNIT(dev)); 394 return genfbioctl(&sc->gensc, sc->adp, cmd, arg, flag, td); 395} 396 397static int | 29 */ 30 31#include "opt_gdc.h" 32#include "opt_fb.h" 33#include "opt_syscons.h" 34 35#include <sys/param.h> 36#include <sys/systm.h> --- 353 unchanged lines hidden (view full) --- 390{ 391 gdc_softc_t *sc; 392 393 sc = GDC_SOFTC(GDC_UNIT(dev)); 394 return genfbioctl(&sc->gensc, sc->adp, cmd, arg, flag, td); 395} 396 397static int |
398gdcmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot) | 398gdcmmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, 399 int prot, vm_memattr_t *memattr) |
399{ 400 gdc_softc_t *sc; 401 402 sc = GDC_SOFTC(GDC_UNIT(dev)); | 400{ 401 gdc_softc_t *sc; 402 403 sc = GDC_SOFTC(GDC_UNIT(dev)); |
403 return genfbmmap(&sc->gensc, sc->adp, offset, paddr, prot); | 404 return genfbmmap(&sc->gensc, sc->adp, offset, paddr, prot, memattr); |
404} 405 406#endif /* FB_INSTALL_CDEV */ 407 408static device_method_t gdc_methods[] = { 409 DEVMETHOD(device_identify, gdc_identify), 410 DEVMETHOD(device_probe, gdcprobe), 411 DEVMETHOD(device_attach, gdc_attach), --- 920 unchanged lines hidden (view full) --- 1332 return 0; 1333} 1334 1335/* 1336 * mmap(): 1337 * Mmap frame buffer. 1338 */ 1339static int | 405} 406 407#endif /* FB_INSTALL_CDEV */ 408 409static device_method_t gdc_methods[] = { 410 DEVMETHOD(device_identify, gdc_identify), 411 DEVMETHOD(device_probe, gdcprobe), 412 DEVMETHOD(device_attach, gdc_attach), --- 920 unchanged lines hidden (view full) --- 1333 return 0; 1334} 1335 1336/* 1337 * mmap(): 1338 * Mmap frame buffer. 1339 */ 1340static int |
1340gdc_mmap_buf(video_adapter_t *adp, vm_offset_t offset, vm_offset_t *paddr, 1341 int prot) | 1341gdc_mmap_buf(video_adapter_t *adp, vm_ooffset_t offset, vm_offset_t *paddr, 1342 int prot, vm_memattr_t *memattr) |
1342{ 1343 /* FIXME: is this correct? XXX */ 1344 if (offset > VIDEO_BUF_SIZE - PAGE_SIZE) 1345 return -1; 1346 *paddr = adp->va_info.vi_window + offset; 1347 return 0; 1348} 1349 --- 137 unchanged lines hidden --- | 1343{ 1344 /* FIXME: is this correct? XXX */ 1345 if (offset > VIDEO_BUF_SIZE - PAGE_SIZE) 1346 return -1; 1347 *paddr = adp->va_info.vi_window + offset; 1348 return 0; 1349} 1350 --- 137 unchanged lines hidden --- |