From: Leo Liu <leo.liu@amd.com>
Date: Sun, 5 Feb 2017 12:40:30 -0500
Subject: drm/amdgpu/vcn: implement ib tests with new message buffer interface
Git-commit: 2d8a425bf6edb7177e7dadecc78dcae75852ee9e
Patch-mainline: v4.13-rc1
References: FATE#326289 FATE#326079 FATE#326049 FATE#322398 FATE#326166
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Petr Tesarik <ptesarik@suse.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 40 +++++++++++++++++++-------------
1 file changed, 24 insertions(+), 16 deletions(-)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
@@ -373,19 +373,26 @@ static int amdgpu_vcn_dec_get_create_msg
return r;
}
- /* stitch together an vcn create msg */
- msg[0] = cpu_to_le32(0x00000de4);
- msg[1] = cpu_to_le32(0x00000000);
- msg[2] = cpu_to_le32(handle);
+ msg[0] = cpu_to_le32(0x00000028);
+ msg[1] = cpu_to_le32(0x0000004c);
+ msg[2] = cpu_to_le32(0x00000001);
msg[3] = cpu_to_le32(0x00000000);
- msg[4] = cpu_to_le32(0x00000000);
+ msg[4] = cpu_to_le32(handle);
msg[5] = cpu_to_le32(0x00000000);
- msg[6] = cpu_to_le32(0x00000000);
- msg[7] = cpu_to_le32(0x00000780);
- msg[8] = cpu_to_le32(0x00000440);
+ msg[6] = cpu_to_le32(0x00000001);
+ msg[7] = cpu_to_le32(0x00000028);
+ msg[8] = cpu_to_le32(0x00000024);
msg[9] = cpu_to_le32(0x00000000);
- msg[10] = cpu_to_le32(0x01b37000);
- for (i = 11; i < 1024; ++i)
+ msg[10] = cpu_to_le32(0x00000007);
+ msg[11] = cpu_to_le32(0x00000000);
+ msg[12] = cpu_to_le32(0x00000000);
+ msg[13] = cpu_to_le32(0x00000780);
+ msg[14] = cpu_to_le32(0x00000440);
+ msg[15] = cpu_to_le32(0x00000000);
+ msg[16] = cpu_to_le32(0x01b37000);
+ msg[17] = cpu_to_le32(0x00000000);
+ msg[18] = cpu_to_le32(0x00000000);
+ for (i = 19; i < 1024; ++i)
msg[i] = cpu_to_le32(0x0);
amdgpu_bo_kunmap(bo);
@@ -423,12 +430,13 @@ static int amdgpu_vcn_dec_get_destroy_ms
return r;
}
- /* stitch together an vcn destroy msg */
- msg[0] = cpu_to_le32(0x00000de4);
- msg[1] = cpu_to_le32(0x00000002);
- msg[2] = cpu_to_le32(handle);
- msg[3] = cpu_to_le32(0x00000000);
- for (i = 4; i < 1024; ++i)
+ msg[0] = cpu_to_le32(0x00000028);
+ msg[1] = cpu_to_le32(0x00000018);
+ msg[2] = cpu_to_le32(0x00000000);
+ msg[3] = cpu_to_le32(0x00000002);
+ msg[4] = cpu_to_le32(handle);
+ msg[5] = cpu_to_le32(0x00000000);
+ for (i = 6; i < 1024; ++i)
msg[i] = cpu_to_le32(0x0);
amdgpu_bo_kunmap(bo);