[PATCH 06/17] drm/amdgpu: add vcn jpeg enc irq support
boyuan.zhang at amd.com
boyuan.zhang at amd.com
Thu Jul 4 16:04:18 UTC 2019
From: Boyuan Zhang <boyuan.zhang at amd.com>
Add irq support for jpeg encode ring.
Signed-off-by: Boyuan Zhang <boyuan.zhang at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
---
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
index 82a91f73e175..767f8ce92875 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
@@ -152,6 +152,13 @@ static int vcn_v2_0_sw_init(void *handle)
if (r)
return r;
+ /* VCN JPEG ENC TRAP */
+ r = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_VCN,
+ VCN_2_0__SRCID__JPEG_ENCODE,
+ &adev->vcn.irq);
+ if (r)
+ return r;
+
r = amdgpu_vcn_sw_init(adev);
if (r)
return r;
@@ -1965,6 +1972,9 @@ static int vcn_v2_0_process_interrupt(struct amdgpu_device *adev,
case VCN_2_0__SRCID__JPEG_DECODE:
amdgpu_fence_process(&adev->vcn.ring_jpeg);
break;
+ case VCN_2_0__SRCID__JPEG_ENCODE:
+ amdgpu_fence_process(&adev->vcn.ring_jpeg_enc);
+ break;
default:
DRM_ERROR("Unhandled interrupt: %d %d\n",
entry->src_id, entry->src_data[0]);
@@ -2175,7 +2185,7 @@ static const struct amdgpu_irq_src_funcs vcn_v2_0_irq_funcs = {
static void vcn_v2_0_set_irq_funcs(struct amdgpu_device *adev)
{
- adev->vcn.irq.num_types = adev->vcn.num_enc_rings + 2;
+ adev->vcn.irq.num_types = adev->vcn.num_enc_rings + 3;
adev->vcn.irq.funcs = &vcn_v2_0_irq_funcs;
}
--
2.17.1
More information about the amd-gfx
mailing list