Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/gem_cs_prefetch: Fix bdw damage
@ 2013-11-14 14:51 Daniel Vetter
  2013-11-14 15:11 ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2013-11-14 14:51 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Ben Widawsky

Cc: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/gem_cs_prefetch.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tests/gem_cs_prefetch.c b/tests/gem_cs_prefetch.c
index 229a385a2fcd..eb515eadca2e 100644
--- a/tests/gem_cs_prefetch.c
+++ b/tests/gem_cs_prefetch.c
@@ -133,9 +133,6 @@ int main(int argc, char **argv)
 		/* copy the sample batch with the gpu to the new one, so that we
 		 * also test the unmappable part of the gtt. */
 		BLIT_COPY_BATCH_START(batch->devid, 0);
-		OUT_BATCH(XY_SRC_COPY_BLT_CMD |
-			  XY_SRC_COPY_BLT_WRITE_ALPHA |
-			  XY_SRC_COPY_BLT_WRITE_RGB);
 		OUT_BATCH((3 << 24) | /* 32 bits */
 			  (0xcc << 16) | /* copy ROP */
 			  4096);
-- 
1.8.1.4

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

* [PATCH] tests/gem_cs_prefetch: Fix bdw damage
  2013-11-14 14:51 [PATCH] tests/gem_cs_prefetch: Fix bdw damage Daniel Vetter
@ 2013-11-14 15:11 ` Daniel Vetter
  2013-11-14 17:30   ` Ben Widawsky
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2013-11-14 15:11 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Ben Widawsky

v2: Fix more.

Cc: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 lib/intel_batchbuffer.c | 4 +++-
 tests/gem_cs_prefetch.c | 3 ---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index e284d4870cd6..06a543728579 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -239,7 +239,9 @@ intel_blt_copy(struct intel_batchbuffer *batch,
 	       CHECK_RANGE(src_pitch) && CHECK_RANGE(dst_pitch));
 #undef CHECK_RANGE
 
-	BLIT_COPY_BATCH_START(batch->devid, cmd_bits);
+	BEGIN_BATCH(intel_gen(batch->devid) >= 8 ? 10 : 8);
+	OUT_BATCH(XY_SRC_COPY_BLT_CMD | cmd_bits |
+		  (intel_gen(batch->devid) >= 8 ? 8 : 6));
 	OUT_BATCH((br13_bits) |
 		  (0xcc << 16) | /* copy ROP */
 		  dst_pitch);
diff --git a/tests/gem_cs_prefetch.c b/tests/gem_cs_prefetch.c
index 229a385a2fcd..eb515eadca2e 100644
--- a/tests/gem_cs_prefetch.c
+++ b/tests/gem_cs_prefetch.c
@@ -133,9 +133,6 @@ int main(int argc, char **argv)
 		/* copy the sample batch with the gpu to the new one, so that we
 		 * also test the unmappable part of the gtt. */
 		BLIT_COPY_BATCH_START(batch->devid, 0);
-		OUT_BATCH(XY_SRC_COPY_BLT_CMD |
-			  XY_SRC_COPY_BLT_WRITE_ALPHA |
-			  XY_SRC_COPY_BLT_WRITE_RGB);
 		OUT_BATCH((3 << 24) | /* 32 bits */
 			  (0xcc << 16) | /* copy ROP */
 			  4096);
-- 
1.8.1.4

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

* Re: [PATCH] tests/gem_cs_prefetch: Fix bdw damage
  2013-11-14 15:11 ` Daniel Vetter
@ 2013-11-14 17:30   ` Ben Widawsky
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Widawsky @ 2013-11-14 17:30 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Intel Graphics Development

On Thu, Nov 14, 2013 at 04:11:38PM +0100, Daniel Vetter wrote:
> v2: Fix more.
> 
> Cc: Ben Widawsky <ben@bwidawsk.net>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  lib/intel_batchbuffer.c | 4 +++-
>  tests/gem_cs_prefetch.c | 3 ---
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
> index e284d4870cd6..06a543728579 100644
> --- a/lib/intel_batchbuffer.c
> +++ b/lib/intel_batchbuffer.c
> @@ -239,7 +239,9 @@ intel_blt_copy(struct intel_batchbuffer *batch,
>  	       CHECK_RANGE(src_pitch) && CHECK_RANGE(dst_pitch));
>  #undef CHECK_RANGE
>  
> -	BLIT_COPY_BATCH_START(batch->devid, cmd_bits);
> +	BEGIN_BATCH(intel_gen(batch->devid) >= 8 ? 10 : 8);
> +	OUT_BATCH(XY_SRC_COPY_BLT_CMD | cmd_bits |
> +		  (intel_gen(batch->devid) >= 8 ? 8 : 6));
>  	OUT_BATCH((br13_bits) |
>  		  (0xcc << 16) | /* copy ROP */
>  		  dst_pitch);

I'd vote to just move this into the BLIT_COPY_BATCH_START macro. We
already have the devid.

> diff --git a/tests/gem_cs_prefetch.c b/tests/gem_cs_prefetch.c
> index 229a385a2fcd..eb515eadca2e 100644
> --- a/tests/gem_cs_prefetch.c
> +++ b/tests/gem_cs_prefetch.c
> @@ -133,9 +133,6 @@ int main(int argc, char **argv)
>  		/* copy the sample batch with the gpu to the new one, so that we
>  		 * also test the unmappable part of the gtt. */
>  		BLIT_COPY_BATCH_START(batch->devid, 0);
> -		OUT_BATCH(XY_SRC_COPY_BLT_CMD |
> -			  XY_SRC_COPY_BLT_WRITE_ALPHA |
> -			  XY_SRC_COPY_BLT_WRITE_RGB);
>  		OUT_BATCH((3 << 24) | /* 32 bits */
>  			  (0xcc << 16) | /* copy ROP */
>  			  4096);

This hunk was already fixed upstream.

> -- 
> 1.8.1.4
> 

-- 
Ben Widawsky, Intel Open Source Technology Center

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

end of thread, other threads:[~2013-11-14 17:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-14 14:51 [PATCH] tests/gem_cs_prefetch: Fix bdw damage Daniel Vetter
2013-11-14 15:11 ` Daniel Vetter
2013-11-14 17:30   ` Ben Widawsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox