aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/intel_display.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 3a03c62496d3..adce19304eee 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5371,8 +5371,25 @@ int intel_framebuffer_init(struct drm_device *dev,
5371 struct drm_mode_fb_cmd *mode_cmd, 5371 struct drm_mode_fb_cmd *mode_cmd,
5372 struct drm_gem_object *obj) 5372 struct drm_gem_object *obj)
5373{ 5373{
5374 struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
5374 int ret; 5375 int ret;
5375 5376
5377 if (obj_priv->tiling_mode == I915_TILING_Y)
5378 return -EINVAL;
5379
5380 if (mode_cmd->pitch & 63)
5381 return -EINVAL;
5382
5383 switch (mode_cmd->bpp) {
5384 case 8:
5385 case 16:
5386 case 24:
5387 case 32:
5388 break;
5389 default:
5390 return -EINVAL;
5391 }
5392
5376 ret = drm_framebuffer_init(dev, &intel_fb->base, &intel_fb_funcs); 5393 ret = drm_framebuffer_init(dev, &intel_fb->base, &intel_fb_funcs);
5377 if (ret) { 5394 if (ret) {
5378 DRM_ERROR("framebuffer init failed %d\n", ret); 5395 DRM_ERROR("framebuffer init failed %d\n", ret);