[Intel-gfx] [PATCH 1/4] drm: Add struct drm_region and assorted utility functions
Ville Syrjälä
ville.syrjala at linux.intel.com
Wed Mar 6 12:10:51 CET 2013
On Wed, Mar 06, 2013 at 10:56:05AM +0000, Chris Wilson wrote:
> On Thu, Feb 21, 2013 at 11:35:00PM +0200, ville.syrjala at linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> >
> > struct drm_region represents a two dimensional region. 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).
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> My criticisms here are mainly that the function names are different than
> what I am used to for a region API. Namely drm_region_clip,
> drm_region_subsample would more conventionally be drm_region_intersect,
> drm_region_downscale. And that a region to me is an ordered list of
> rectangles, whereas here you just have a single rectangle.
I'm fine with renaming stuff. Ideally the names should be so obvious
that people never have to look at the documentation.
--
Ville Syrjälä
Intel OTC
More information about the Intel-gfx
mailing list