summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authordumbbell <dumbbell@FreeBSD.org>2016-02-15 07:35:40 +0000
committerdumbbell <dumbbell@FreeBSD.org>2016-02-15 07:35:40 +0000
commit744ea196e52f4821042acc2a9b289ee54aea5202 (patch)
tree29659bddd5ba8b79bac6cfc0ea064204523bf945 /sys/dev
parent2cbc922afeafbcd47c96fbfc1d0bf6a2c87f28de (diff)
downloadFreeBSD-src-744ea196e52f4821042acc2a9b289ee54aea5202.zip
FreeBSD-src-744ea196e52f4821042acc2a9b289ee54aea5202.tar.gz
drm/i915: Restore pci_enable_busmaster() call in the init path
This fixes a GPU hang on i945GM. While here, merge some minor fixes to DRM core and i915: * Remove obsolete drm_agp_*_memory() prototypes * Fix comment in drm_fops.c (outisde -> outside) * Fix some formatting issues in drm_stub.c (spaces -> tabs) Approved by: re (marius) MFC of: r288653, r288952, r293851 Submitted by: <s3erios@gmail.com> Differential Revision: https://reviews.freebsd.org/D3413
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/drm2/drmP.h6
-rw-r--r--sys/dev/drm2/drm_fops.c2
-rw-r--r--sys/dev/drm2/drm_stub.c6
-rw-r--r--sys/dev/drm2/i915/i915_dma.c2
-rw-r--r--sys/dev/drm2/i915/intel_opregion.c4
5 files changed, 7 insertions, 13 deletions
diff --git a/sys/dev/drm2/drmP.h b/sys/dev/drm2/drmP.h
index f028d81..5d625a7 100644
--- a/sys/dev/drm2/drmP.h
+++ b/sys/dev/drm2/drmP.h
@@ -1757,12 +1757,6 @@ void drm_driver_irq_preinstall(struct drm_device *dev);
void drm_driver_irq_postinstall(struct drm_device *dev);
void drm_driver_irq_uninstall(struct drm_device *dev);
-/* AGP/PCI Express/GART support (drm_agpsupport.c) */
-void *drm_agp_allocate_memory(size_t pages, u32 type);
-int drm_agp_free_memory(void *handle);
-int drm_agp_bind_memory(void *handle, off_t start);
-int drm_agp_unbind_memory(void *handle);
-
/* sysctl support (drm_sysctl.h) */
extern int drm_sysctl_init(struct drm_device *dev);
extern int drm_sysctl_cleanup(struct drm_device *dev);
diff --git a/sys/dev/drm2/drm_fops.c b/sys/dev/drm2/drm_fops.c
index b73cec6..3b3be06 100644
--- a/sys/dev/drm2/drm_fops.c
+++ b/sys/dev/drm2/drm_fops.c
@@ -136,7 +136,7 @@ int drm_open(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p)
sx_xlock(&drm_global_mutex);
/*
- * FIXME Linux<->FreeBSD: On Linux, counter updated outisde
+ * FIXME Linux<->FreeBSD: On Linux, counter updated outside
* global mutex.
*/
if (!dev->open_count++)
diff --git a/sys/dev/drm2/drm_stub.c b/sys/dev/drm2/drm_stub.c
index d7ec6cb..06663ac 100644
--- a/sys/dev/drm2/drm_stub.c
+++ b/sys/dev/drm2/drm_stub.c
@@ -94,9 +94,9 @@ static int drm_minor_get_id(struct drm_device *dev, int type)
if (type == DRM_MINOR_CONTROL) {
new_id += 64;
- } else if (type == DRM_MINOR_RENDER) {
- new_id += 128;
- }
+ } else if (type == DRM_MINOR_RENDER) {
+ new_id += 128;
+ }
return new_id;
}
diff --git a/sys/dev/drm2/i915/i915_dma.c b/sys/dev/drm2/i915/i915_dma.c
index 910b35a..353c081 100644
--- a/sys/dev/drm2/i915/i915_dma.c
+++ b/sys/dev/drm2/i915/i915_dma.c
@@ -1458,6 +1458,8 @@ i915_driver_load(struct drm_device *dev, unsigned long flags)
}
}
+ pci_enable_busmaster(dev->dev);
+
intel_opregion_init(dev);
callout_init(&dev_priv->hangcheck_timer, 1);
diff --git a/sys/dev/drm2/i915/intel_opregion.c b/sys/dev/drm2/i915/intel_opregion.c
index 411e530..397c559 100644
--- a/sys/dev/drm2/i915/intel_opregion.c
+++ b/sys/dev/drm2/i915/intel_opregion.c
@@ -533,11 +533,9 @@ void intel_opregion_fini(struct drm_device *dev)
opregion->vbt = NULL;
}
#else
-int
+void
intel_opregion_init(struct drm_device *dev)
{
-
- return (0);
}
void
OpenPOWER on IntegriCloud