From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Pinchart Subject: Re: [PATCH v4] drm: Add struct drm_rect and assorted utility functions Date: Sat, 06 Apr 2013 02:00:31 +0200 Message-ID: <1829021.moR8pyskht@avalon> References: <8128127.OV61LSCs9m@avalon> <1365167976-15451-1-git-send-email-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1365167976-15451-1-git-send-email-ville.syrjala@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: ville.syrjala@linux.intel.com Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Hi Ville, Thanks for the patch. On Friday 05 April 2013 16:19:36 ville.syrjala@linux.intel.com wrote: > From: Ville Syrj=E4l=E4 > = > struct drm_rect represents a simple rectangle. The utility > functions are there to help driver writers. > = > v2: Moved the region stuff into its own file, made the smaller funcs > static inline, used 64bit maths in the scaled clipping function to > avoid overflows (instead it will saturate to INT_MIN or INT_MAX). > v3: Renamed drm_region to drm_rect, drm_region_clip to > drm_rect_intersect, and drm_region_subsample to drm_rect_downscale. > v4: Renamed some function parameters, improve kernel-doc comments a bit, > and actually generate documentation for drm_rect.[ch]. > = > Signed-off-by: Ville Syrj=E4l=E4 > --- > Documentation/DocBook/drm.tmpl | 2 + > drivers/gpu/drm/Makefile | 3 +- > drivers/gpu/drm/drm_rect.c | 96 ++++++++++++++++++++++++++++++ > include/drm/drm_rect.h | 132 +++++++++++++++++++++++++++++++++++= +++ > 4 files changed, 232 insertions(+), 1 deletion(-) > create mode 100644 drivers/gpu/drm/drm_rect.c > create mode 100644 include/drm/drm_rect.h [snip] > diff --git a/drivers/gpu/drm/drm_rect.c b/drivers/gpu/drm/drm_rect.c > new file mode 100644 > index 0000000..a9861bd > --- /dev/null > +++ b/drivers/gpu/drm/drm_rect.c [snip] > +/** > + * drm_rect_clip_scaled - perform a scaled clip operation > + * @src: source window rectangle > + * @dst: destination window rectangle > + * @clip: clip rectangle > + * @hscale: horizontal scaling factor > + * @vscale: vertical scaling factor > + * > + * Clip rectangle @dst by rectangle @clip. Clip rectangle @src by the > + * same amounts multiplied by @hscale and @vscale. > + * > + * RETUTRNS: s/RETUTRNS/RETURNS/ > + * %true if rectangle @dst is still visible after being clipped, > + * %false otherwise > + */ Otherwise, Reviewed-by: Laurent Pinchart -- = Regards, Laurent Pinchart