drm/amdgpu: add AMDGPU_HW_IP_VCN_JPEG to queue mgr
authorBoyuan Zhang <boyuan.zhang@amd.com>
Tue, 1 May 2018 18:59:12 +0000 (14:59 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 15 Jun 2018 17:20:40 +0000 (12:20 -0500)
Add AMDGPU_HW_IP_VCN_JPEG to queue mgr

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c

index 8af16e81c7d447dc1ee13b5b0227bdfc9100f387..ea9850c9224d620780d90d967099c4c09b8d5de1 100644 (file)
@@ -96,6 +96,9 @@ static int amdgpu_identity_map(struct amdgpu_device *adev,
        case AMDGPU_HW_IP_VCN_ENC:
                *out_ring = &adev->vcn.ring_enc[ring];
                break;
+       case AMDGPU_HW_IP_VCN_JPEG:
+               *out_ring = &adev->vcn.ring_jpeg;
+               break;
        default:
                *out_ring = NULL;
                DRM_ERROR("unknown HW IP type: %d\n", mapper->hw_ip);
@@ -260,6 +263,9 @@ int amdgpu_queue_mgr_map(struct amdgpu_device *adev,
        case AMDGPU_HW_IP_VCN_ENC:
                ip_num_rings = adev->vcn.num_enc_rings;
                break;
+       case AMDGPU_HW_IP_VCN_JPEG:
+               ip_num_rings = 1;
+               break;
        default:
                DRM_DEBUG("unknown ip type: %d\n", hw_ip);
                return -EINVAL;
@@ -287,6 +293,7 @@ int amdgpu_queue_mgr_map(struct amdgpu_device *adev,
        case AMDGPU_HW_IP_UVD_ENC:
        case AMDGPU_HW_IP_VCN_DEC:
        case AMDGPU_HW_IP_VCN_ENC:
+       case AMDGPU_HW_IP_VCN_JPEG:
                r = amdgpu_identity_map(adev, mapper, ring, out_ring);
                break;
        case AMDGPU_HW_IP_DMA: