Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123453
b: refs/heads/master
c: aa59662
h: refs/heads/master
i:
  123451: c257eae
v: v3
  • Loading branch information
Dave Airlie committed Dec 29, 2008
1 parent 1610ee4 commit 682e7d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aad87dff5acb232666932e750318ec1fdb716e79
refs/heads/master: aa5966296675a5092505f68d72563d5939a92353
22 changes: 12 additions & 10 deletions trunk/drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,12 @@ static int i915_load_modeset_init(struct drm_device *dev)
int fb_bar = IS_I9XX(dev) ? 2 : 0;
int ret = 0;

dev->devname = kstrdup(DRIVER_NAME, GFP_KERNEL);
if (!dev->devname) {
ret = -ENOMEM;
goto out;
}

dev->mode_config.fb_base = drm_get_resource_start(dev, fb_bar) &
0xff000000;

Expand All @@ -917,7 +923,9 @@ static int i915_load_modeset_init(struct drm_device *dev)
else
dev_priv->cursor_needs_physical = false;

i915_probe_agp(dev, &agp_size, &prealloc_size);
ret = i915_probe_agp(dev, &agp_size, &prealloc_size);
if (ret)
goto kfree_devname;

/* Basic memrange allocator for stolen space (aka vram) */
drm_mm_init(&dev_priv->vram, 0, prealloc_size);
Expand All @@ -927,7 +935,7 @@ static int i915_load_modeset_init(struct drm_device *dev)

ret = i915_gem_init_ringbuffer(dev);
if (ret)
goto out;
goto kfree_devname;

dev_priv->mm.gtt_mapping =
io_mapping_create_wc(dev->agp->base,
Expand Down Expand Up @@ -966,18 +974,12 @@ static int i915_load_modeset_init(struct drm_device *dev)

drm_helper_initial_config(dev, false);

dev->devname = kstrdup(DRIVER_NAME, GFP_KERNEL);
if (!dev->devname) {
ret = -ENOMEM;
goto modeset_cleanup;
}

return 0;

modeset_cleanup:
intel_modeset_cleanup(dev);
destroy_ringbuffer:
i915_gem_cleanup_ringbuffer(dev);
kfree_devname:
kfree(dev->devname);
out:
return ret;
}
Expand Down

0 comments on commit 682e7d1

Please sign in to comment.