aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-07-12 13:40:25 -0400
committerKeith Packard <keithp@keithp.com>2011-07-12 13:40:25 -0400
commit9aa73a51c91cb0d0af4caaa9823969c1a1179a12 (patch)
tree4a7b4fa5f2b9915154fbd9cc678d279026071909 /drivers/gpu
parentc7c369472dad852f6fe06a8be94dea72de784934 (diff)
parenta94919eaddaa3fede1df8563ce4d761a75374645 (diff)
Merge branch 'drm-intel-fixes' into drm-intel-next
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c14
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c2
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.h2
3 files changed, 13 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 1315a882275c..12712824a6d2 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1945,7 +1945,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1945 if (!dev_priv->mm.gtt) { 1945 if (!dev_priv->mm.gtt) {
1946 DRM_ERROR("Failed to initialize GTT\n"); 1946 DRM_ERROR("Failed to initialize GTT\n");
1947 ret = -ENODEV; 1947 ret = -ENODEV;
1948 goto out_iomapfree; 1948 goto out_rmmap;
1949 } 1949 }
1950 1950
1951 agp_size = dev_priv->mm.gtt->gtt_mappable_entries << PAGE_SHIFT; 1951 agp_size = dev_priv->mm.gtt->gtt_mappable_entries << PAGE_SHIFT;
@@ -1989,7 +1989,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1989 if (dev_priv->wq == NULL) { 1989 if (dev_priv->wq == NULL) {
1990 DRM_ERROR("Failed to create our workqueue.\n"); 1990 DRM_ERROR("Failed to create our workqueue.\n");
1991 ret = -ENOMEM; 1991 ret = -ENOMEM;
1992 goto out_iomapfree; 1992 goto out_mtrrfree;
1993 } 1993 }
1994 1994
1995 /* enable GEM by default */ 1995 /* enable GEM by default */
@@ -2076,13 +2076,21 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
2076 return 0; 2076 return 0;
2077 2077
2078out_gem_unload: 2078out_gem_unload:
2079 if (dev_priv->mm.inactive_shrinker.shrink)
2080 unregister_shrinker(&dev_priv->mm.inactive_shrinker);
2081
2079 if (dev->pdev->msi_enabled) 2082 if (dev->pdev->msi_enabled)
2080 pci_disable_msi(dev->pdev); 2083 pci_disable_msi(dev->pdev);
2081 2084
2082 intel_teardown_gmbus(dev); 2085 intel_teardown_gmbus(dev);
2083 intel_teardown_mchbar(dev); 2086 intel_teardown_mchbar(dev);
2084 destroy_workqueue(dev_priv->wq); 2087 destroy_workqueue(dev_priv->wq);
2085out_iomapfree: 2088out_mtrrfree:
2089 if (dev_priv->mm.gtt_mtrr >= 0) {
2090 mtrr_del(dev_priv->mm.gtt_mtrr, dev->agp->base,
2091 dev->agp->agp_info.aper_size * 1024 * 1024);
2092 dev_priv->mm.gtt_mtrr = -1;
2093 }
2086 io_mapping_free(dev_priv->mm.gtt_mapping); 2094 io_mapping_free(dev_priv->mm.gtt_mapping);
2087out_rmmap: 2095out_rmmap:
2088 pci_iounmap(dev->pdev, dev_priv->regs); 2096 pci_iounmap(dev->pdev, dev_priv->regs);
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 629d24ca73e2..6ed73ae2133a 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -52,7 +52,7 @@ module_param_named(powersave, i915_powersave, int, 0600);
52unsigned int i915_semaphores = 0; 52unsigned int i915_semaphores = 0;
53module_param_named(semaphores, i915_semaphores, int, 0600); 53module_param_named(semaphores, i915_semaphores, int, 0600);
54 54
55unsigned int i915_enable_rc6 = 1; 55unsigned int i915_enable_rc6 = 0;
56module_param_named(i915_enable_rc6, i915_enable_rc6, int, 0600); 56module_param_named(i915_enable_rc6, i915_enable_rc6, int, 0600);
57 57
58unsigned int i915_enable_fbc = 1; 58unsigned int i915_enable_fbc = 1;
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index c0e0ee63fbf4..39ac2b634ae5 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -165,7 +165,7 @@ void intel_cleanup_ring_buffer(struct intel_ring_buffer *ring);
165int __must_check intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n); 165int __must_check intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n);
166static inline int intel_wait_ring_idle(struct intel_ring_buffer *ring) 166static inline int intel_wait_ring_idle(struct intel_ring_buffer *ring)
167{ 167{
168 return intel_wait_ring_buffer(ring, ring->space - 8); 168 return intel_wait_ring_buffer(ring, ring->size - 8);
169} 169}
170 170
171int __must_check intel_ring_begin(struct intel_ring_buffer *ring, int n); 171int __must_check intel_ring_begin(struct intel_ring_buffer *ring, int n);