aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorXiangliang Yu <Xiangliang.Yu@amd.com>2016-12-23 02:00:01 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-01-27 11:13:03 -0500
commit4e638ae9c1e7a2b85155f2dd91c8105ce109ea7e (patch)
tree13a53a5ba7500024bce122f4ad102aec3151b9ca /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parentb64a18c502fedab9e7b8b1b557909994637972c5 (diff)
drm/amdgpu/gfx8: add support kernel interface queue(KIQ)
KIQ is queue-memory based initialization method: setup KIQ queue firstly, then send command to KIQ to setup other queues, without accessing registers. For virtualization, need KIQ to access virtual function registers when running on guest mode. V2: use amdgpu_bo_create/free_kernel to allocate BO. Signed-off-by: Monk Liu <Monk.Liu@amd.com> Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index e8fbd7a791d3..b5ad548e2503 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -183,6 +183,11 @@ enum amdgpu_thermal_irq {
183 AMDGPU_THERMAL_IRQ_LAST 183 AMDGPU_THERMAL_IRQ_LAST
184}; 184};
185 185
186enum amdgpu_kiq_irq {
187 AMDGPU_CP_KIQ_IRQ_DRIVER0 = 0,
188 AMDGPU_CP_KIQ_IRQ_LAST
189};
190
186int amdgpu_set_clockgating_state(struct amdgpu_device *adev, 191int amdgpu_set_clockgating_state(struct amdgpu_device *adev,
187 enum amd_ip_block_type block_type, 192 enum amd_ip_block_type block_type,
188 enum amd_clockgating_state state); 193 enum amd_clockgating_state state);
@@ -775,6 +780,13 @@ struct amdgpu_mec {
775 u32 num_queue; 780 u32 num_queue;
776}; 781};
777 782
783struct amdgpu_kiq {
784 u64 eop_gpu_addr;
785 struct amdgpu_bo *eop_obj;
786 struct amdgpu_ring ring;
787 struct amdgpu_irq_src irq;
788};
789
778/* 790/*
779 * GPU scratch registers structures, functions & helpers 791 * GPU scratch registers structures, functions & helpers
780 */ 792 */
@@ -850,6 +862,7 @@ struct amdgpu_gfx {
850 struct amdgpu_gca_config config; 862 struct amdgpu_gca_config config;
851 struct amdgpu_rlc rlc; 863 struct amdgpu_rlc rlc;
852 struct amdgpu_mec mec; 864 struct amdgpu_mec mec;
865 struct amdgpu_kiq kiq;
853 struct amdgpu_scratch scratch; 866 struct amdgpu_scratch scratch;
854 const struct firmware *me_fw; /* ME firmware */ 867 const struct firmware *me_fw; /* ME firmware */
855 uint32_t me_fw_version; 868 uint32_t me_fw_version;