diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2012-08-22 15:17:06 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2012-08-22 15:17:06 +0000 |
commit | 986938528d697b6ada5ca192e6444d2072dd9f9e (patch) | |
tree | f0bb9425e66749a1b7806ebeef994f49da4b5891 /sys | |
parent | e6038550f829564d33beb66998e6e5a0d855f386 (diff) |
Unbreak drm when DRM_NO_AGP is defined.
ok miod@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/drm_agpsupport.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/drm_agpsupport.c b/sys/dev/pci/drm/drm_agpsupport.c index 7f30d5a557c..ba110030d03 100644 --- a/sys/dev/pci/drm/drm_agpsupport.c +++ b/sys/dev/pci/drm/drm_agpsupport.c @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_agpsupport.c,v 1.20 2011/06/02 18:22:00 weerd Exp $ */ +/* $OpenBSD: drm_agpsupport.c,v 1.21 2012/08/22 15:17:05 mpi Exp $ */ /*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. @@ -212,6 +212,7 @@ drm_agp_lookup_entry(struct drm_device *dev, void *handle) int drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request) { +#ifndef DRM_NO_AGP struct drm_agp_mem *entry; int retcode; @@ -232,6 +233,9 @@ drm_agp_unbind(struct drm_device *dev, struct drm_agp_binding *request) DRM_UNLOCK(); return (retcode); +#else + return (0); +#endif } int @@ -246,9 +250,10 @@ drm_agp_unbind_ioctl(struct drm_device *dev, void *data, int drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request) { +#ifndef DRM_NO_AGP struct drm_agp_mem *entry; int retcode, page; - + if (dev->agp == NULL || !dev->agp->acquired) return (EINVAL); @@ -270,6 +275,9 @@ drm_agp_bind(struct drm_device *dev, struct drm_agp_binding *request) DRM_UNLOCK(); return (retcode); +#else + return (0); +#endif } int @@ -287,12 +295,14 @@ drm_agp_bind_ioctl(struct drm_device *dev, void *data, void drm_agp_remove_entry(struct drm_device *dev, struct drm_agp_mem *entry) { +#ifndef DRM_NO_AGP TAILQ_REMOVE(&dev->agp->memory, entry, link); if (entry->bound) agp_unbind_memory(dev->agp->agpdev, entry->handle); agp_free_memory(dev->agp->agpdev, entry->handle); drm_free(entry); +#endif } void |