From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 2/4] drm: Add drm_rect_calc_{hscale, vscale}() utility functions
Date: Tue, 16 Apr 2013 17:14:14 +0300 [thread overview]
Message-ID: <20130416141413.GJ4469@intel.com> (raw)
In-Reply-To: <20130416134234.GB13387@cantiga.alporthouse.com>
On Tue, Apr 16, 2013 at 02:42:34PM +0100, Chris Wilson wrote:
> On Tue, Apr 16, 2013 at 01:47:20PM +0300, ville.syrjala@linux.intel.com wrote:
> > diff --git a/include/drm/drm_rect.h b/include/drm/drm_rect.h
> > index 2b7278c..de24f16 100644
> > --- a/include/drm/drm_rect.h
> > +++ b/include/drm/drm_rect.h
> > @@ -128,5 +128,17 @@ bool drm_rect_intersect(struct drm_rect *r, const struct drm_rect *clip);
> > bool drm_rect_clip_scaled(struct drm_rect *src, struct drm_rect *dst,
> > const struct drm_rect *clip,
> > int hscale, int vscale);
> > +int drm_rect_calc_hscale(const struct drm_rect *src,
> > + const struct drm_rect *dst,
> > + int min_hscale, int max_hscale);
> > +int drm_rect_calc_vscale(const struct drm_rect *src,
> > + const struct drm_rect *dst,
> > + int min_vscale, int max_vscale);
> > +int drm_rect_calc_hscale_relaxed(struct drm_rect *src,
> > + struct drm_rect *dst,
> > + int min_hscale, int max_hscale);
> > +int drm_rect_calc_vscale_relaxed(struct drm_rect *src,
> > + struct drm_rect *dst,
> > + int min_vscale, int max_vscale);
>
> These struct drm_rect *src should be const so it is clear that dst is
> being manipulated.
Actually they can manipulate either src or dst, depending on whether
we're trying upscale or downscale too much. The idea being that we
can only decrease the size of either rect, never increase.
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2013-04-16 14:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 10:47 [PATCH] drm: drm_rect and clipping for intel sprite planes ville.syrjala
2013-04-16 10:47 ` [PATCH v5 1/4] drm: Add struct drm_rect and assorted utility functions ville.syrjala
2013-04-16 10:47 ` [PATCH v3 2/4] drm: Add drm_rect_calc_{hscale, vscale}() " ville.syrjala
2013-04-16 13:42 ` Chris Wilson
2013-04-16 14:14 ` Ville Syrjälä [this message]
2013-04-16 14:49 ` Chris Wilson
2013-04-16 15:16 ` Ville Syrjälä
2013-04-16 15:27 ` Chris Wilson
2013-04-19 8:04 ` [PATCH 1/3] drm: Add drm_rect_equals() ville.syrjala
2013-04-19 8:04 ` [PATCH v4 2/3] drm/i915: Implement proper clipping for video sprites ville.syrjala
2013-04-19 8:04 ` [PATCH 3/3] drm/i915: Relax the sprite scaling limits checks ville.syrjala
2013-04-16 10:47 ` [PATCH v3 3/4] drm: Add drm_rect_debug_print() ville.syrjala
2013-04-16 10:47 ` [PATCH v3 4/4] drm/i915: Implement proper clipping for video sprites ville.syrjala
2013-04-16 13:37 ` Chris Wilson
2013-04-16 14:20 ` Ville Syrjälä
-- strict thread matches above, loose matches on Subject: below --
2013-03-27 15:46 [PATCH v3 1/4] drm: Add struct drm_rect and assorted utility functions ville.syrjala
2013-03-27 15:46 ` [PATCH v3 2/4] drm: Add drm_rect_calc_{hscale, vscale}() " ville.syrjala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130416141413.GJ4469@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.