From: Daniel Vetter <daniel.vet...@ffwll.ch> Just the usual paranoia ...
v2: Fixed format strings. (Tvrtko Ursulin) Signed-off-by: Daniel Vetter <daniel.vet...@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursu...@intel.com> --- drivers/gpu/drm/drm_crtc.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index e6e2de3..61e7163 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -3269,6 +3269,23 @@ static int framebuffer_check(const struct drm_mode_fb_cmd2 *r) } } + for (; i < 4; i++) { + if (r->handles[i]) { + DRM_DEBUG_KMS("buffer object handle for unused plane %d\n", i); + return -EINVAL; + } + + if (r->pitches[i] || r->offsets[i]) { + DRM_DEBUG_KMS("buffer pitch/offset for unused plane %d", i); + return -EINVAL; + } + + if (r->modifier[i]) { + DRM_DEBUG_KMS("fb modifer for unused plane %d", i); + return -EINVAL; + } + } + return 0; } -- 2.2.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx