summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuijing Dong <ruijing.dong@amd.com>2023-05-09 11:19:34 -0400
committerLeo Liu <leo.liu@amd.com>2023-05-11 11:09:32 -0400
commit03d18b44db345b754759adacf602b2b3575b5339 (patch)
tree76629074e85b6af1c5052206ba4728b450a1cd57
parent28d9a3c4fb4c99aafc31b288b3f735e19e728d64 (diff)
downloaddrm-03d18b44db345b754759adacf602b2b3575b5339.tar.gz
tests/amdgpu/vcn: change vbv_buffer name to input
It is input buffer instead of vbv_buffer. Correct its name. Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
-rw-r--r--tests/amdgpu/vcn_tests.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/amdgpu/vcn_tests.c b/tests/amdgpu/vcn_tests.c
index 5e20fb65..0fdb55dd 100644
--- a/tests/amdgpu/vcn_tests.c
+++ b/tests/amdgpu/vcn_tests.c
@@ -1267,7 +1267,7 @@ static void check_result(struct amdgpu_vcn_bo fb_buf, struct amdgpu_vcn_bo bs_bu
static void amdgpu_cs_vcn_enc_encode_frame(int frame_type)
{
- struct amdgpu_vcn_bo bs_buf, fb_buf, vbv_buf;
+ struct amdgpu_vcn_bo bs_buf, fb_buf, input_buf;
int len, r, i;
unsigned width = 160, height = 128, buf_size;
uint32_t *p_task_size = NULL;
@@ -1288,12 +1288,12 @@ static void amdgpu_cs_vcn_enc_encode_frame(int frame_type)
num_resources = 0;
alloc_resource(&bs_buf, 4096, AMDGPU_GEM_DOMAIN_GTT);
alloc_resource(&fb_buf, 4096, AMDGPU_GEM_DOMAIN_GTT);
- alloc_resource(&vbv_buf, buf_size, AMDGPU_GEM_DOMAIN_GTT);
+ alloc_resource(&input_buf, buf_size, AMDGPU_GEM_DOMAIN_GTT);
resources[num_resources++] = enc_buf.handle;
resources[num_resources++] = cpb_buf.handle;
resources[num_resources++] = bs_buf.handle;
resources[num_resources++] = fb_buf.handle;
- resources[num_resources++] = vbv_buf.handle;
+ resources[num_resources++] = input_buf.handle;
resources[num_resources++] = ib_handle;
@@ -1305,13 +1305,13 @@ static void amdgpu_cs_vcn_enc_encode_frame(int frame_type)
memset(fb_buf.ptr, 0, 4096);
r = amdgpu_bo_cpu_unmap(fb_buf.handle);
- r = amdgpu_bo_cpu_map(vbv_buf.handle, (void **)&vbv_buf.ptr);
+ r = amdgpu_bo_cpu_map(input_buf.handle, (void **)&input_buf.ptr);
CU_ASSERT_EQUAL(r, 0);
for (int i = 0; i < ALIGN(height, 32) * 3 / 2; i++)
- memcpy(vbv_buf.ptr + i * ALIGN(width, 256), frame + i * width, width);
+ memcpy(input_buf.ptr + i * ALIGN(width, 256), frame + i * width, width);
- r = amdgpu_bo_cpu_unmap(vbv_buf.handle);
+ r = amdgpu_bo_cpu_unmap(input_buf.handle);
CU_ASSERT_EQUAL(r, 0);
len = 0;
@@ -1412,10 +1412,10 @@ static void amdgpu_cs_vcn_enc_encode_frame(int frame_type)
ib_cpu[len++] = 0x0000000f; /* RENCODE_IB_PARAM_ENCODE_PARAMS vcn 2,3*/
ib_cpu[len++] = frame_type;
ib_cpu[len++] = 0x0001f000;
- ib_cpu[len++] = vbv_buf.addr >> 32;
- ib_cpu[len++] = vbv_buf.addr;
- ib_cpu[len++] = (vbv_buf.addr + ALIGN(width, 256) * ALIGN(height, 32)) >> 32;
- ib_cpu[len++] = vbv_buf.addr + ALIGN(width, 256) * ALIGN(height, 32);
+ ib_cpu[len++] = input_buf.addr >> 32;
+ ib_cpu[len++] = input_buf.addr;
+ ib_cpu[len++] = (input_buf.addr + ALIGN(width, 256) * ALIGN(height, 32)) >> 32;
+ ib_cpu[len++] = input_buf.addr + ALIGN(width, 256) * ALIGN(height, 32);
ib_cpu[len++] = 0x00000100;
ib_cpu[len++] = 0x00000080;
ib_cpu[len++] = 0x00000000;
@@ -1564,7 +1564,7 @@ static void amdgpu_cs_vcn_enc_encode_frame(int frame_type)
free_resource(&fb_buf);
free_resource(&bs_buf);
- free_resource(&vbv_buf);
+ free_resource(&input_buf);
}
static void amdgpu_cs_vcn_enc_encode(void)