summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-04-12 09:01:53 -0700
committerJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-04-12 09:01:53 -0700
commit2160e267ff3e1a503ab7666b60ffe21f4a90b803 (patch)
tree6738af2e1ee123f6011d50efcaec4507245bf9fb
parentc2fce380c26d72f2d7971a4d08076da33c41f5ae (diff)
Don't use drm_setup, do SAREA allocation and mapping directly instead.
-rw-r--r--shared-core/i915_init.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/shared-core/i915_init.c b/shared-core/i915_init.c
index 1a8af0ab..687eaa4b 100644
--- a/shared-core/i915_init.c
+++ b/shared-core/i915_init.c
@@ -114,8 +114,10 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags)
drm_i915_private_t *dev_priv;
drm_i915_init_t init;
drm_buffer_object_t *entry;
+ drm_local_map_t *map;
struct drm_framebuffer *fb;
unsigned long agp_size, prealloc_size;
+ unsigned long sareapage;
int hsize, vsize, bytes_per_pixel, size, ret;
dev_priv = drm_alloc(sizeof(drm_i915_private_t), DRM_MEM_DRIVER);
@@ -155,9 +157,12 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags)
return ret;
}
- ret = drm_setup(dev);
+ /* prebuild the SAREA */
+ sareapage = max(SAREA_MAX, PAGE_SIZE);
+ ret = drm_addmap(dev, 0, sareapage, _DRM_SHM, _DRM_CONTAINS_LOCK,
+ &map);
if (ret) {
- DRM_ERROR("drm_setup failed\n");
+ DRM_ERROR("SAREA setup failed\n");
return ret;
}