diff options
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_fb.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c b/drivers/gpu/drm/omapdrm/omap_fb.c index ad202dfc1a49..481512db2656 100644 --- a/drivers/gpu/drm/omapdrm/omap_fb.c +++ b/drivers/gpu/drm/omapdrm/omap_fb.c | |||
@@ -449,6 +449,14 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev, | |||
449 | goto fail; | 449 | goto fail; |
450 | } | 450 | } |
451 | 451 | ||
452 | if (i > 0 && pitch != mode_cmd->pitches[i - 1]) { | ||
453 | dev_err(dev->dev, | ||
454 | "pitches are not the same between framebuffer planes %d != %d\n", | ||
455 | pitch, mode_cmd->pitches[i - 1]); | ||
456 | ret = -EINVAL; | ||
457 | goto fail; | ||
458 | } | ||
459 | |||
452 | plane->bo = bos[i]; | 460 | plane->bo = bos[i]; |
453 | plane->offset = mode_cmd->offsets[i]; | 461 | plane->offset = mode_cmd->offsets[i]; |
454 | plane->pitch = pitch; | 462 | plane->pitch = pitch; |