From: Adam Cheney Subject: Clipping src and crtc rectangles for SetCrtc and SetPlane Date: Thu, 4 Dec 2014 20:27:41 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1124775283==" Return-path: Received: from hqemgate14.nvidia.com (hqemgate14.nvidia.com [216.228.121.143]) by gabe.freedesktop.org (Postfix) with ESMTP id 52F216E0CF for ; Thu, 4 Dec 2014 12:27:43 -0800 (PST) Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org --===============1124775283== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_abc52b36511d49419d5e757c6894840cHQMAIL107nvidiacom_" --_000_abc52b36511d49419d5e757c6894840cHQMAIL107nvidiacom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi dri-devel, I have a question about validating the user specified rectangles in SetCr= tc and SetPlane. To me this is required for src_ or crtc_ rectangles to be legal, true for= =20both 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 in= dividual 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 m= ode, should DRM drivers perform the mode clipping themselves, or should t= his 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 i= n the individual drivers? Thanks, -Adam -------------------------------------------------------------------------= ---------- This email message is for the sole use of the intended recipient(s) and m= ay contain confidential information. Any unauthorized review, use, disclosure or di= stribution is prohibited. If you are not the intended recipient, please contact the= =20sender by reply email and destroy all copies of the original message. -------------------------------------------------------------------------= ---------- --_000_abc52b36511d49419d5e757c6894840cHQMAIL107nvidiacom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable =

Hi dri-devel,

 

I have a question about validating the user specif= ied rectangles in SetCrtc and SetPlane.

 

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

 

1)    &n= bsp; src_{x,y,w,h} fits entirely within the fb size

2)    &n= bsp; crtc_{x,y,w,h} fits entirely within the mode size=

 

There is some common code that enforces 1), but 2)= =20appears 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 t= he connector’s active mode, should DRM drivers perform the mode cli= pping 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=20 contain confidential information.  Any unauthorized review, use, dis= closure=20 or distribution is prohibited.  If you are not the intended recipien= t,=20 please contact the sender by reply email and destroy all copies of the or= iginal=20 message.

--_000_abc52b36511d49419d5e757c6894840cHQMAIL107nvidiacom_-- --===============1124775283== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1124775283==--