提交 909d9cda 编写于 作者: L Laurent Pinchart 提交者: Dave Airlie

drm: Don't allow page flip to change pixel format

A page flip is not a mode set, changing the frame buffer pixel format
doesn't make sense and isn't handled by most drivers anyway. Disallow
it.
Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 64c026e2
...@@ -3638,6 +3638,12 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev, ...@@ -3638,6 +3638,12 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
goto out; goto out;
} }
if (crtc->fb->pixel_format != fb->pixel_format) {
DRM_DEBUG_KMS("Page flip is not allowed to change frame buffer format.\n");
ret = -EINVAL;
goto out;
}
if (page_flip->flags & DRM_MODE_PAGE_FLIP_EVENT) { if (page_flip->flags & DRM_MODE_PAGE_FLIP_EVENT) {
ret = -ENOMEM; ret = -ENOMEM;
spin_lock_irqsave(&dev->event_lock, flags); spin_lock_irqsave(&dev->event_lock, flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册