mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
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>
This commit is contained in:
parent
1c62cf91e6
commit
99453a9e81
1 changed files with 8 additions and 7 deletions
|
@ -477,7 +477,6 @@ int amdgpu_vce_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
|
||||||
struct amdgpu_job *job;
|
struct amdgpu_job *job;
|
||||||
struct amdgpu_ib *ib;
|
struct amdgpu_ib *ib;
|
||||||
struct fence *f = NULL;
|
struct fence *f = NULL;
|
||||||
uint64_t dummy;
|
|
||||||
int i, r;
|
int i, r;
|
||||||
|
|
||||||
r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job);
|
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,
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
ib = &job->ibs[0];
|
ib = &job->ibs[0];
|
||||||
dummy = ib->gpu_addr + 1024;
|
|
||||||
|
|
||||||
/* stitch together an VCE destroy msg */
|
/* stitch together an VCE destroy msg */
|
||||||
ib->length_dw = 0;
|
ib->length_dw = 0;
|
||||||
|
@ -493,11 +491,14 @@ int amdgpu_vce_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
|
||||||
ib->ptr[ib->length_dw++] = 0x00000001; /* session cmd */
|
ib->ptr[ib->length_dw++] = 0x00000001; /* session cmd */
|
||||||
ib->ptr[ib->length_dw++] = handle;
|
ib->ptr[ib->length_dw++] = handle;
|
||||||
|
|
||||||
ib->ptr[ib->length_dw++] = 0x00000014; /* len */
|
ib->ptr[ib->length_dw++] = 0x00000020; /* len */
|
||||||
ib->ptr[ib->length_dw++] = 0x05000005; /* feedback buffer */
|
ib->ptr[ib->length_dw++] = 0x00000002; /* task info */
|
||||||
ib->ptr[ib->length_dw++] = upper_32_bits(dummy);
|
ib->ptr[ib->length_dw++] = 0xffffffff; /* next task info, set to 0xffffffff if no */
|
||||||
ib->ptr[ib->length_dw++] = dummy;
|
ib->ptr[ib->length_dw++] = 0x00000001; /* destroy session */
|
||||||
ib->ptr[ib->length_dw++] = 0x00000001;
|
ib->ptr[ib->length_dw++] = 0x00000000;
|
||||||
|
ib->ptr[ib->length_dw++] = 0x00000000;
|
||||||
|
ib->ptr[ib->length_dw++] = 0xffffffff; /* feedback is not needed, set to 0xffffffff and firmware will not output feedback */
|
||||||
|
ib->ptr[ib->length_dw++] = 0x00000000;
|
||||||
|
|
||||||
ib->ptr[ib->length_dw++] = 0x00000008; /* len */
|
ib->ptr[ib->length_dw++] = 0x00000008; /* len */
|
||||||
ib->ptr[ib->length_dw++] = 0x02000001; /* destroy cmd */
|
ib->ptr[ib->length_dw++] = 0x02000001; /* destroy cmd */
|
||||||
|
|
Loading…
Reference in a new issue