aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMario Kleiner <mario.kleiner.de@gmail.com>2015-07-03 00:03:07 -0400
committerAlex Deucher <alexander.deucher@amd.com>2015-07-08 12:41:37 -0400
commitbd833144a23dead304744dc748f5d72d7e92d315 (patch)
tree976ed3f7269940d71f7e157cfce70457d28c1a83 /drivers
parent07f18f0bb8d8d65badd8b4988b40d329fc0cc6dc (diff)
drm/amdgpu: Handle irqs only based on irq ring, not irq status regs.
This is a translation of the patch ... "drm/radeon: Handle irqs only based on irq ring, not irq status regs." ... for the vblank irq handling, to fix the same problem described in that patch on the new driver. Only compile tested due to lack of suitable hw. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> CC: Michel Dänzer <michel.daenzer@amd.com> CC: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/dce_v10_0.c22
-rw-r--r--drivers/gpu/drm/amd/amdgpu/dce_v11_0.c22
-rw-r--r--drivers/gpu/drm/amd/amdgpu/dce_v8_0.c22
3 files changed, 42 insertions, 24 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
index 5cde635978f9..6e77964f1b64 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
@@ -3403,19 +3403,25 @@ static int dce_v10_0_crtc_irq(struct amdgpu_device *adev,
3403 3403
3404 switch (entry->src_data) { 3404 switch (entry->src_data) {
3405 case 0: /* vblank */ 3405 case 0: /* vblank */
3406 if (disp_int & interrupt_status_offsets[crtc].vblank) { 3406 if (disp_int & interrupt_status_offsets[crtc].vblank)
3407 dce_v10_0_crtc_vblank_int_ack(adev, crtc); 3407 dce_v10_0_crtc_vblank_int_ack(adev, crtc);
3408 if (amdgpu_irq_enabled(adev, source, irq_type)) { 3408 else
3409 drm_handle_vblank(adev->ddev, crtc); 3409 DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
3410 } 3410
3411 DRM_DEBUG("IH: D%d vblank\n", crtc + 1); 3411 if (amdgpu_irq_enabled(adev, source, irq_type)) {
3412 drm_handle_vblank(adev->ddev, crtc);
3412 } 3413 }
3414 DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
3415
3413 break; 3416 break;
3414 case 1: /* vline */ 3417 case 1: /* vline */
3415 if (disp_int & interrupt_status_offsets[crtc].vline) { 3418 if (disp_int & interrupt_status_offsets[crtc].vline)
3416 dce_v10_0_crtc_vline_int_ack(adev, crtc); 3419 dce_v10_0_crtc_vline_int_ack(adev, crtc);
3417 DRM_DEBUG("IH: D%d vline\n", crtc + 1); 3420 else
3418 } 3421 DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
3422
3423 DRM_DEBUG("IH: D%d vline\n", crtc + 1);
3424
3419 break; 3425 break;
3420 default: 3426 default:
3421 DRM_DEBUG("Unhandled interrupt: %d %d\n", entry->src_id, entry->src_data); 3427 DRM_DEBUG("Unhandled interrupt: %d %d\n", entry->src_id, entry->src_data);
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
index 95efd98b202d..7f7abb0e0be5 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
@@ -3402,19 +3402,25 @@ static int dce_v11_0_crtc_irq(struct amdgpu_device *adev,
3402 3402
3403 switch (entry->src_data) { 3403 switch (entry->src_data) {
3404 case 0: /* vblank */ 3404 case 0: /* vblank */
3405 if (disp_int & interrupt_status_offsets[crtc].vblank) { 3405 if (disp_int & interrupt_status_offsets[crtc].vblank)
3406 dce_v11_0_crtc_vblank_int_ack(adev, crtc); 3406 dce_v11_0_crtc_vblank_int_ack(adev, crtc);
3407 if (amdgpu_irq_enabled(adev, source, irq_type)) { 3407 else
3408 drm_handle_vblank(adev->ddev, crtc); 3408 DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
3409 } 3409
3410 DRM_DEBUG("IH: D%d vblank\n", crtc + 1); 3410 if (amdgpu_irq_enabled(adev, source, irq_type)) {
3411 drm_handle_vblank(adev->ddev, crtc);
3411 } 3412 }
3413 DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
3414
3412 break; 3415 break;
3413 case 1: /* vline */ 3416 case 1: /* vline */
3414 if (disp_int & interrupt_status_offsets[crtc].vline) { 3417 if (disp_int & interrupt_status_offsets[crtc].vline)
3415 dce_v11_0_crtc_vline_int_ack(adev, crtc); 3418 dce_v11_0_crtc_vline_int_ack(adev, crtc);
3416 DRM_DEBUG("IH: D%d vline\n", crtc + 1); 3419 else
3417 } 3420 DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
3421
3422 DRM_DEBUG("IH: D%d vline\n", crtc + 1);
3423
3418 break; 3424 break;
3419 default: 3425 default:
3420 DRM_DEBUG("Unhandled interrupt: %d %d\n", entry->src_id, entry->src_data); 3426 DRM_DEBUG("Unhandled interrupt: %d %d\n", entry->src_id, entry->src_data);
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
index aaca8d663f2c..08387dfd98a7 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
@@ -3237,19 +3237,25 @@ static int dce_v8_0_crtc_irq(struct amdgpu_device *adev,
3237 3237
3238 switch (entry->src_data) { 3238 switch (entry->src_data) {
3239 case 0: /* vblank */ 3239 case 0: /* vblank */
3240 if (disp_int & interrupt_status_offsets[crtc].vblank) { 3240 if (disp_int & interrupt_status_offsets[crtc].vblank)
3241 WREG32(mmLB_VBLANK_STATUS + crtc_offsets[crtc], LB_VBLANK_STATUS__VBLANK_ACK_MASK); 3241 WREG32(mmLB_VBLANK_STATUS + crtc_offsets[crtc], LB_VBLANK_STATUS__VBLANK_ACK_MASK);
3242 if (amdgpu_irq_enabled(adev, source, irq_type)) { 3242 else
3243 drm_handle_vblank(adev->ddev, crtc); 3243 DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
3244 } 3244
3245 DRM_DEBUG("IH: D%d vblank\n", crtc + 1); 3245 if (amdgpu_irq_enabled(adev, source, irq_type)) {
3246 drm_handle_vblank(adev->ddev, crtc);
3246 } 3247 }
3248 DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
3249
3247 break; 3250 break;
3248 case 1: /* vline */ 3251 case 1: /* vline */
3249 if (disp_int & interrupt_status_offsets[crtc].vline) { 3252 if (disp_int & interrupt_status_offsets[crtc].vline)
3250 WREG32(mmLB_VLINE_STATUS + crtc_offsets[crtc], LB_VLINE_STATUS__VLINE_ACK_MASK); 3253 WREG32(mmLB_VLINE_STATUS + crtc_offsets[crtc], LB_VLINE_STATUS__VLINE_ACK_MASK);
3251 DRM_DEBUG("IH: D%d vline\n", crtc + 1); 3254 else
3252 } 3255 DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
3256
3257 DRM_DEBUG("IH: D%d vline\n", crtc + 1);
3258
3253 break; 3259 break;
3254 default: 3260 default:
3255 DRM_DEBUG("Unhandled interrupt: %d %d\n", entry->src_id, entry->src_data); 3261 DRM_DEBUG("Unhandled interrupt: %d %d\n", entry->src_id, entry->src_data);