diff mbox

[1/4] tests/amdgpu: expand write/copy tests to compute

Message ID 1463158112-28625-1-git-send-email-alexander.deucher@amd.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Deucher May 13, 2016, 4:48 p.m. UTC
Uses same packets as gfx.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 tests/amdgpu/basic_tests.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

Christian König May 13, 2016, 6:51 p.m. UTC | #1
Am 13.05.2016 um 18:48 schrieb Alex Deucher:
> Uses same packets as gfx.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

For the series Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   tests/amdgpu/basic_tests.c | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c
> index 599c090..05ab145 100644
> --- a/tests/amdgpu/basic_tests.c
> +++ b/tests/amdgpu/basic_tests.c
> @@ -813,7 +813,8 @@ static void amdgpu_command_submission_write_linear_helper(unsigned ip_type)
>   			pm4[i++] = sdma_write_length;
>   			while(j++ < sdma_write_length)
>   				pm4[i++] = 0xdeadbeaf;
> -		} else if (ip_type == AMDGPU_HW_IP_GFX) {
> +		} else if ((ip_type == AMDGPU_HW_IP_GFX) ||
> +			   (ip_type == AMDGPU_HW_IP_COMPUTE)) {
>   			pm4[i++] = PACKET3(PACKET3_WRITE_DATA, 2 + sdma_write_length);
>   			pm4[i++] = WRITE_DATA_DST_SEL(5) | WR_CONFIRM;
>   			pm4[i++] = 0xfffffffc & bo_mc;
> @@ -911,7 +912,8 @@ static void amdgpu_command_submission_const_fill_helper(unsigned ip_type)
>   			pm4[i++] = (0xffffffff00000000 & bo_mc) >> 32;
>   			pm4[i++] = 0xdeadbeaf;
>   			pm4[i++] = sdma_write_length;
> -		} else if (ip_type == AMDGPU_HW_IP_GFX) {
> +		} else if ((ip_type == AMDGPU_HW_IP_GFX) ||
> +			   (ip_type == AMDGPU_HW_IP_COMPUTE)) {
>   			pm4[i++] = PACKET3(PACKET3_DMA_DATA, 5);
>   			pm4[i++] = PACKET3_DMA_DATA_ENGINE(0) |
>   				PACKET3_DMA_DATA_DST_SEL(0) |
> @@ -1030,7 +1032,8 @@ static void amdgpu_command_submission_copy_linear_helper(unsigned ip_type)
>   				pm4[i++] = (0xffffffff00000000 & bo1_mc) >> 32;
>   				pm4[i++] = 0xffffffff & bo2_mc;
>   				pm4[i++] = (0xffffffff00000000 & bo2_mc) >> 32;
> -			} else if (ip_type == AMDGPU_HW_IP_GFX) {
> +			} else if ((ip_type == AMDGPU_HW_IP_GFX) ||
> +				   (ip_type == AMDGPU_HW_IP_COMPUTE)) {
>   				pm4[i++] = PACKET3(PACKET3_DMA_DATA, 5);
>   				pm4[i++] = PACKET3_DMA_DATA_ENGINE(0) |
>   					PACKET3_DMA_DATA_DST_SEL(0) |
diff mbox

Patch

diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c
index 599c090..05ab145 100644
--- a/tests/amdgpu/basic_tests.c
+++ b/tests/amdgpu/basic_tests.c
@@ -813,7 +813,8 @@  static void amdgpu_command_submission_write_linear_helper(unsigned ip_type)
 			pm4[i++] = sdma_write_length;
 			while(j++ < sdma_write_length)
 				pm4[i++] = 0xdeadbeaf;
-		} else if (ip_type == AMDGPU_HW_IP_GFX) {
+		} else if ((ip_type == AMDGPU_HW_IP_GFX) ||
+			   (ip_type == AMDGPU_HW_IP_COMPUTE)) {
 			pm4[i++] = PACKET3(PACKET3_WRITE_DATA, 2 + sdma_write_length);
 			pm4[i++] = WRITE_DATA_DST_SEL(5) | WR_CONFIRM;
 			pm4[i++] = 0xfffffffc & bo_mc;
@@ -911,7 +912,8 @@  static void amdgpu_command_submission_const_fill_helper(unsigned ip_type)
 			pm4[i++] = (0xffffffff00000000 & bo_mc) >> 32;
 			pm4[i++] = 0xdeadbeaf;
 			pm4[i++] = sdma_write_length;
-		} else if (ip_type == AMDGPU_HW_IP_GFX) {
+		} else if ((ip_type == AMDGPU_HW_IP_GFX) ||
+			   (ip_type == AMDGPU_HW_IP_COMPUTE)) {
 			pm4[i++] = PACKET3(PACKET3_DMA_DATA, 5);
 			pm4[i++] = PACKET3_DMA_DATA_ENGINE(0) |
 				PACKET3_DMA_DATA_DST_SEL(0) |
@@ -1030,7 +1032,8 @@  static void amdgpu_command_submission_copy_linear_helper(unsigned ip_type)
 				pm4[i++] = (0xffffffff00000000 & bo1_mc) >> 32;
 				pm4[i++] = 0xffffffff & bo2_mc;
 				pm4[i++] = (0xffffffff00000000 & bo2_mc) >> 32;
-			} else if (ip_type == AMDGPU_HW_IP_GFX) {
+			} else if ((ip_type == AMDGPU_HW_IP_GFX) ||
+				   (ip_type == AMDGPU_HW_IP_COMPUTE)) {
 				pm4[i++] = PACKET3(PACKET3_DMA_DATA, 5);
 				pm4[i++] = PACKET3_DMA_DATA_ENGINE(0) |
 					PACKET3_DMA_DATA_DST_SEL(0) |