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/amdgpu_irq.h | |
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/amdgpu_irq.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h index 17b01aef4278..e124b59f39c1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #ifndef __AMDGPU_IRQ_H__ | 24 | #ifndef __AMDGPU_IRQ_H__ |
25 | #define __AMDGPU_IRQ_H__ | 25 | #define __AMDGPU_IRQ_H__ |
26 | 26 | ||
27 | #include <linux/irqdomain.h> | ||
27 | #include "amdgpu_ih.h" | 28 | #include "amdgpu_ih.h" |
28 | 29 | ||
29 | #define AMDGPU_MAX_IRQ_SRC_ID 0x100 | 30 | #define AMDGPU_MAX_IRQ_SRC_ID 0x100 |
@@ -65,6 +66,10 @@ struct amdgpu_irq { | |||
65 | /* interrupt ring */ | 66 | /* interrupt ring */ |
66 | struct amdgpu_ih_ring ih; | 67 | struct amdgpu_ih_ring ih; |
67 | const struct amdgpu_ih_funcs *ih_funcs; | 68 | const struct amdgpu_ih_funcs *ih_funcs; |
69 | |||
70 | /* gen irq stuff */ | ||
71 | struct irq_domain *domain; /* GPU irq controller domain */ | ||
72 | unsigned virq[AMDGPU_MAX_IRQ_SRC_ID]; | ||
68 | }; | 73 | }; |
69 | 74 | ||
70 | void amdgpu_irq_preinstall(struct drm_device *dev); | 75 | void amdgpu_irq_preinstall(struct drm_device *dev); |
@@ -90,4 +95,8 @@ int amdgpu_irq_put(struct amdgpu_device *adev, struct amdgpu_irq_src *src, | |||
90 | bool amdgpu_irq_enabled(struct amdgpu_device *adev, struct amdgpu_irq_src *src, | 95 | bool amdgpu_irq_enabled(struct amdgpu_device *adev, struct amdgpu_irq_src *src, |
91 | unsigned type); | 96 | unsigned type); |
92 | 97 | ||
98 | int amdgpu_irq_add_domain(struct amdgpu_device *adev); | ||
99 | void amdgpu_irq_remove_domain(struct amdgpu_device *adev); | ||
100 | unsigned amdgpu_irq_create_mapping(struct amdgpu_device *adev, unsigned src_id); | ||
101 | |||
93 | #endif | 102 | #endif |