From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH v4] drm: Add struct drm_rect and assorted utility functions Date: Mon, 8 Apr 2013 14:11:56 +0300 Message-ID: <20130408111156.GF4469@intel.com> References: <8128127.OV61LSCs9m@avalon> <1365167976-15451-1-git-send-email-ville.syrjala@linux.intel.com> <1829021.moR8pyskht@avalon> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <1829021.moR8pyskht@avalon> 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: Laurent Pinchart Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Sat, Apr 06, 2013 at 02:00:31AM +0200, Laurent Pinchart wrote: > 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/ Fixed. > = > > + * %true if rectangle @dst is still visible after being clipped, > > + * %false otherwise > > + */ > = > Otherwise, > = > Reviewed-by: Laurent Pinchart Thank you very much. -- = Ville Syrj=E4l=E4 Intel OTC