]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amdgpu/vg20:Enable the 2nd instance IRQ for uvd 7.2
authorJames Zhu <James.Zhu@amd.com>
Tue, 24 Apr 2018 00:56:01 +0000 (20:56 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 18 May 2018 21:08:13 +0000 (16:08 -0500)
For Vega20, the 2nd instance uvd IRQ using different client id.
Enable the 2nd instance IRQ for uvd 7.2

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c

index 6b719e11b2cdd7e73e51ed2a0e7662529695dd47..f9a5482101bcb4a0763fa28819b42fb39624bf1e 100644 (file)
@@ -49,6 +49,11 @@ static int uvd_v7_0_start(struct amdgpu_device *adev);
 static void uvd_v7_0_stop(struct amdgpu_device *adev);
 static int uvd_v7_0_sriov_start(struct amdgpu_device *adev);
 
+static int amdgpu_ih_clientid_uvds[] = {
+       SOC15_IH_CLIENTID_UVD,
+       SOC15_IH_CLIENTID_UVD1
+};
+
 /**
  * uvd_v7_0_ring_get_rptr - get read pointer
  *
@@ -397,13 +402,13 @@ static int uvd_v7_0_sw_init(void *handle)
 
        for (j = 0; j < adev->uvd.num_uvd_inst; j++) {
                /* UVD TRAP */
-               r = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_UVD, 124, &adev->uvd.inst[j].irq);
+               r = amdgpu_irq_add_id(adev, amdgpu_ih_clientid_uvds[j], 124, &adev->uvd.inst[j].irq);
                if (r)
                        return r;
 
                /* UVD ENC TRAP */
                for (i = 0; i < adev->uvd.num_enc_rings; ++i) {
-                       r = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_UVD, i + 119, &adev->uvd.inst[j].irq);
+                       r = amdgpu_irq_add_id(adev, amdgpu_ih_clientid_uvds[j], i + 119, &adev->uvd.inst[j].irq);
                        if (r)
                                return r;
                }
@@ -1480,6 +1485,9 @@ static int uvd_v7_0_process_interrupt(struct amdgpu_device *adev,
        case SOC15_IH_CLIENTID_UVD:
                ip_instance = 0;
                break;
+       case SOC15_IH_CLIENTID_UVD1:
+               ip_instance = 1;
+               break;
        default:
                DRM_ERROR("Unhandled client id: %d\n", entry->client_id);
                return 0;