aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-08-19 23:38:04 -0400
committerDave Airlie <airlied@redhat.com>2009-08-19 23:38:04 -0400
commit51c8b4071d84d46cc100baa5931ad06b2a823c95 (patch)
tree098cf9d41ce1c548d922708a770a9efe35e434df /drivers/gpu/drm/i915/i915_dma.c
parenta987fcaa805fcb24ba885c2e29fd4fdb6816f08f (diff)
parent6c30c53fd5ae6a99a23ad78e90c428d2c8ffb07f (diff)
Merge Linus master to drm-next
linux-next conflict reported needed resolution. Conflicts: drivers/gpu/drm/drm_crtc.c drivers/gpu/drm/drm_edid.c drivers/gpu/drm/i915/intel_sdvo.c drivers/gpu/drm/radeon/radeon_ttm.c drivers/gpu/drm/ttm/ttm_bo.c
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 14625e146f18..544d889b9b16 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1181,6 +1181,13 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1181 if (ret) 1181 if (ret)
1182 goto out_iomapfree; 1182 goto out_iomapfree;
1183 1183
1184 dev_priv->wq = create_workqueue("i915");
1185 if (dev_priv->wq == NULL) {
1186 DRM_ERROR("Failed to create our workqueue.\n");
1187 ret = -ENOMEM;
1188 goto out_iomapfree;
1189 }
1190
1184 /* enable GEM by default */ 1191 /* enable GEM by default */
1185 dev_priv->has_gem = 1; 1192 dev_priv->has_gem = 1;
1186 1193
@@ -1206,7 +1213,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1206 if (!I915_NEED_GFX_HWS(dev)) { 1213 if (!I915_NEED_GFX_HWS(dev)) {
1207 ret = i915_init_phys_hws(dev); 1214 ret = i915_init_phys_hws(dev);
1208 if (ret != 0) 1215 if (ret != 0)
1209 goto out_iomapfree; 1216 goto out_workqueue_free;
1210 } 1217 }
1211 1218
1212 i915_get_mem_freq(dev); 1219 i915_get_mem_freq(dev);
@@ -1240,7 +1247,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1240 ret = i915_load_modeset_init(dev, prealloc_size, agp_size); 1247 ret = i915_load_modeset_init(dev, prealloc_size, agp_size);
1241 if (ret < 0) { 1248 if (ret < 0) {
1242 DRM_ERROR("failed to init modeset\n"); 1249 DRM_ERROR("failed to init modeset\n");
1243 goto out_rmmap; 1250 goto out_workqueue_free;
1244 } 1251 }
1245 } 1252 }
1246 1253
@@ -1251,6 +1258,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1251 1258
1252 return 0; 1259 return 0;
1253 1260
1261out_workqueue_free:
1262 destroy_workqueue(dev_priv->wq);
1254out_iomapfree: 1263out_iomapfree:
1255 io_mapping_free(dev_priv->mm.gtt_mapping); 1264 io_mapping_free(dev_priv->mm.gtt_mapping);
1256out_rmmap: 1265out_rmmap:
@@ -1264,6 +1273,8 @@ int i915_driver_unload(struct drm_device *dev)
1264{ 1273{
1265 struct drm_i915_private *dev_priv = dev->dev_private; 1274 struct drm_i915_private *dev_priv = dev->dev_private;
1266 1275
1276 destroy_workqueue(dev_priv->wq);
1277
1267 io_mapping_free(dev_priv->mm.gtt_mapping); 1278 io_mapping_free(dev_priv->mm.gtt_mapping);
1268 if (dev_priv->mm.gtt_mtrr >= 0) { 1279 if (dev_priv->mm.gtt_mtrr >= 0) {
1269 mtrr_del(dev_priv->mm.gtt_mtrr, dev->agp->base, 1280 mtrr_del(dev_priv->mm.gtt_mtrr, dev->agp->base,