diff options
author | Eric Anholt <anholt@freebsd.org> | 2005-07-20 21:17:47 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2005-07-20 21:17:47 +0000 |
commit | ab59dd285c4ccdec92adadfcb869fc83edd96e86 (patch) | |
tree | 991a507b2e9afee54d15bc60848c988d5d4b9666 /bsd-core/drm_agpsupport.c | |
parent | 026e12ea937865748d54d3b8a7a3b77ccc4e3efb (diff) |
Add latest r300 support from r300.sf.net CVS. Patch submitted by volodya,
with BSD fix from jkim and the r300_reg.h license from Nicolai Haehnle.
Big thanks to everyone involved!
Diffstat (limited to 'bsd-core/drm_agpsupport.c')
-rw-r--r-- | bsd-core/drm_agpsupport.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/bsd-core/drm_agpsupport.c b/bsd-core/drm_agpsupport.c index 9e98140a..4f3a6f28 100644 --- a/bsd-core/drm_agpsupport.c +++ b/bsd-core/drm_agpsupport.c @@ -39,8 +39,8 @@ #endif /* Returns 1 if AGP or 0 if not. */ -int -drm_device_is_agp(drm_device_t *dev) +static int +drm_device_find_capability(drm_device_t *dev, int cap) { int ret; @@ -74,9 +74,9 @@ drm_device_is_agp(drm_device_t *dev) next = AGP_CAPID_GET_NEXT_PTR(capid); /* - * If this capability entry ID is 2, then we are done. + * If this capability entry ID is cap, then we are done. */ - if (AGP_CAPID_GET_CAP_ID(capid) == 2) + if (AGP_CAPID_GET_CAP_ID(capid) == cap) return 1; } @@ -87,6 +87,16 @@ drm_device_is_agp(drm_device_t *dev) #endif } +int drm_device_is_agp(drm_device_t *dev) +{ + return (drm_device_find_capability(dev, PCIY_AGP)); +} + +int drm_device_is_pcie(drm_device_t *dev) +{ + return (drm_device_find_capability(dev, PCIY_EXPRESS)); +} + int drm_agp_info(drm_device_t * dev, drm_agp_info_t *info) { struct agp_info *kern; |