Commit df93d3fe authored by Mario Kleiner's avatar Mario Kleiner Committed by Luis Henriques

drm/radeon: Handle irqs only based on irq ring, not irq status regs.

commit 07f18f0b upstream.

Trying to resolve issues with missed vblanks and impossible
values inside delivered kms pageflip completion events showed
that radeon's irq handling sometimes doesn't handle valid irqs,
but silently skips them. This was observed for vblank interrupts.

Although those irqs have corresponding events queued in the gpu's
irq ring at time of interrupt, and therefore the corresponding
handling code gets triggered by these events, the handling code
sometimes silently skipped processing the irq. The reason for those
skips is that the handling code double-checks for each irq event if
the corresponding irq status bits in the irq status registers
are set. Sometimes those bits are not set at time of check
for valid irqs, maybe due to some hardware race on some setups?

The problem only seems to happen on some machine + card combos
sometimes, e.g., never happened during my testing of different PC
cards of the DCE-2/3/4 generation a year ago, but happens consistently
now on two different Apple Mac cards (RV730, DCE-3, Apple iMac and
Evergreen JUNIPER, DCE-4 in a Apple MacPro). It also doesn't happen
at each interrupt but only occassionally every couple of
hundred or thousand vblank interrupts.

This results in XOrg warning messages like

"[  7084.472] (WW) RADEON(0): radeon_dri2_flip_event_handler:
Pageflip completion event has impossible msc 420120 < target_msc 420121"

as well as skipped frames and problems for applications that
use kms pageflip events or vblank events, e.g., users of DRI2 and
DRI3/Present, Waylands Weston compositor, etc. See also

https://bugs.freedesktop.org/show_bug.cgi?id=85203

After some talking to Alex and Michel, we decided to fix this
by turning the double-check for asserted irq status bits into a
warning. Whenever a irq event is queued in the IH ring, always
execute the corresponding interrupt handler. Still check the irq
status bits, but only to log a DRM_DEBUG message on a mismatch.

