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, 13 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c index 6f53cf7fbc50..c3c505244e07 100644 --- a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i915/intel_fb.c | |||
@@ -105,7 +105,11 @@ static int intelfb_create(struct intel_fbdev *ifbdev, | |||
105 | } | 105 | } |
106 | 106 | ||
107 | /* Flush everything out, we'll be doing GTT only from now on */ | 107 | /* Flush everything out, we'll be doing GTT only from now on */ |
108 | i915_gem_object_set_to_gtt_domain(fbo, 1); | 108 | ret = i915_gem_object_set_to_gtt_domain(fbo, 1); |
109 | if (ret) { | ||
110 | DRM_ERROR("failed to bind fb: %d.\n", ret); | ||
111 | goto out_unpin; | ||
112 | } | ||
109 | 113 | ||
110 | info = framebuffer_alloc(0, device); | 114 | info = framebuffer_alloc(0, device); |
111 | if (!info) { | 115 | if (!info) { |
@@ -241,6 +245,7 @@ int intel_fbdev_init(struct drm_device *dev) | |||
241 | { | 245 | { |
242 | struct intel_fbdev *ifbdev; | 246 | struct intel_fbdev *ifbdev; |
243 | drm_i915_private_t *dev_priv = dev->dev_private; | 247 | drm_i915_private_t *dev_priv = dev->dev_private; |
248 | int ret; | ||
244 | 249 | ||
245 | ifbdev = kzalloc(sizeof(struct intel_fbdev), GFP_KERNEL); | 250 | ifbdev = kzalloc(sizeof(struct intel_fbdev), GFP_KERNEL); |
246 | if (!ifbdev) | 251 | if (!ifbdev) |
@@ -249,8 +254,13 @@ int intel_fbdev_init(struct drm_device *dev) | |||
249 | dev_priv->fbdev = ifbdev; | 254 | dev_priv->fbdev = ifbdev; |
250 | ifbdev->helper.funcs = &intel_fb_helper_funcs; | 255 | ifbdev->helper.funcs = &intel_fb_helper_funcs; |
251 | 256 | ||
252 | drm_fb_helper_init(dev, &ifbdev->helper, 2, | 257 | ret = drm_fb_helper_init(dev, &ifbdev->helper, |
253 | INTELFB_CONN_LIMIT); | 258 | dev_priv->num_pipe, |
259 | INTELFB_CONN_LIMIT); | ||
260 | if (ret) { | ||
261 | kfree(ifbdev); | ||
262 | return ret; | ||
263 | } | ||
254 | 264 | ||
255 | drm_fb_helper_single_add_all_connectors(&ifbdev->helper); | 265 | drm_fb_helper_single_add_all_connectors(&ifbdev->helper); |
256 | drm_fb_helper_initial_config(&ifbdev->helper, 32); | 266 | drm_fb_helper_initial_config(&ifbdev->helper, 32); |