drm/i915: Allocate fbcon from stolen memory
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 15 Nov 2012 11:32:27 +0000 (11:32 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 30 Nov 2012 22:38:46 +0000 (23:38 +0100)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Acked-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_fb.c

index 7b30b5c..b7773e5 100644 (file)
@@ -83,7 +83,9 @@ static int intelfb_create(struct intel_fbdev *ifbdev,
 
        size = mode_cmd.pitches[0] * mode_cmd.height;
        size = ALIGN(size, PAGE_SIZE);
-       obj = i915_gem_alloc_object(dev, size);
+       obj = i915_gem_object_create_stolen(dev, size);
+       if (obj == NULL)
+               obj = i915_gem_alloc_object(dev, size);
        if (!obj) {
                DRM_ERROR("failed to allocate framebuffer\n");
                ret = -ENOMEM;