diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2016-07-21 08:46:55 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-29 14:37:06 -0400 |
commit | 99453a9e814d706d3ccb63deb7879fd9e6681d00 (patch) | |
tree | 70028c052c8a43ce71a448b88b419603b60a9aec /drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | |
parent | 1c62cf91e6ac32346b2dd3bb9d739219a9cc39d0 (diff) |
drm/amdgpu: add destroy session when generate VCE destroy msg.
Signed-off-by: David Mao <David.Mao@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c index 0afa73c82a9f..05865ce35351 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | |||
@@ -477,7 +477,6 @@ int amdgpu_vce_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle, | |||
477 | struct amdgpu_job *job; | 477 | struct amdgpu_job *job; |
478 | struct amdgpu_ib *ib; | 478 | struct amdgpu_ib *ib; |
479 | struct fence *f = NULL; | 479 | struct fence *f = NULL; |
480 | uint64_t dummy; | ||
481 | int i, r; | 480 | int i, r; |
482 | 481 | ||
483 | r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job); | 482 | r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job); |
@@ -485,7 +484,6 @@ int amdgpu_vce_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle, | |||
485 | return r; | 484 | return r; |
486 | 485 | ||
487 | ib = &job->ibs[0]; | 486 | ib = &job->ibs[0]; |
488 | dummy = ib->gpu_addr + 1024; | ||
489 | 487 | ||
490 | /* stitch together an VCE destroy msg */ | 488 | /* stitch together an VCE destroy msg */ |
491 | ib->length_dw = 0; | 489 | ib->length_dw = 0; |
@@ -493,11 +491,14 @@ int amdgpu_vce_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle, | |||
493 | ib->ptr[ib->length_dw++] = 0x00000001; /* session cmd */ | 491 | ib->ptr[ib->length_dw++] = 0x00000001; /* session cmd */ |
494 | ib->ptr[ib->length_dw++] = handle; | 492 | ib->ptr[ib->length_dw++] = handle; |
495 | 493 | ||
496 | ib->ptr[ib->length_dw++] = 0x00000014; /* len */ | 494 | ib->ptr[ib->length_dw++] = 0x00000020; /* len */ |
497 | ib->ptr[ib->length_dw++] = 0x05000005; /* feedback buffer */ | 495 | ib->ptr[ib->length_dw++] = 0x00000002; /* task info */ |
498 | ib->ptr[ib->length_dw++] = upper_32_bits(dummy); | 496 | ib->ptr[ib->length_dw++] = 0xffffffff; /* next task info, set to 0xffffffff if no */ |
499 | ib->ptr[ib->length_dw++] = dummy; | 497 | ib->ptr[ib->length_dw++] = 0x00000001; /* destroy session */ |
500 | ib->ptr[ib->length_dw++] = 0x00000001; | 498 | ib->ptr[ib->length_dw++] = 0x00000000; |
499 | ib->ptr[ib->length_dw++] = 0x00000000; | ||
500 | ib->ptr[ib->length_dw++] = 0xffffffff; /* feedback is not needed, set to 0xffffffff and firmware will not output feedback */ | ||
501 | ib->ptr[ib->length_dw++] = 0x00000000; | ||
501 | 502 | ||
502 | ib->ptr[ib->length_dw++] = 0x00000008; /* len */ | 503 | ib->ptr[ib->length_dw++] = 0x00000008; /* len */ |
503 | ib->ptr[ib->length_dw++] = 0x02000001; /* destroy cmd */ | 504 | ib->ptr[ib->length_dw++] = 0x02000001; /* destroy cmd */ |