drm_agpsupport.c (152909) | drm_agpsupport.c (153579) |
---|---|
1/* drm_agpsupport.h -- DRM support for AGP/GART backend -*- linux-c -*- 2 * Created: Mon Dec 13 09:56:45 1999 by faith@precisioninsight.com 3 */ 4/*- 5 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. 6 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. 7 * All Rights Reserved. 8 * --- 18 unchanged lines hidden (view full) --- 27 * 28 * Author: 29 * Rickard E. (Rik) Faith <faith@valinux.com> 30 * Gareth Hughes <gareth@valinux.com> 31 * 32 */ 33 34#include <sys/cdefs.h> | 1/* drm_agpsupport.h -- DRM support for AGP/GART backend -*- linux-c -*- 2 * Created: Mon Dec 13 09:56:45 1999 by faith@precisioninsight.com 3 */ 4/*- 5 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. 6 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. 7 * All Rights Reserved. 8 * --- 18 unchanged lines hidden (view full) --- 27 * 28 * Author: 29 * Rickard E. (Rik) Faith <faith@valinux.com> 30 * Gareth Hughes <gareth@valinux.com> 31 * 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/dev/drm/drm_agpsupport.c 152909 2005-11-28 23:13:57Z anholt $"); | 35__FBSDID("$FreeBSD: head/sys/dev/drm/drm_agpsupport.c 153579 2005-12-20 22:44:36Z jhb $"); |
36 37#include "dev/drm/drmP.h" 38 39#ifdef __FreeBSD__ 40#include <pci/agpreg.h> 41#include <dev/pci/pcireg.h> 42#endif 43 --- 7 unchanged lines hidden (view full) --- 51 ret = (*dev->driver.device_is_agp)(dev); 52 53 if (ret != DRM_MIGHT_BE_AGP) { 54 return ret == 2; 55 } 56 } 57 58#ifdef __FreeBSD__ | 36 37#include "dev/drm/drmP.h" 38 39#ifdef __FreeBSD__ 40#include <pci/agpreg.h> 41#include <dev/pci/pcireg.h> 42#endif 43 --- 7 unchanged lines hidden (view full) --- 51 ret = (*dev->driver.device_is_agp)(dev); 52 53 if (ret != DRM_MIGHT_BE_AGP) { 54 return ret == 2; 55 } 56 } 57 58#ifdef __FreeBSD__ |
59#if __FreeBSD_version >= 700010 60 61 return (pci_find_extcap(dev->device, cap, NULL) == 0); 62#else |
|
59 /* Code taken from agp.c. IWBNI that was a public interface. */ 60 u_int32_t status; 61 u_int8_t ptr, next; 62 63 /* 64 * Check the CAP_LIST bit of the PCI status register first. 65 */ 66 status = pci_read_config(dev->device, PCIR_STATUS, 2); --- 12 unchanged lines hidden (view full) --- 79 /* 80 * If this capability entry ID is cap, then we are done. 81 */ 82 if (AGP_CAPID_GET_CAP_ID(capid) == cap) 83 return 1; 84 } 85 86 return 0; | 63 /* Code taken from agp.c. IWBNI that was a public interface. */ 64 u_int32_t status; 65 u_int8_t ptr, next; 66 67 /* 68 * Check the CAP_LIST bit of the PCI status register first. 69 */ 70 status = pci_read_config(dev->device, PCIR_STATUS, 2); --- 12 unchanged lines hidden (view full) --- 83 /* 84 * If this capability entry ID is cap, then we are done. 85 */ 86 if (AGP_CAPID_GET_CAP_ID(capid) == cap) 87 return 1; 88 } 89 90 return 0; |
91#endif |
|
87#else 88 /* XXX: fill me in for non-FreeBSD */ 89 return 1; 90#endif 91} 92 93int drm_device_is_agp(drm_device_t *dev) 94{ --- 379 unchanged lines hidden --- | 92#else 93 /* XXX: fill me in for non-FreeBSD */ 94 return 1; 95#endif 96} 97 98int drm_device_is_agp(drm_device_t *dev) 99{ --- 379 unchanged lines hidden --- |