This fixed the problems reliably on both previously failing
cards, RV-730 dual-head tested on both crtcs (pipes D1 and D2)
and a triple-output Juniper HD-5770 card tested on all three
available crtcs (D1/D2/D3). The r600 and evergreen irq handling
is therefore tested, but the cik an si handling is only compile
tested due to lack of hw.
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarMario Kleiner <mario.kleiner.de@gmail.com>
CC: Michel Dänzer <michel.daenzer@amd.com>
CC: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
[ luis: backported to 3.16:
  - dropped changes related with short HPD irqs as these are not
    supported in the 3.16 kernel ]
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 4057c3b6
...@@ -7501,7 +7501,9 @@ int cik_irq_process(struct radeon_device *rdev) ...@@ -7501,7 +7501,9 @@ int cik_irq_process(struct radeon_device *rdev)
case 1: /* D1 vblank/vline */ case 1: /* D1 vblank/vline */
switch (src_data) { switch (src_data) {
case 0: /* D1 vblank */ case 0: /* D1 vblank */
if (rdev->irq.stat_regs.cik.disp_int & LB_D1_VBLANK_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int & LB_D1_VBLANK_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
if (rdev->irq.crtc_vblank_int[0]) { if (rdev->irq.crtc_vblank_int[0]) {
drm_handle_vblank(rdev->ddev, 0); drm_handle_vblank(rdev->ddev, 0);
rdev->pm.vblank_sync = true; rdev->pm.vblank_sync = true;
...@@ -7511,13 +7513,15 @@ int cik_irq_process(struct radeon_device *rdev) ...@@ -7511,13 +7513,15 @@ int cik_irq_process(struct radeon_device *rdev)
radeon_crtc_handle_vblank(rdev, 0); radeon_crtc_handle_vblank(rdev, 0);
rdev->irq.stat_regs.cik.disp_int &= ~LB_D1_VBLANK_INTERRUPT; rdev->irq.stat_regs.cik.disp_int &= ~LB_D1_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D1 vblank\n"); DRM_DEBUG("IH: D1 vblank\n");
}
break; break;
case 1: /* D1 vline */ case 1: /* D1 vline */
if (rdev->irq.stat_regs.cik.disp_int & LB_D1_VLINE_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int & LB_D1_VLINE_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.cik.disp_int &= ~LB_D1_VLINE_INTERRUPT; rdev->irq.stat_regs.cik.disp_int &= ~LB_D1_VLINE_INTERRUPT;
DRM_DEBUG("IH: D1 vline\n"); DRM_DEBUG("IH: D1 vline\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
...@@ -7527,7 +7531,9 @@ int cik_irq_process(struct radeon_device *rdev) ...@@ -7527,7 +7531,9 @@ int cik_irq_process(struct radeon_device *rdev)
case 2: /* D2 vblank/vline */ case 2: /* D2 vblank/vline */
switch (src_data) { switch (src_data) {
case 0: /* D2 vblank */ case 0: /* D2 vblank */
if (rdev->irq.stat_regs.cik.disp_int_cont & LB_D2_VBLANK_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int_cont & LB_D2_VBLANK_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
if (rdev->irq.crtc_vblank_int[1]) { if (rdev->irq.crtc_vblank_int[1]) {
drm_handle_vblank(rdev->ddev, 1); drm_handle_vblank(rdev->ddev, 1);
rdev->pm.vblank_sync = true; rdev->pm.vblank_sync = true;
...@@ -7537,13 +7543,15 @@ int cik_irq_process(struct radeon_device *rdev) ...@@ -7537,13 +7543,15 @@ int cik_irq_process(struct radeon_device *rdev)
radeon_crtc_handle_vblank(rdev, 1); radeon_crtc_handle_vblank(rdev, 1);
rdev->irq.stat_regs.cik.disp_int_cont &= ~LB_D2_VBLANK_INTERRUPT; rdev->irq.stat_regs.cik.disp_int_cont &= ~LB_D2_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D2 vblank\n"); DRM_DEBUG("IH: D2 vblank\n");
}
break; break;
case 1: /* D2 vline */ case 1: /* D2 vline */
if (rdev->irq.stat_regs.cik.disp_int_cont & LB_D2_VLINE_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int_cont & LB_D2_VLINE_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.cik.disp_int_cont &= ~LB_D2_VLINE_INTERRUPT; rdev->irq.stat_regs.cik.disp_int_cont &= ~LB_D2_VLINE_INTERRUPT;
DRM_DEBUG("IH: D2 vline\n"); DRM_DEBUG("IH: D2 vline\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
...@@ -7553,7 +7561,9 @@ int cik_irq_process(struct radeon_device *rdev) ...@@ -7553,7 +7561,9 @@ int cik_irq_process(struct radeon_device *rdev)
case 3: /* D3 vblank/vline */ case 3: /* D3 vblank/vline */
switch (src_data) { switch (src_data) {
case 0: /* D3 vblank */ case 0: /* D3 vblank */
if (rdev->irq.stat_regs.cik.disp_int_cont2 & LB_D3_VBLANK_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int_cont2 & LB_D3_VBLANK_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
if (rdev->irq.crtc_vblank_int[2]) { if (rdev->irq.crtc_vblank_int[2]) {
drm_handle_vblank(rdev->ddev, 2); drm_handle_vblank(rdev->ddev, 2);
rdev->pm.vblank_sync = true; rdev->pm.vblank_sync = true;
...@@ -7563,13 +7573,15 @@ int cik_irq_process(struct radeon_device *rdev) ...@@ -7563,13 +7573,15 @@ int cik_irq_process(struct radeon_device *rdev)
radeon_crtc_handle_vblank(rdev, 2); radeon_crtc_handle_vblank(rdev, 2);
rdev->irq.stat_regs.cik.disp_int_cont2 &= ~LB_D3_VBLANK_INTERRUPT; rdev->irq.stat_regs.cik.disp_int_cont2 &= ~LB_D3_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D3 vblank\n"); DRM_DEBUG("IH: D3 vblank\n");
}
break; break;
case 1: /* D3 vline */ case 1: /* D3 vline */
if (rdev->irq.stat_regs.cik.disp_int_cont2 & LB_D3_VLINE_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int_cont2 & LB_D3_VLINE_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.cik.disp_int_cont2 &= ~LB_D3_VLINE_INTERRUPT; rdev->irq.stat_regs.cik.disp_int_cont2 &= ~LB_D3_VLINE_INTERRUPT;
DRM_DEBUG("IH: D3 vline\n"); DRM_DEBUG("IH: D3 vline\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
...@@ -7579,7 +7591,9 @@ int cik_irq_process(struct radeon_device *rdev) ...@@ -7579,7 +7591,9 @@ int cik_irq_process(struct radeon_device *rdev)
case 4: /* D4 vblank/vline */ case 4: /* D4 vblank/vline */
switch (src_data) { switch (src_data) {
case 0: /* D4 vblank */ case 0: /* D4 vblank */
if (rdev->irq.stat_regs.cik.disp_int_cont3 & LB_D4_VBLANK_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int_cont3 & LB_D4_VBLANK_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
if (rdev->irq.crtc_vblank_int[3]) { if (rdev->irq.crtc_vblank_int[3]) {
drm_handle_vblank(rdev->ddev, 3); drm_handle_vblank(rdev->ddev, 3);
rdev->pm.vblank_sync = true; rdev->pm.vblank_sync = true;
...@@ -7589,13 +7603,15 @@ int cik_irq_process(struct radeon_device *rdev) ...@@ -7589,13 +7603,15 @@ int cik_irq_process(struct radeon_device *rdev)
radeon_crtc_handle_vblank(rdev, 3); radeon_crtc_handle_vblank(rdev, 3);
rdev->irq.stat_regs.cik.disp_int_cont3 &= ~LB_D4_VBLANK_INTERRUPT; rdev->irq.stat_regs.cik.disp_int_cont3 &= ~LB_D4_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D4 vblank\n"); DRM_DEBUG("IH: D4 vblank\n");
}
break; break;
case 1: /* D4 vline */ case 1: /* D4 vline */
if (rdev->irq.stat_regs.cik.disp_int_cont3 & LB_D4_VLINE_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int_cont3 & LB_D4_VLINE_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.cik.disp_int_cont3 &= ~LB_D4_VLINE_INTERRUPT; rdev->irq.stat_regs.cik.disp_int_cont3 &= ~LB_D4_VLINE_INTERRUPT;
DRM_DEBUG("IH: D4 vline\n"); DRM_DEBUG("IH: D4 vline\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
...@@ -7605,7 +7621,9 @@ int cik_irq_process(struct radeon_device *rdev) ...@@ -7605,7 +7621,9 @@ int cik_irq_process(struct radeon_device *rdev)
case 5: /* D5 vblank/vline */ case 5: /* D5 vblank/vline */
switch (src_data) { switch (src_data) {
case 0: /* D5 vblank */ case 0: /* D5 vblank */
if (rdev->irq.stat_regs.cik.disp_int_cont4 & LB_D5_VBLANK_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int_cont4 & LB_D5_VBLANK_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
if (rdev->irq.crtc_vblank_int[4]) { if (rdev->irq.crtc_vblank_int[4]) {
drm_handle_vblank(rdev->ddev, 4); drm_handle_vblank(rdev->ddev, 4);
rdev->pm.vblank_sync = true; rdev->pm.vblank_sync = true;
...@@ -7615,13 +7633,15 @@ int cik_irq_process(struct radeon_device *rdev) ...@@ -7615,13 +7633,15 @@ int cik_irq_process(struct radeon_device *rdev)
radeon_crtc_handle_vblank(rdev, 4); radeon_crtc_handle_vblank(rdev, 4);
rdev->irq.stat_regs.cik.disp_int_cont4 &= ~LB_D5_VBLANK_INTERRUPT; rdev->irq.stat_regs.cik.disp_int_cont4 &= ~LB_D5_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D5 vblank\n"); DRM_DEBUG("IH: D5 vblank\n");
}
break; break;
case 1: /* D5 vline */ case 1: /* D5 vline */
if (rdev->irq.stat_regs.cik.disp_int_cont4 & LB_D5_VLINE_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int_cont4 & LB_D5_VLINE_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.cik.disp_int_cont4 &= ~LB_D5_VLINE_INTERRUPT; rdev->irq.stat_regs.cik.disp_int_cont4 &= ~LB_D5_VLINE_INTERRUPT;
DRM_DEBUG("IH: D5 vline\n"); DRM_DEBUG("IH: D5 vline\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
...@@ -7631,7 +7651,9 @@ int cik_irq_process(struct radeon_device *rdev) ...@@ -7631,7 +7651,9 @@ int cik_irq_process(struct radeon_device *rdev)
case 6: /* D6 vblank/vline */ case 6: /* D6 vblank/vline */
switch (src_data) { switch (src_data) {
case 0: /* D6 vblank */ case 0: /* D6 vblank */
if (rdev->irq.stat_regs.cik.disp_int_cont5 & LB_D6_VBLANK_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int_cont5 & LB_D6_VBLANK_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
if (rdev->irq.crtc_vblank_int[5]) { if (rdev->irq.crtc_vblank_int[5]) {
drm_handle_vblank(rdev->ddev, 5); drm_handle_vblank(rdev->ddev, 5);
rdev->pm.vblank_sync = true; rdev->pm.vblank_sync = true;
...@@ -7641,13 +7663,15 @@ int cik_irq_process(struct radeon_device *rdev) ...@@ -7641,13 +7663,15 @@ int cik_irq_process(struct radeon_device *rdev)
radeon_crtc_handle_vblank(rdev, 5); radeon_crtc_handle_vblank(rdev, 5);
rdev->irq.stat_regs.cik.disp_int_cont5 &= ~LB_D6_VBLANK_INTERRUPT; rdev->irq.stat_regs.cik.disp_int_cont5 &= ~LB_D6_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D6 vblank\n"); DRM_DEBUG("IH: D6 vblank\n");
}
break; break;
case 1: /* D6 vline */ case 1: /* D6 vline */
if (rdev->irq.stat_regs.cik.disp_int_cont5 & LB_D6_VLINE_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int_cont5 & LB_D6_VLINE_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.cik.disp_int_cont5 &= ~LB_D6_VLINE_INTERRUPT; rdev->irq.stat_regs.cik.disp_int_cont5 &= ~LB_D6_VLINE_INTERRUPT;
DRM_DEBUG("IH: D6 vline\n"); DRM_DEBUG("IH: D6 vline\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
...@@ -7666,46 +7690,58 @@ int cik_irq_process(struct radeon_device *rdev) ...@@ -7666,46 +7690,58 @@ int cik_irq_process(struct radeon_device *rdev)
case 42: /* HPD hotplug */ case 42: /* HPD hotplug */
switch (src_data) { switch (src_data) {
case 0: case 0:
if (rdev->irq.stat_regs.cik.disp_int & DC_HPD1_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int & DC_HPD1_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.cik.disp_int &= ~DC_HPD1_INTERRUPT; rdev->irq.stat_regs.cik.disp_int &= ~DC_HPD1_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD1\n"); DRM_DEBUG("IH: HPD1\n");
}
break; break;
case 1: case 1:
if (rdev->irq.stat_regs.cik.disp_int_cont & DC_HPD2_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int_cont & DC_HPD2_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.cik.disp_int_cont &= ~DC_HPD2_INTERRUPT; rdev->irq.stat_regs.cik.disp_int_cont &= ~DC_HPD2_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD2\n"); DRM_DEBUG("IH: HPD2\n");
}
break; break;
case 2: case 2:
if (rdev->irq.stat_regs.cik.disp_int_cont2 & DC_HPD3_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int_cont2 & DC_HPD3_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.cik.disp_int_cont2 &= ~DC_HPD3_INTERRUPT; rdev->irq.stat_regs.cik.disp_int_cont2 &= ~DC_HPD3_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD3\n"); DRM_DEBUG("IH: HPD3\n");
}
break; break;
case 3: case 3:
if (rdev->irq.stat_regs.cik.disp_int_cont3 & DC_HPD4_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int_cont3 & DC_HPD4_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.cik.disp_int_cont3 &= ~DC_HPD4_INTERRUPT; rdev->irq.stat_regs.cik.disp_int_cont3 &= ~DC_HPD4_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD4\n"); DRM_DEBUG("IH: HPD4\n");
}
break; break;
case 4: case 4:
if (rdev->irq.stat_regs.cik.disp_int_cont4 & DC_HPD5_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int_cont4 & DC_HPD5_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.cik.disp_int_cont4 &= ~DC_HPD5_INTERRUPT; rdev->irq.stat_regs.cik.disp_int_cont4 &= ~DC_HPD5_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD5\n"); DRM_DEBUG("IH: HPD5\n");
}
break; break;
case 5: case 5:
if (rdev->irq.stat_regs.cik.disp_int_cont5 & DC_HPD6_INTERRUPT) { if (!(rdev->irq.stat_regs.cik.disp_int_cont5 & DC_HPD6_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.cik.disp_int_cont5 &= ~DC_HPD6_INTERRUPT; rdev->irq.stat_regs.cik.disp_int_cont5 &= ~DC_HPD6_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD6\n"); DRM_DEBUG("IH: HPD6\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
......
This diff is collapsed.
...@@ -3866,7 +3866,9 @@ int r600_irq_process(struct radeon_device *rdev) ...@@ -3866,7 +3866,9 @@ int r600_irq_process(struct radeon_device *rdev)
case 1: /* D1 vblank/vline */ case 1: /* D1 vblank/vline */
switch (src_data) { switch (src_data) {
case 0: /* D1 vblank */ case 0: /* D1 vblank */
if (rdev->irq.stat_regs.r600.disp_int & LB_D1_VBLANK_INTERRUPT) { if (!(rdev->irq.stat_regs.r600.disp_int & LB_D1_VBLANK_INTERRUPT))
DRM_DEBUG("IH: D1 vblank - IH event w/o asserted irq bit?\n");
if (rdev->irq.crtc_vblank_int[0]) { if (rdev->irq.crtc_vblank_int[0]) {
drm_handle_vblank(rdev->ddev, 0); drm_handle_vblank(rdev->ddev, 0);
rdev->pm.vblank_sync = true; rdev->pm.vblank_sync = true;
...@@ -3876,13 +3878,15 @@ int r600_irq_process(struct radeon_device *rdev) ...@@ -3876,13 +3878,15 @@ int r600_irq_process(struct radeon_device *rdev)
radeon_crtc_handle_vblank(rdev, 0); radeon_crtc_handle_vblank(rdev, 0);
rdev->irq.stat_regs.r600.disp_int &= ~LB_D1_VBLANK_INTERRUPT; rdev->irq.stat_regs.r600.disp_int &= ~LB_D1_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D1 vblank\n"); DRM_DEBUG("IH: D1 vblank\n");
}
break; break;
case 1: /* D1 vline */ case 1: /* D1 vline */
if (rdev->irq.stat_regs.r600.disp_int & LB_D1_VLINE_INTERRUPT) { if (!(rdev->irq.stat_regs.r600.disp_int & LB_D1_VLINE_INTERRUPT))
DRM_DEBUG("IH: D1 vline - IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.r600.disp_int &= ~LB_D1_VLINE_INTERRUPT; rdev->irq.stat_regs.r600.disp_int &= ~LB_D1_VLINE_INTERRUPT;
DRM_DEBUG("IH: D1 vline\n"); DRM_DEBUG("IH: D1 vline\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
...@@ -3892,7 +3896,9 @@ int r600_irq_process(struct radeon_device *rdev) ...@@ -3892,7 +3896,9 @@ int r600_irq_process(struct radeon_device *rdev)
case 5: /* D2 vblank/vline */ case 5: /* D2 vblank/vline */
switch (src_data) { switch (src_data) {
case 0: /* D2 vblank */ case 0: /* D2 vblank */
if (rdev->irq.stat_regs.r600.disp_int & LB_D2_VBLANK_INTERRUPT) { if (!(rdev->irq.stat_regs.r600.disp_int & LB_D2_VBLANK_INTERRUPT))
DRM_DEBUG("IH: D2 vblank - IH event w/o asserted irq bit?\n");
if (rdev->irq.crtc_vblank_int[1]) { if (rdev->irq.crtc_vblank_int[1]) {
drm_handle_vblank(rdev->ddev, 1); drm_handle_vblank(rdev->ddev, 1);
rdev->pm.vblank_sync = true; rdev->pm.vblank_sync = true;
...@@ -3902,13 +3908,15 @@ int r600_irq_process(struct radeon_device *rdev) ...@@ -3902,13 +3908,15 @@ int r600_irq_process(struct radeon_device *rdev)
radeon_crtc_handle_vblank(rdev, 1); radeon_crtc_handle_vblank(rdev, 1);
rdev->irq.stat_regs.r600.disp_int &= ~LB_D2_VBLANK_INTERRUPT; rdev->irq.stat_regs.r600.disp_int &= ~LB_D2_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D2 vblank\n"); DRM_DEBUG("IH: D2 vblank\n");
}
break; break;
case 1: /* D1 vline */ case 1: /* D1 vline */
if (rdev->irq.stat_regs.r600.disp_int & LB_D2_VLINE_INTERRUPT) { if (!(rdev->irq.stat_regs.r600.disp_int & LB_D2_VLINE_INTERRUPT))
DRM_DEBUG("IH: D2 vline - IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.r600.disp_int &= ~LB_D2_VLINE_INTERRUPT; rdev->irq.stat_regs.r600.disp_int &= ~LB_D2_VLINE_INTERRUPT;
DRM_DEBUG("IH: D2 vline\n"); DRM_DEBUG("IH: D2 vline\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
...@@ -3926,46 +3934,53 @@ int r600_irq_process(struct radeon_device *rdev) ...@@ -3926,46 +3934,53 @@ int r600_irq_process(struct radeon_device *rdev)
case 19: /* HPD/DAC hotplug */ case 19: /* HPD/DAC hotplug */
switch (src_data) { switch (src_data) {
case 0: case 0:
if (rdev->irq.stat_regs.r600.disp_int & DC_HPD1_INTERRUPT) { if (!(rdev->irq.stat_regs.r600.disp_int & DC_HPD1_INTERRUPT))
DRM_DEBUG("IH: HPD1 - IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.r600.disp_int &= ~DC_HPD1_INTERRUPT; rdev->irq.stat_regs.r600.disp_int &= ~DC_HPD1_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD1\n"); DRM_DEBUG("IH: HPD1\n");
}
break; break;
case 1: case 1:
if (rdev->irq.stat_regs.r600.disp_int & DC_HPD2_INTERRUPT) { if (!(rdev->irq.stat_regs.r600.disp_int & DC_HPD2_INTERRUPT))
DRM_DEBUG("IH: HPD2 - IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.r600.disp_int &= ~DC_HPD2_INTERRUPT; rdev->irq.stat_regs.r600.disp_int &= ~DC_HPD2_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD2\n"); DRM_DEBUG("IH: HPD2\n");
}
break; break;
case 4: case 4:
if (rdev->irq.stat_regs.r600.disp_int_cont & DC_HPD3_INTERRUPT) { if (!(rdev->irq.stat_regs.r600.disp_int_cont & DC_HPD3_INTERRUPT))
DRM_DEBUG("IH: HPD3 - IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.r600.disp_int_cont &= ~DC_HPD3_INTERRUPT; rdev->irq.stat_regs.r600.disp_int_cont &= ~DC_HPD3_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD3\n"); DRM_DEBUG("IH: HPD3\n");
}
break; break;
case 5: case 5:
if (rdev->irq.stat_regs.r600.disp_int_cont & DC_HPD4_INTERRUPT) { if (!(rdev->irq.stat_regs.r600.disp_int_cont & DC_HPD4_INTERRUPT))
DRM_DEBUG("IH: HPD4 - IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.r600.disp_int_cont &= ~DC_HPD4_INTERRUPT; rdev->irq.stat_regs.r600.disp_int_cont &= ~DC_HPD4_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD4\n"); DRM_DEBUG("IH: HPD4\n");
}
break; break;
case 10: case 10:
if (rdev->irq.stat_regs.r600.disp_int_cont2 & DC_HPD5_INTERRUPT) { if (!(rdev->irq.stat_regs.r600.disp_int_cont2 & DC_HPD5_INTERRUPT))
DRM_DEBUG("IH: HPD5 - IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.r600.disp_int_cont2 &= ~DC_HPD5_INTERRUPT; rdev->irq.stat_regs.r600.disp_int_cont2 &= ~DC_HPD5_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD5\n"); DRM_DEBUG("IH: HPD5\n");
}
break; break;
case 12: case 12:
if (rdev->irq.stat_regs.r600.disp_int_cont2 & DC_HPD6_INTERRUPT) { if (!(rdev->irq.stat_regs.r600.disp_int_cont2 & DC_HPD6_INTERRUPT))
DRM_DEBUG("IH: HPD6 - IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.r600.disp_int_cont2 &= ~DC_HPD6_INTERRUPT; rdev->irq.stat_regs.r600.disp_int_cont2 &= ~DC_HPD6_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD6\n"); DRM_DEBUG("IH: HPD6\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
...@@ -3975,18 +3990,22 @@ int r600_irq_process(struct radeon_device *rdev) ...@@ -3975,18 +3990,22 @@ int r600_irq_process(struct radeon_device *rdev)
case 21: /* hdmi */ case 21: /* hdmi */
switch (src_data) { switch (src_data) {
case 4: case 4:
if (rdev->irq.stat_regs.r600.hdmi0_status & HDMI0_AZ_FORMAT_WTRIG) { if (!(rdev->irq.stat_regs.r600.hdmi0_status & HDMI0_AZ_FORMAT_WTRIG))
DRM_DEBUG("IH: HDMI0 - IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.r600.hdmi0_status &= ~HDMI0_AZ_FORMAT_WTRIG; rdev->irq.stat_regs.r600.hdmi0_status &= ~HDMI0_AZ_FORMAT_WTRIG;
queue_hdmi = true; queue_hdmi = true;
DRM_DEBUG("IH: HDMI0\n"); DRM_DEBUG("IH: HDMI0\n");
}
break; break;
case 5: case 5:
if (rdev->irq.stat_regs.r600.hdmi1_status & HDMI0_AZ_FORMAT_WTRIG) { if (!(rdev->irq.stat_regs.r600.hdmi1_status & HDMI0_AZ_FORMAT_WTRIG))
DRM_DEBUG("IH: HDMI1 - IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.r600.hdmi1_status &= ~HDMI0_AZ_FORMAT_WTRIG; rdev->irq.stat_regs.r600.hdmi1_status &= ~HDMI0_AZ_FORMAT_WTRIG;
queue_hdmi = true; queue_hdmi = true;
DRM_DEBUG("IH: HDMI1\n"); DRM_DEBUG("IH: HDMI1\n");
}
break; break;
default: default:
DRM_ERROR("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_ERROR("Unhandled interrupt: %d %d\n", src_id, src_data);
......
...@@ -6173,7 +6173,9 @@ int si_irq_process(struct radeon_device *rdev) ...@@ -6173,7 +6173,9 @@ int si_irq_process(struct radeon_device *rdev)
case 1: /* D1 vblank/vline */ case 1: /* D1 vblank/vline */
switch (src_data) { switch (src_data) {
case 0: /* D1 vblank */ case 0: /* D1 vblank */
if (rdev->irq.stat_regs.evergreen.disp_int & LB_D1_VBLANK_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int & LB_D1_VBLANK_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
if (rdev->irq.crtc_vblank_int[0]) { if (rdev->irq.crtc_vblank_int[0]) {
drm_handle_vblank(rdev->ddev, 0); drm_handle_vblank(rdev->ddev, 0);
rdev->pm.vblank_sync = true; rdev->pm.vblank_sync = true;
...@@ -6183,13 +6185,15 @@ int si_irq_process(struct radeon_device *rdev) ...@@ -6183,13 +6185,15 @@ int si_irq_process(struct radeon_device *rdev)
radeon_crtc_handle_vblank(rdev, 0); radeon_crtc_handle_vblank(rdev, 0);
rdev->irq.stat_regs.evergreen.disp_int &= ~LB_D1_VBLANK_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int &= ~LB_D1_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D1 vblank\n"); DRM_DEBUG("IH: D1 vblank\n");
}
break; break;
case 1: /* D1 vline */ case 1: /* D1 vline */
if (rdev->irq.stat_regs.evergreen.disp_int & LB_D1_VLINE_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int & LB_D1_VLINE_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.evergreen.disp_int &= ~LB_D1_VLINE_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int &= ~LB_D1_VLINE_INTERRUPT;
DRM_DEBUG("IH: D1 vline\n"); DRM_DEBUG("IH: D1 vline\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
...@@ -6199,7 +6203,9 @@ int si_irq_process(struct radeon_device *rdev) ...@@ -6199,7 +6203,9 @@ int si_irq_process(struct radeon_device *rdev)
case 2: /* D2 vblank/vline */ case 2: /* D2 vblank/vline */
switch (src_data) { switch (src_data) {
case 0: /* D2 vblank */ case 0: /* D2 vblank */
if (rdev->irq.stat_regs.evergreen.disp_int_cont & LB_D2_VBLANK_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int_cont & LB_D2_VBLANK_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
if (rdev->irq.crtc_vblank_int[1]) { if (rdev->irq.crtc_vblank_int[1]) {
drm_handle_vblank(rdev->ddev, 1); drm_handle_vblank(rdev->ddev, 1);
rdev->pm.vblank_sync = true; rdev->pm.vblank_sync = true;
...@@ -6209,13 +6215,15 @@ int si_irq_process(struct radeon_device *rdev) ...@@ -6209,13 +6215,15 @@ int si_irq_process(struct radeon_device *rdev)
radeon_crtc_handle_vblank(rdev, 1); radeon_crtc_handle_vblank(rdev, 1);
rdev->irq.stat_regs.evergreen.disp_int_cont &= ~LB_D2_VBLANK_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int_cont &= ~LB_D2_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D2 vblank\n"); DRM_DEBUG("IH: D2 vblank\n");
}
break; break;
case 1: /* D2 vline */ case 1: /* D2 vline */
if (rdev->irq.stat_regs.evergreen.disp_int_cont & LB_D2_VLINE_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int_cont & LB_D2_VLINE_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.evergreen.disp_int_cont &= ~LB_D2_VLINE_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int_cont &= ~LB_D2_VLINE_INTERRUPT;
DRM_DEBUG("IH: D2 vline\n"); DRM_DEBUG("IH: D2 vline\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
...@@ -6225,7 +6233,9 @@ int si_irq_process(struct radeon_device *rdev) ...@@ -6225,7 +6233,9 @@ int si_irq_process(struct radeon_device *rdev)
case 3: /* D3 vblank/vline */ case 3: /* D3 vblank/vline */
switch (src_data) { switch (src_data) {
case 0: /* D3 vblank */ case 0: /* D3 vblank */
if (rdev->irq.stat_regs.evergreen.disp_int_cont2 & LB_D3_VBLANK_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int_cont2 & LB_D3_VBLANK_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
if (rdev->irq.crtc_vblank_int[2]) { if (rdev->irq.crtc_vblank_int[2]) {
drm_handle_vblank(rdev->ddev, 2); drm_handle_vblank(rdev->ddev, 2);
rdev->pm.vblank_sync = true; rdev->pm.vblank_sync = true;
...@@ -6235,13 +6245,15 @@ int si_irq_process(struct radeon_device *rdev) ...@@ -6235,13 +6245,15 @@ int si_irq_process(struct radeon_device *rdev)
radeon_crtc_handle_vblank(rdev, 2); radeon_crtc_handle_vblank(rdev, 2);
rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~LB_D3_VBLANK_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~LB_D3_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D3 vblank\n"); DRM_DEBUG("IH: D3 vblank\n");
}
break; break;
case 1: /* D3 vline */ case 1: /* D3 vline */
if (rdev->irq.stat_regs.evergreen.disp_int_cont2 & LB_D3_VLINE_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int_cont2 & LB_D3_VLINE_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~LB_D3_VLINE_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~LB_D3_VLINE_INTERRUPT;
DRM_DEBUG("IH: D3 vline\n"); DRM_DEBUG("IH: D3 vline\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
...@@ -6251,7 +6263,9 @@ int si_irq_process(struct radeon_device *rdev) ...@@ -6251,7 +6263,9 @@ int si_irq_process(struct radeon_device *rdev)
case 4: /* D4 vblank/vline */ case 4: /* D4 vblank/vline */
switch (src_data) { switch (src_data) {
case 0: /* D4 vblank */ case 0: /* D4 vblank */
if (rdev->irq.stat_regs.evergreen.disp_int_cont3 & LB_D4_VBLANK_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int_cont3 & LB_D4_VBLANK_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
if (rdev->irq.crtc_vblank_int[3]) { if (rdev->irq.crtc_vblank_int[3]) {
drm_handle_vblank(rdev->ddev, 3); drm_handle_vblank(rdev->ddev, 3);
rdev->pm.vblank_sync = true; rdev->pm.vblank_sync = true;
...@@ -6261,13 +6275,15 @@ int si_irq_process(struct radeon_device *rdev) ...@@ -6261,13 +6275,15 @@ int si_irq_process(struct radeon_device *rdev)
radeon_crtc_handle_vblank(rdev, 3); radeon_crtc_handle_vblank(rdev, 3);
rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~LB_D4_VBLANK_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~LB_D4_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D4 vblank\n"); DRM_DEBUG("IH: D4 vblank\n");
}
break; break;
case 1: /* D4 vline */ case 1: /* D4 vline */
if (rdev->irq.stat_regs.evergreen.disp_int_cont3 & LB_D4_VLINE_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int_cont3 & LB_D4_VLINE_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~LB_D4_VLINE_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~LB_D4_VLINE_INTERRUPT;
DRM_DEBUG("IH: D4 vline\n"); DRM_DEBUG("IH: D4 vline\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
...@@ -6277,7 +6293,9 @@ int si_irq_process(struct radeon_device *rdev) ...@@ -6277,7 +6293,9 @@ int si_irq_process(struct radeon_device *rdev)
case 5: /* D5 vblank/vline */ case 5: /* D5 vblank/vline */
switch (src_data) { switch (src_data) {
case 0: /* D5 vblank */ case 0: /* D5 vblank */
if (rdev->irq.stat_regs.evergreen.disp_int_cont4 & LB_D5_VBLANK_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int_cont4 & LB_D5_VBLANK_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
if (rdev->irq.crtc_vblank_int[4]) { if (rdev->irq.crtc_vblank_int[4]) {
drm_handle_vblank(rdev->ddev, 4); drm_handle_vblank(rdev->ddev, 4);
rdev->pm.vblank_sync = true; rdev->pm.vblank_sync = true;
...@@ -6287,13 +6305,15 @@ int si_irq_process(struct radeon_device *rdev) ...@@ -6287,13 +6305,15 @@ int si_irq_process(struct radeon_device *rdev)
radeon_crtc_handle_vblank(rdev, 4); radeon_crtc_handle_vblank(rdev, 4);
rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~LB_D5_VBLANK_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~LB_D5_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D5 vblank\n"); DRM_DEBUG("IH: D5 vblank\n");
}
break; break;
case 1: /* D5 vline */ case 1: /* D5 vline */
if (rdev->irq.stat_regs.evergreen.disp_int_cont4 & LB_D5_VLINE_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int_cont4 & LB_D5_VLINE_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~LB_D5_VLINE_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~LB_D5_VLINE_INTERRUPT;
DRM_DEBUG("IH: D5 vline\n"); DRM_DEBUG("IH: D5 vline\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
...@@ -6303,7 +6323,9 @@ int si_irq_process(struct radeon_device *rdev) ...@@ -6303,7 +6323,9 @@ int si_irq_process(struct radeon_device *rdev)
case 6: /* D6 vblank/vline */ case 6: /* D6 vblank/vline */
switch (src_data) { switch (src_data) {
case 0: /* D6 vblank */ case 0: /* D6 vblank */
if (rdev->irq.stat_regs.evergreen.disp_int_cont5 & LB_D6_VBLANK_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int_cont5 & LB_D6_VBLANK_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
if (rdev->irq.crtc_vblank_int[5]) { if (rdev->irq.crtc_vblank_int[5]) {
drm_handle_vblank(rdev->ddev, 5); drm_handle_vblank(rdev->ddev, 5);
rdev->pm.vblank_sync = true; rdev->pm.vblank_sync = true;
...@@ -6313,13 +6335,15 @@ int si_irq_process(struct radeon_device *rdev) ...@@ -6313,13 +6335,15 @@ int si_irq_process(struct radeon_device *rdev)
radeon_crtc_handle_vblank(rdev, 5); radeon_crtc_handle_vblank(rdev, 5);
rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~LB_D6_VBLANK_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~LB_D6_VBLANK_INTERRUPT;
DRM_DEBUG("IH: D6 vblank\n"); DRM_DEBUG("IH: D6 vblank\n");
}
break; break;
case 1: /* D6 vline */ case 1: /* D6 vline */
if (rdev->irq.stat_regs.evergreen.disp_int_cont5 & LB_D6_VLINE_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int_cont5 & LB_D6_VLINE_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~LB_D6_VLINE_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~LB_D6_VLINE_INTERRUPT;
DRM_DEBUG("IH: D6 vline\n"); DRM_DEBUG("IH: D6 vline\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
...@@ -6338,46 +6362,58 @@ int si_irq_process(struct radeon_device *rdev) ...@@ -6338,46 +6362,58 @@ int si_irq_process(struct radeon_device *rdev)
case 42: /* HPD hotplug */ case 42: /* HPD hotplug */
switch (src_data) { switch (src_data) {
case 0: case 0:
if (rdev->irq.stat_regs.evergreen.disp_int & DC_HPD1_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int & DC_HPD1_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.evergreen.disp_int &= ~DC_HPD1_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int &= ~DC_HPD1_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD1\n"); DRM_DEBUG("IH: HPD1\n");
}
break; break;
case 1: case 1:
if (rdev->irq.stat_regs.evergreen.disp_int_cont & DC_HPD2_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int_cont & DC_HPD2_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.evergreen.disp_int_cont &= ~DC_HPD2_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int_cont &= ~DC_HPD2_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD2\n"); DRM_DEBUG("IH: HPD2\n");
}
break; break;
case 2: case 2:
if (rdev->irq.stat_regs.evergreen.disp_int_cont2 & DC_HPD3_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int_cont2 & DC_HPD3_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~DC_HPD3_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~DC_HPD3_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD3\n"); DRM_DEBUG("IH: HPD3\n");
}
break; break;
case 3: case 3:
if (rdev->irq.stat_regs.evergreen.disp_int_cont3 & DC_HPD4_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int_cont3 & DC_HPD4_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~DC_HPD4_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~DC_HPD4_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD4\n"); DRM_DEBUG("IH: HPD4\n");
}
break; break;
case 4: case 4:
if (rdev->irq.stat_regs.evergreen.disp_int_cont4 & DC_HPD5_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int_cont4 & DC_HPD5_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~DC_HPD5_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~DC_HPD5_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD5\n"); DRM_DEBUG("IH: HPD5\n");
}
break; break;
case 5: case 5:
if (rdev->irq.stat_regs.evergreen.disp_int_cont5 & DC_HPD6_INTERRUPT) { if (!(rdev->irq.stat_regs.evergreen.disp_int_cont5 & DC_HPD6_INTERRUPT))
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~DC_HPD6_INTERRUPT; rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~DC_HPD6_INTERRUPT;
queue_hotplug = true; queue_hotplug = true;
DRM_DEBUG("IH: HPD6\n"); DRM_DEBUG("IH: HPD6\n");
}
break; break;
default: default:
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment