diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_fb.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_fb.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c index 2b0fe54cd92c..8a0b3bcdc7b1 100644 --- a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i915/intel_fb.c | |||
@@ -30,11 +30,11 @@ | |||
30 | #include <linux/string.h> | 30 | #include <linux/string.h> |
31 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
32 | #include <linux/tty.h> | 32 | #include <linux/tty.h> |
33 | #include <linux/slab.h> | ||
34 | #include <linux/sysrq.h> | 33 | #include <linux/sysrq.h> |
35 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
36 | #include <linux/fb.h> | 35 | #include <linux/fb.h> |
37 | #include <linux/init.h> | 36 | #include <linux/init.h> |
37 | #include <linux/vga_switcheroo.h> | ||
38 | 38 | ||
39 | #include "drmP.h" | 39 | #include "drmP.h" |
40 | #include "drm.h" | 40 | #include "drm.h" |
@@ -70,7 +70,7 @@ static struct drm_fb_helper_funcs intel_fb_helper_funcs = { | |||
70 | 70 | ||
71 | 71 | ||
72 | /** | 72 | /** |
73 | * Curretly it is assumed that the old framebuffer is reused. | 73 | * Currently it is assumed that the old framebuffer is reused. |
74 | * | 74 | * |
75 | * LOCKING | 75 | * LOCKING |
76 | * caller should hold the mode config lock. | 76 | * caller should hold the mode config lock. |
@@ -144,11 +144,11 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width, | |||
144 | ret = -ENOMEM; | 144 | ret = -ENOMEM; |
145 | goto out; | 145 | goto out; |
146 | } | 146 | } |
147 | obj_priv = fbo->driver_private; | 147 | obj_priv = to_intel_bo(fbo); |
148 | 148 | ||
149 | mutex_lock(&dev->struct_mutex); | 149 | mutex_lock(&dev->struct_mutex); |
150 | 150 | ||
151 | ret = i915_gem_object_pin(fbo, PAGE_SIZE); | 151 | ret = i915_gem_object_pin(fbo, 64*1024); |
152 | if (ret) { | 152 | if (ret) { |
153 | DRM_ERROR("failed to pin fb: %d\n", ret); | 153 | DRM_ERROR("failed to pin fb: %d\n", ret); |
154 | goto out_unref; | 154 | goto out_unref; |
@@ -230,10 +230,12 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width, | |||
230 | par->intel_fb = intel_fb; | 230 | par->intel_fb = intel_fb; |
231 | 231 | ||
232 | /* To allow resizeing without swapping buffers */ | 232 | /* To allow resizeing without swapping buffers */ |
233 | DRM_DEBUG("allocated %dx%d fb: 0x%08x, bo %p\n", intel_fb->base.width, | 233 | DRM_DEBUG_KMS("allocated %dx%d fb: 0x%08x, bo %p\n", |
234 | intel_fb->base.height, obj_priv->gtt_offset, fbo); | 234 | intel_fb->base.width, intel_fb->base.height, |
235 | obj_priv->gtt_offset, fbo); | ||
235 | 236 | ||
236 | mutex_unlock(&dev->struct_mutex); | 237 | mutex_unlock(&dev->struct_mutex); |
238 | vga_switcheroo_client_fb_set(dev->pdev, info); | ||
237 | return 0; | 239 | return 0; |
238 | 240 | ||
239 | out_unpin: | 241 | out_unpin: |
@@ -249,7 +251,7 @@ int intelfb_probe(struct drm_device *dev) | |||
249 | { | 251 | { |
250 | int ret; | 252 | int ret; |
251 | 253 | ||
252 | DRM_DEBUG("\n"); | 254 | DRM_DEBUG_KMS("\n"); |
253 | ret = drm_fb_helper_single_fb_probe(dev, 32, intelfb_create); | 255 | ret = drm_fb_helper_single_fb_probe(dev, 32, intelfb_create); |
254 | return ret; | 256 | return ret; |
255 | } | 257 | } |