summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorLeo Liu <leo.liu@amd.com>2017-02-21 11:24:09 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-05-24 17:41:45 -0400
commitf93aa00c0bdc85ebd9ace72e34997cf4ba56e839 (patch)
tree8b1aa5781f4b3ebcbc929440666f87ff17374143 /drivers/gpu/drm/amd/amdgpu
parentcefbc5989f63d37a8cafc6ccf198d67075aa914b (diff)
downloadtalos-obmc-linux-f93aa00c0bdc85ebd9ace72e34997cf4ba56e839.tar.gz
talos-obmc-linux-f93aa00c0bdc85ebd9ace72e34997cf4ba56e839.zip
drm/amdgpu: get cs support for AMDGPU_HW_IP_VCN_ENC
Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 60948a7bd247..1375a896e87b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -94,6 +94,15 @@ int amdgpu_cs_get_ring(struct amdgpu_device *adev, u32 ip_type,
case AMDGPU_HW_IP_VCN_DEC:
*out_ring = &adev->vcn.ring_dec;
break;
+ case AMDGPU_HW_IP_VCN_ENC:
+ if (ring < adev->vcn.num_enc_rings){
+ *out_ring = &adev->vcn.ring_enc[ring];
+ } else {
+ DRM_ERROR("only %d VCN ENC rings are supported\n",
+ adev->vcn.num_enc_rings);
+ return -EINVAL;
+ }
+ break;
}
if (!(*out_ring && (*out_ring)->adev)) {
OpenPOWER on IntegriCloud