igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] lib/rendercopy: Fix lack of const throughout gen4 rendercopy
Date: Fri, 20 Jul 2018 20:37:15 +0300	[thread overview]
Message-ID: <20180720173715.GR5565@intel.com> (raw)
In-Reply-To: <20180720170743.379-1-chris@chris-wilson.co.uk>

On Fri, Jul 20, 2018 at 06:07:43PM +0100, Chris Wilson wrote:
> The gen4 code was pushed without being fixed up for the constification
> of igt_render_copyfunc_t
> 
> ../lib/intel_batchbuffer.c: In function ‘igt_get_render_copyfunc’:
> ../lib/intel_batchbuffer.c:837:8: warning: assignment to ‘igt_render_copyfunc_t’ {aka ‘void (*)(struct intel_batchbuffer *, struct _drm_intel_context *, const struct igt_buf *, unsigned int,  unsigned int,  unsigned int,  unsigned int,  const struct igt_buf *, unsigned int,  unsigned int)’} from incompatible pointer type ‘void (*)(struct intel_batchbuffer *, drm_intel_context *, struct igt_buf *, unsigned int,  unsigned int,  unsigned int,  unsigned int,  struct igt_buf *, unsigned int,  unsigned int)’ {aka ‘void (*)(struct intel_batchbuffer *, struct _drm_intel_context *, struct igt_buf *, unsigned int,  unsigned int,  unsigned int,  unsigned int,  struct igt_buf *, unsigned int,  unsigned int)’} [-Wincompatible-pointer-types]
>    copy = gen4_render_copyfunc;
> 
> Fixes: 61370b2d43db ("lib/rendercopy: Add gen4/5 rendercopy")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  lib/rendercopy.h      |  4 ++--
>  lib/rendercopy_gen4.c | 14 ++++++++------
>  2 files changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/lib/rendercopy.h b/lib/rendercopy.h
> index 2eb67b21a..d1bb6284e 100644
> --- a/lib/rendercopy.h
> +++ b/lib/rendercopy.h
> @@ -45,9 +45,9 @@ void gen6_render_copyfunc(struct intel_batchbuffer *batch,
>  			  const struct igt_buf *dst, unsigned dst_x, unsigned dst_y);
>  void gen4_render_copyfunc(struct intel_batchbuffer *batch,
>  			  drm_intel_context *context,
> -			  struct igt_buf *src, unsigned src_x, unsigned src_y,
> +			  const struct igt_buf *src, unsigned src_x, unsigned src_y,
>  			  unsigned width, unsigned height,
> -			  struct igt_buf *dst, unsigned dst_x, unsigned dst_y);
> +			  const struct igt_buf *dst, unsigned dst_x, unsigned dst_y);
>  void gen3_render_copyfunc(struct intel_batchbuffer *batch,
>  			  drm_intel_context *context,
>  			  const struct igt_buf *src, unsigned src_x, unsigned src_y,
> diff --git a/lib/rendercopy_gen4.c b/lib/rendercopy_gen4.c
> index 5cf150ec5..0416b8d6d 100644
> --- a/lib/rendercopy_gen4.c
> +++ b/lib/rendercopy_gen4.c
> @@ -135,7 +135,7 @@ gen4_render_flush(struct intel_batchbuffer *batch,
>  
>  static uint32_t
>  gen4_bind_buf(struct intel_batchbuffer *batch,
> -	      struct igt_buf *buf,
> +	      const struct igt_buf *buf,
>  	      uint32_t format, int is_dst)
>  {
>  	struct gen4_surface_state *ss;
> @@ -175,8 +175,8 @@ gen4_bind_buf(struct intel_batchbuffer *batch,
>  
>  static uint32_t
>  gen4_bind_surfaces(struct intel_batchbuffer *batch,
> -		   struct igt_buf *src,
> -		   struct igt_buf *dst)
> +		   const struct igt_buf *src,
> +		   const struct igt_buf *dst)
>  {
>  	uint32_t *binding_table;
>  
> @@ -415,7 +415,7 @@ gen4_emit_binding_table(struct intel_batchbuffer *batch,
>  
>  static void
>  gen4_emit_drawing_rectangle(struct intel_batchbuffer *batch,
> -			    struct igt_buf *dst)
> +			    const struct igt_buf *dst)
>  {
>  	OUT_BATCH(GEN4_3DSTATE_DRAWING_RECTANGLE | (4 - 2));
>  	OUT_BATCH(0);
> @@ -638,9 +638,11 @@ static uint32_t gen4_emit_primitive(struct intel_batchbuffer *batch)
>  
>  void gen4_render_copyfunc(struct intel_batchbuffer *batch,
>  			  drm_intel_context *context,
> -			  struct igt_buf *src, unsigned src_x, unsigned src_y,
> +			  const struct igt_buf *src,
> +			  unsigned src_x, unsigned src_y,
>  			  unsigned width, unsigned height,
> -			  struct igt_buf *dst, unsigned dst_x, unsigned dst_y)
> +			  const struct igt_buf *dst,
> +			  unsigned dst_x, unsigned dst_y)
>  {
>  	uint32_t cc, cc_vp;
>  	uint32_t wm, wm_sampler, wm_kernel, wm_table;
> -- 
> 2.18.0
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2018-07-20 17:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-20 17:07 [igt-dev] [PATCH i-g-t] lib/rendercopy: Fix lack of const throughout gen4 rendercopy Chris Wilson
2018-07-20 17:37 ` Ville Syrjälä [this message]
2018-07-20 21:21 ` [igt-dev] ✗ Fi.CI.BAT: failure for " 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=20180720173715.GR5565@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).