diff options
author | Leo Liu <leo.liu@amd.com> | 2017-02-05 12:40:30 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-05-24 17:41:33 -0400 |
commit | 2d8a425bf6edb7177e7dadecc78dcae75852ee9e (patch) | |
tree | 593cad980280b428af4176c5cc925a695249e1ae /drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | |
parent | a4c424c5c633bfe381d16c4342777513dc5a91b4 (diff) |
drm/amdgpu/vcn: implement ib tests with new message buffer interface
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c index e1493c18f97b..14be7614c9b3 100644 --- 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(struct amdgpu_ring *ring, uint32_t hand | |||
373 | return r; | 373 | return r; |
374 | } | 374 | } |
375 | 375 | ||
376 | /* stitch together an vcn create msg */ | 376 | msg[0] = cpu_to_le32(0x00000028); |
377 | msg[0] = cpu_to_le32(0x00000de4); | 377 | msg[1] = cpu_to_le32(0x0000004c); |
378 | msg[1] = cpu_to_le32(0x00000000); | 378 | msg[2] = cpu_to_le32(0x00000001); |
379 | msg[2] = cpu_to_le32(handle); | ||
380 | msg[3] = cpu_to_le32(0x00000000); | 379 | msg[3] = cpu_to_le32(0x00000000); |
381 | msg[4] = cpu_to_le32(0x00000000); | 380 | msg[4] = cpu_to_le32(handle); |
382 | msg[5] = cpu_to_le32(0x00000000); | 381 | msg[5] = cpu_to_le32(0x00000000); |
383 | msg[6] = cpu_to_le32(0x00000000); | 382 | msg[6] = cpu_to_le32(0x00000001); |
384 | msg[7] = cpu_to_le32(0x00000780); | 383 | msg[7] = cpu_to_le32(0x00000028); |
385 | msg[8] = cpu_to_le32(0x00000440); | 384 | msg[8] = cpu_to_le32(0x00000024); |
386 | msg[9] = cpu_to_le32(0x00000000); | 385 | msg[9] = cpu_to_le32(0x00000000); |
387 | msg[10] = cpu_to_le32(0x01b37000); | 386 | msg[10] = cpu_to_le32(0x00000007); |
388 | for (i = 11; i < 1024; ++i) | 387 | msg[11] = cpu_to_le32(0x00000000); |
388 | msg[12] = cpu_to_le32(0x00000000); | ||
389 | msg[13] = cpu_to_le32(0x00000780); | ||
390 | msg[14] = cpu_to_le32(0x00000440); | ||
391 | msg[15] = cpu_to_le32(0x00000000); | ||
392 | msg[16] = cpu_to_le32(0x01b37000); | ||
393 | msg[17] = cpu_to_le32(0x00000000); | ||
394 | msg[18] = cpu_to_le32(0x00000000); | ||
395 | for (i = 19; i < 1024; ++i) | ||
389 | msg[i] = cpu_to_le32(0x0); | 396 | msg[i] = cpu_to_le32(0x0); |
390 | 397 | ||
391 | amdgpu_bo_kunmap(bo); | 398 | amdgpu_bo_kunmap(bo); |
@@ -423,12 +430,13 @@ static int amdgpu_vcn_dec_get_destroy_msg(struct amdgpu_ring *ring, uint32_t han | |||
423 | return r; | 430 | return r; |
424 | } | 431 | } |
425 | 432 | ||
426 | /* stitch together an vcn destroy msg */ | 433 | msg[0] = cpu_to_le32(0x00000028); |
427 | msg[0] = cpu_to_le32(0x00000de4); | 434 | msg[1] = cpu_to_le32(0x00000018); |
428 | msg[1] = cpu_to_le32(0x00000002); | 435 | msg[2] = cpu_to_le32(0x00000000); |
429 | msg[2] = cpu_to_le32(handle); | 436 | msg[3] = cpu_to_le32(0x00000002); |
430 | msg[3] = cpu_to_le32(0x00000000); | 437 | msg[4] = cpu_to_le32(handle); |
431 | for (i = 4; i < 1024; ++i) | 438 | msg[5] = cpu_to_le32(0x00000000); |
439 | for (i = 6; i < 1024; ++i) | ||
432 | msg[i] = cpu_to_le32(0x0); | 440 | msg[i] = cpu_to_le32(0x0); |
433 | 441 | ||
434 | amdgpu_bo_kunmap(bo); | 442 | amdgpu_bo_kunmap(bo); |