aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
diff options
context:
space:
mode:
authorShirish S <shirish.s@amd.com>2018-10-05 01:24:21 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-10-09 18:06:26 -0400
commitbdbb4d6e96bc9558e404bf709480ac2f7783c843 (patch)
tree961a0bf941d79acbd4957984575b9d05401c54e8 /drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
parent1b19aa5aa8c9394850a5e769abd4df12b3bdd1b7 (diff)
drm/amdgpu: remove the intterupt handling for the KIQ events
[Why] 1. we never submit IBs to the KIQ 2. there seems to be ~500ms delay during amdgpu resume spent in KIQ, hence pointing toward interrupts are not working correctly. [How] remove interrupt handling for KIQ. Signed-off-by: Shirish S <shirish.s@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>i Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index f9e0a21435f8..3f27a87bc930 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -2048,11 +2048,6 @@ static int gfx_v8_0_sw_init(void *handle)
2048 adev->gfx.mec.num_pipe_per_mec = 4; 2048 adev->gfx.mec.num_pipe_per_mec = 4;
2049 adev->gfx.mec.num_queue_per_pipe = 8; 2049 adev->gfx.mec.num_queue_per_pipe = 8;
2050 2050
2051 /* KIQ event */
2052 r = amdgpu_irq_add_id(adev, AMDGPU_IRQ_CLIENTID_LEGACY, VISLANDS30_IV_SRCID_CP_INT_IB2, &adev->gfx.kiq.irq);
2053 if (r)
2054 return r;
2055
2056 /* EOP Event */ 2051 /* EOP Event */
2057 r = amdgpu_irq_add_id(adev, AMDGPU_IRQ_CLIENTID_LEGACY, VISLANDS30_IV_SRCID_CP_END_OF_PIPE, &adev->gfx.eop_irq); 2052 r = amdgpu_irq_add_id(adev, AMDGPU_IRQ_CLIENTID_LEGACY, VISLANDS30_IV_SRCID_CP_END_OF_PIPE, &adev->gfx.eop_irq);
2058 if (r) 2053 if (r)
@@ -7018,52 +7013,6 @@ static int gfx_v8_0_sq_irq(struct amdgpu_device *adev,
7018 return 0; 7013 return 0;
7019} 7014}
7020 7015
7021static int gfx_v8_0_kiq_set_interrupt_state(struct amdgpu_device *adev,
7022 struct amdgpu_irq_src *src,
7023 unsigned int type,
7024 enum amdgpu_interrupt_state state)
7025{
7026 struct amdgpu_ring *ring = &(adev->gfx.kiq.ring);
7027
7028 switch (type) {
7029 case AMDGPU_CP_KIQ_IRQ_DRIVER0:
7030 WREG32_FIELD(CPC_INT_CNTL, GENERIC2_INT_ENABLE,
7031 state == AMDGPU_IRQ_STATE_DISABLE ? 0 : 1);
7032 if (ring->me == 1)
7033 WREG32_FIELD_OFFSET(CP_ME1_PIPE0_INT_CNTL,
7034 ring->pipe,
7035 GENERIC2_INT_ENABLE,
7036 state == AMDGPU_IRQ_STATE_DISABLE ? 0 : 1);
7037 else
7038 WREG32_FIELD_OFFSET(CP_ME2_PIPE0_INT_CNTL,
7039 ring->pipe,
7040 GENERIC2_INT_ENABLE,
7041 state == AMDGPU_IRQ_STATE_DISABLE ? 0 : 1);
7042 break;
7043 default:
7044 BUG(); /* kiq only support GENERIC2_INT now */
7045 break;
7046 }
7047 return 0;
7048}
7049
7050static int gfx_v8_0_kiq_irq(struct amdgpu_device *adev,
7051 struct amdgpu_irq_src *source,
7052 struct amdgpu_iv_entry *entry)
7053{
7054 u8 me_id, pipe_id, queue_id;
7055 struct amdgpu_ring *ring = &(adev->gfx.kiq.ring);
7056
7057 me_id = (entry->ring_id & 0x0c) >> 2;
7058 pipe_id = (entry->ring_id & 0x03) >> 0;
7059 queue_id = (entry->ring_id & 0x70) >> 4;
7060 DRM_DEBUG("IH: CPC GENERIC2_INT, me:%d, pipe:%d, queue:%d\n",
7061 me_id, pipe_id, queue_id);
7062
7063 amdgpu_fence_process(ring);
7064 return 0;
7065}
7066
7067static const struct amd_ip_funcs gfx_v8_0_ip_funcs = { 7016static const struct amd_ip_funcs gfx_v8_0_ip_funcs = {
7068 .name = "gfx_v8_0", 7017 .name = "gfx_v8_0",
7069 .early_init = gfx_v8_0_early_init, 7018 .early_init = gfx_v8_0_early_init,
@@ -7214,11 +7163,6 @@ static const struct amdgpu_irq_src_funcs gfx_v8_0_priv_inst_irq_funcs = {
7214 .process = gfx_v8_0_priv_inst_irq, 7163 .process = gfx_v8_0_priv_inst_irq,
7215}; 7164};
7216 7165
7217static const struct amdgpu_irq_src_funcs gfx_v8_0_kiq_irq_funcs = {
7218 .set = gfx_v8_0_kiq_set_interrupt_state,
7219 .process = gfx_v8_0_kiq_irq,
7220};
7221
7222static const struct amdgpu_irq_src_funcs gfx_v8_0_cp_ecc_error_irq_funcs = { 7166static const struct amdgpu_irq_src_funcs gfx_v8_0_cp_ecc_error_irq_funcs = {
7223 .set = gfx_v8_0_set_cp_ecc_int_state, 7167 .set = gfx_v8_0_set_cp_ecc_int_state,
7224 .process = gfx_v8_0_cp_ecc_error_irq, 7168 .process = gfx_v8_0_cp_ecc_error_irq,
@@ -7240,9 +7184,6 @@ static void gfx_v8_0_set_irq_funcs(struct amdgpu_device *adev)
7240 adev->gfx.priv_inst_irq.num_types = 1; 7184 adev->gfx.priv_inst_irq.num_types = 1;
7241 adev->gfx.priv_inst_irq.funcs = &gfx_v8_0_priv_inst_irq_funcs; 7185 adev->gfx.priv_inst_irq.funcs = &gfx_v8_0_priv_inst_irq_funcs;
7242 7186
7243 adev->gfx.kiq.irq.num_types = AMDGPU_CP_KIQ_IRQ_LAST;
7244 adev->gfx.kiq.irq.funcs = &gfx_v8_0_kiq_irq_funcs;
7245
7246 adev->gfx.cp_ecc_error_irq.num_types = 1; 7187 adev->gfx.cp_ecc_error_irq.num_types = 1;
7247 adev->gfx.cp_ecc_error_irq.funcs = &gfx_v8_0_cp_ecc_error_irq_funcs; 7188 adev->gfx.cp_ecc_error_irq.funcs = &gfx_v8_0_cp_ecc_error_irq_funcs;
7248 7189