diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index 85cc667cfb0f..fcbbf3884781 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c @@ -550,6 +550,10 @@ nv50_display_flip_next(struct drm_crtc *crtc, struct drm_framebuffer *fb, u32 *push; int ret; + if (crtc->primary->fb->width != fb->width || + crtc->primary->fb->height != fb->height) + return -EINVAL; + swap_interval <<= 4; if (swap_interval == 0) swap_interval |= 0x100;