summaryrefslogtreecommitdiff
path: root/bsd-core
diff options
context:
space:
mode:
authorRobert Noland <rnoland@2hip.net>2008-06-05 12:46:39 -0400
committerRobert Noland <rnoland@wombat.2hip.net>2008-06-08 02:00:48 -0400
commit96141bd33c0d6c4b95a2adb668538ffc1103cc18 (patch)
tree27ca14a902c71c95b19e774af26ee6b5e5447602 /bsd-core
parent6d6921719c7d475856199ddbe88bbe11fc882ba6 (diff)
[FreeBSD] We need to request busmastering support.
This seems to be the key to getting at least some radeon cards working. Most, if not all drivers need it enabled, so just request it once the driver has attached.
Diffstat (limited to 'bsd-core')
-rw-r--r--bsd-core/drm_drv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c
index 1616dbb4..740a8b57 100644
--- a/bsd-core/drm_drv.c
+++ b/bsd-core/drm_drv.c
@@ -544,6 +544,8 @@ static int drm_load(struct drm_device *dev)
/* Shared code returns -errno. */
retcode = -dev->driver.load(dev,
dev->id_entry->driver_private);
+ if (pci_enable_busmaster(dev->device))
+ DRM_ERROR("Request to enable bus-master failed.\n");
DRM_UNLOCK();
if (retcode != 0)
goto error;
@@ -654,6 +656,10 @@ static void drm_unload(struct drm_device *dev)
delete_unrhdr(dev->drw_unrhdr);
drm_mem_uninit();
+
+ if (pci_disable_busmaster(dev->device))
+ DRM_ERROR("Request to disable bus-master failed.\n");
+
#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
mtx_destroy(&dev->drw_lock);
mtx_destroy(&dev->irq_lock);