summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2015-11-06 07:29:08 +0100
committerAlex Deucher <alexander.deucher@amd.com>2016-01-11 15:52:57 +0100
commit5f2323658e4829ffb893553297e64795a90cbcd9 (patch)
tree7862a0b646c43f8e525eca9a98e2705bdd0bbb77 /drivers/gpu/drm/amd/amdgpu/tonga_ih.c
parentdrm/amdgpu/cgs: add an interface to access PCI resources (diff)
downloadlinux-5f2323658e4829ffb893553297e64795a90cbcd9.tar.xz
linux-5f2323658e4829ffb893553297e64795a90cbcd9.zip
drm/amdgpu: add irq domain support
Hardware blocks on the GPU like ACP generate interrupts in the GPU interrupt controller, but are driven by a separate driver. Add an irq domain to the GPU driver so that blocks like ACP can register a Linux interrupt. Acked-by: Dave Airlie <airlied@redhat.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/tonga_ih.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/tonga_ih.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c b/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
index 743c372837aa..b6f7d7bff929 100644
--- a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
@@ -273,8 +273,14 @@ static void tonga_ih_set_rptr(struct amdgpu_device *adev)
static int tonga_ih_early_init(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+ int ret;
+
+ ret = amdgpu_irq_add_domain(adev);
+ if (ret)
+ return ret;
tonga_ih_set_interrupt_funcs(adev);
+
return 0;
}
@@ -301,6 +307,7 @@ static int tonga_ih_sw_fini(void *handle)
amdgpu_irq_fini(adev);
amdgpu_ih_ring_fini(adev);
+ amdgpu_irq_add_domain(adev);
return 0;
}