diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2015-11-06 01:29:08 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-01-11 09:52:57 -0500 |
commit | 5f2323658e4829ffb893553297e64795a90cbcd9 (patch) | |
tree | 7862a0b646c43f8e525eca9a98e2705bdd0bbb77 /drivers/gpu/drm/amd/amdgpu/cik_ih.c | |
parent | ba228ac8f512c9cd09cb4245c424ab1632da0c24 (diff) |
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/cik_ih.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/cik_ih.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/cik_ih.c b/drivers/gpu/drm/amd/amdgpu/cik_ih.c index 8993c50cb89f..30c9b3beeef9 100644 --- a/drivers/gpu/drm/amd/amdgpu/cik_ih.c +++ b/drivers/gpu/drm/amd/amdgpu/cik_ih.c | |||
@@ -274,6 +274,11 @@ static void cik_ih_set_rptr(struct amdgpu_device *adev) | |||
274 | static int cik_ih_early_init(void *handle) | 274 | static int cik_ih_early_init(void *handle) |
275 | { | 275 | { |
276 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 276 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
277 | int ret; | ||
278 | |||
279 | ret = amdgpu_irq_add_domain(adev); | ||
280 | if (ret) | ||
281 | return ret; | ||
277 | 282 | ||
278 | cik_ih_set_interrupt_funcs(adev); | 283 | cik_ih_set_interrupt_funcs(adev); |
279 | 284 | ||
@@ -300,6 +305,7 @@ static int cik_ih_sw_fini(void *handle) | |||
300 | 305 | ||
301 | amdgpu_irq_fini(adev); | 306 | amdgpu_irq_fini(adev); |
302 | amdgpu_ih_ring_fini(adev); | 307 | amdgpu_ih_ring_fini(adev); |
308 | amdgpu_irq_remove_domain(adev); | ||
303 | 309 | ||
304 | return 0; | 310 | return 0; |
305 | } | 311 | } |