All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mun, Gwan-gyeong" <gwan-gyeong.mun@intel.com>
To: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Souza, Jose" <jose.souza@intel.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v9 1/5] drm: Add function to convert rect in 16.16 fixed format to regular format
Date: Mon, 21 Dec 2020 10:45:14 +0000	[thread overview]
Message-ID: <b713c416c19e577482dd6407d6cbfb40364c25a8.camel@intel.com> (raw)
In-Reply-To: <20201218184701.111857-1-jose.souza@intel.com>

On Fri, 2020-12-18 at 10:46 -0800, José Roberto de Souza wrote:
> Much more clear to read one function call than four lines doing this
> conversion.
> 
> v7:
> - function renamed
> - calculating width and height before truncate
> - inlined
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: dri-devel@lists.freedesktop.org
> Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
>  include/drm/drm_rect.h | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/include/drm/drm_rect.h b/include/drm/drm_rect.h
> index e7f4d24cdd00..7eb84af4a818 100644
> --- a/include/drm/drm_rect.h
> +++ b/include/drm/drm_rect.h
> @@ -206,6 +206,19 @@ static inline bool drm_rect_equals(const struct
> drm_rect *r1,
>  		r1->y1 == r2->y1 && r1->y2 == r2->y2;
>  }
>  
> +/**
> + * drm_rect_fp_to_int - Convert a rect in 16.16 fixed point form to
> int form.
> + * @destination: rect to be stored the converted value
> + * @source: rect in 16.16 fixed point form
> + */
> +static inline void drm_rect_fp_to_int(struct drm_rect *destination,
> +				      const struct drm_rect *source)
other drm_rect functions use input parameter names as src, dst.
( ex. drm_rect_clip_scaled(), drm_rect_calc_hscale(),
drm_rect_calc_vscale() )
if the names change to src and dst, other parts seem good to me.
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> +{
> +	drm_rect_init(destination, source->x1 >> 16, source->y1 >> 16,
> +		      drm_rect_width(source) >> 16,
> +		      drm_rect_height(source) >> 16);
> +}
> +
>  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);
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID
From: "Mun, Gwan-gyeong" <gwan-gyeong.mun@intel.com>
To: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Souza, Jose" <jose.souza@intel.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH v9 1/5] drm: Add function to convert rect in 16.16 fixed format to regular format
Date: Mon, 21 Dec 2020 10:45:14 +0000	[thread overview]
Message-ID: <b713c416c19e577482dd6407d6cbfb40364c25a8.camel@intel.com> (raw)
In-Reply-To: <20201218184701.111857-1-jose.souza@intel.com>

On Fri, 2020-12-18 at 10:46 -0800, José Roberto de Souza wrote:
> Much more clear to read one function call than four lines doing this
> conversion.
> 
> v7:
> - function renamed
> - calculating width and height before truncate
> - inlined
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: dri-devel@lists.freedesktop.org
> Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
>  include/drm/drm_rect.h | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/include/drm/drm_rect.h b/include/drm/drm_rect.h
> index e7f4d24cdd00..7eb84af4a818 100644
> --- a/include/drm/drm_rect.h
> +++ b/include/drm/drm_rect.h
> @@ -206,6 +206,19 @@ static inline bool drm_rect_equals(const struct
> drm_rect *r1,
>  		r1->y1 == r2->y1 && r1->y2 == r2->y2;
>  }
>  
> +/**
> + * drm_rect_fp_to_int - Convert a rect in 16.16 fixed point form to
> int form.
> + * @destination: rect to be stored the converted value
> + * @source: rect in 16.16 fixed point form
> + */
> +static inline void drm_rect_fp_to_int(struct drm_rect *destination,
> +				      const struct drm_rect *source)
other drm_rect functions use input parameter names as src, dst.
( ex. drm_rect_clip_scaled(), drm_rect_calc_hscale(),
drm_rect_calc_vscale() )
if the names change to src and dst, other parts seem good to me.
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> +{
> +	drm_rect_init(destination, source->x1 >> 16, source->y1 >> 16,
> +		      drm_rect_width(source) >> 16,
> +		      drm_rect_height(source) >> 16);
> +}
> +
>  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);
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2020-12-21 10:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 18:46 José Roberto de Souza
2020-12-18 18:46 ` [Intel-gfx] " José Roberto de Souza
2020-12-18 18:46 ` [Intel-gfx] [PATCH v9 2/5] drm/i915/display/psr: Use plane damage clips to calculate damaged area José Roberto de Souza
2020-12-23 11:53   ` Mun, Gwan-gyeong
2020-12-18 18:46 ` [Intel-gfx] [PATCH v9 3/5] drm/i915/display: Split and export main surface calculation from skl_check_main_surface() José Roberto de Souza
2020-12-18 18:47 ` [Intel-gfx] [PATCH v9 4/5] drm/i915/display/psr: Program plane's calculated offset to plane SF register José Roberto de Souza
2020-12-18 18:47 ` [Intel-gfx] [PATCH v9 5/5] HAX/DO_NOT_MERGE_IT: drm/i915/display: Enable PSR2 selective fetch for testing José Roberto de Souza
2020-12-18 20:56 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [v9,1/5] drm: Add function to convert rect in 16.16 fixed format to regular format Patchwork
2020-12-18 21:24 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2020-12-21 10:45 ` Mun, Gwan-gyeong [this message]
2020-12-21 10:45   ` [Intel-gfx] [PATCH v9 1/5] " Mun, Gwan-gyeong
2020-12-23 14:48 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [v9,1/5] drm: Add function to convert rect in 16.16 fixed format to regular format (rev2) Patchwork

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=b713c416c19e577482dd6407d6cbfb40364c25a8.camel@intel.com \
    --to=gwan-gyeong.mun@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jose.souza@intel.com \
    --subject='Re: [PATCH v9 1/5] drm: Add function to convert rect in 16.16 fixed format to regular format' \
    /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

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.