igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/rendercopy: Fix lack of const throughout gen4 rendercopy
@ 2018-07-20 17:07 Chris Wilson
  2018-07-20 17:37 ` Ville Syrjälä
  2018-07-20 21:21 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2018-07-20 17:07 UTC (permalink / raw)
  To: igt-dev

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>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] lib/rendercopy: Fix lack of const throughout gen4 rendercopy
  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ä
  2018-07-20 21:21 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Ville Syrjälä @ 2018-07-20 17:37 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [igt-dev] ✗ Fi.CI.BAT: failure for lib/rendercopy: Fix lack of const throughout gen4 rendercopy
  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ä
@ 2018-07-20 21:21 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2018-07-20 21:21 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: lib/rendercopy: Fix lack of const throughout gen4 rendercopy
URL   : https://patchwork.freedesktop.org/series/46975/
State : failure

== Summary ==

Series 46975 revision 1 was fully merged or fully failed: no git log

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-20 21:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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ä
2018-07-20 21:21 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork

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).