diff options
author | Leo Liu <leo.liu@amd.com> | 2015-11-17 10:30:02 -0500 |
---|---|---|
committer | Samuel Li <Samuel.Li@amd.com> | 2015-11-25 15:19:41 -0500 |
commit | 659d4f6c8cc2a3710da8063193687511ac4940ed (patch) | |
tree | 1acb0f6211a237f57f10ef02f858f447e7e81893 | |
parent | 18d456af57c443aa78291597924fda52d2839f88 (diff) |
drm/amdgpu: adapt vce session create interface changesamd-15.31
Signed-off-by: Leo Liu <leo.liu@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c index a48be38ebe37..6d66d1273cef 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c @@ -371,7 +371,10 @@ int amdgpu_vce_get_create_msg(struct amdgpu_ring *ring, uint32_t handle, ib.ptr[ib.length_dw++] = 0x00000001; /* session cmd */ ib.ptr[ib.length_dw++] = handle; - ib.ptr[ib.length_dw++] = 0x00000030; /* len */ + if ((ring->adev->vce.fw_version >> 24) >= 52) + ib.ptr[ib.length_dw++] = 0x00000040; /* len */ + else + ib.ptr[ib.length_dw++] = 0x00000030; /* len */ ib.ptr[ib.length_dw++] = 0x01000001; /* create cmd */ ib.ptr[ib.length_dw++] = 0x00000000; ib.ptr[ib.length_dw++] = 0x00000042; @@ -383,6 +386,12 @@ int amdgpu_vce_get_create_msg(struct amdgpu_ring *ring, uint32_t handle, ib.ptr[ib.length_dw++] = 0x00000100; ib.ptr[ib.length_dw++] = 0x0000000c; ib.ptr[ib.length_dw++] = 0x00000000; + if ((ring->adev->vce.fw_version >> 24) >= 52) { + ib.ptr[ib.length_dw++] = 0x00000000; + ib.ptr[ib.length_dw++] = 0x00000000; + ib.ptr[ib.length_dw++] = 0x00000000; + ib.ptr[ib.length_dw++] = 0x00000000; + } ib.ptr[ib.length_dw++] = 0x00000014; /* len */ ib.ptr[ib.length_dw++] = 0x05000005; /* feedback buffer */ |