Clipping src and crtc rectangles for SetCrtc and SetPlane

Adam Cheney acheney at nvidia.com
Thu Dec 4 12:27:41 PST 2014


Hi dri-devel,

I have a question about validating the user specified rectangles in SetCrtc and SetPlane.

To me this is required for src_ or crtc_ rectangles to be legal, true for both SetCrtc and SetPlane:


1)      src_{x,y,w,h} fits entirely within the fb size

2)      crtc_{x,y,w,h} fits entirely within the mode size

There is some common code that enforces 1), but 2) appears to be up to individual drivers to enforce (if they choose to) as far as I can tell.

If the crtc_ output rectangle extends outside of the connector's active mode, should DRM drivers perform the mode clipping themselves, or should this be considered an application bug and an error code returned?

Is there any reason not to enforce 2) in the core DRM code, rather than in the individual drivers?

Thanks,

-Adam


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141204/dfa30f2b/attachment.html>


More information about the dri-devel mailing list