|
@@ -4924,7 +4924,7 @@ restart_ih:
|
|
|
return IRQ_NONE;
|
|
|
|
|
|
rptr = rdev->ih.rptr;
|
|
|
- DRM_DEBUG("r600_irq_process start: rptr %d, wptr %d\n", rptr, wptr);
|
|
|
+ DRM_DEBUG("evergreen_irq_process start: rptr %d, wptr %d\n", rptr, wptr);
|
|
|
|
|
|
/* Order reading of wptr vs. reading of IH ring data */
|
|
|
rmb();
|
|
@@ -4942,23 +4942,27 @@ restart_ih:
|
|
|
case 1: /* D1 vblank/vline */
|
|
|
switch (src_data) {
|
|
|
case 0: /* D1 vblank */
|
|
|
- if (rdev->irq.stat_regs.evergreen.disp_int & LB_D1_VBLANK_INTERRUPT) {
|
|
|
- if (rdev->irq.crtc_vblank_int[0]) {
|
|
|
- drm_handle_vblank(rdev->ddev, 0);
|
|
|
- rdev->pm.vblank_sync = true;
|
|
|
- wake_up(&rdev->irq.vblank_queue);
|
|
|
- }
|
|
|
- if (atomic_read(&rdev->irq.pflip[0]))
|
|
|
- radeon_crtc_handle_vblank(rdev, 0);
|
|
|
- rdev->irq.stat_regs.evergreen.disp_int &= ~LB_D1_VBLANK_INTERRUPT;
|
|
|
- DRM_DEBUG("IH: D1 vblank\n");
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.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]) {
|
|
|
+ drm_handle_vblank(rdev->ddev, 0);
|
|
|
+ rdev->pm.vblank_sync = true;
|
|
|
+ wake_up(&rdev->irq.vblank_queue);
|
|
|
}
|
|
|
+ if (atomic_read(&rdev->irq.pflip[0]))
|
|
|
+ radeon_crtc_handle_vblank(rdev, 0);
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int &= ~LB_D1_VBLANK_INTERRUPT;
|
|
|
+ DRM_DEBUG("IH: D1 vblank\n");
|
|
|
+
|
|
|
break;
|
|
|
case 1: /* D1 vline */
|
|
|
- if (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");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int & LB_D1_VLINE_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: D1 vline - IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int &= ~LB_D1_VLINE_INTERRUPT;
|
|
|
+ DRM_DEBUG("IH: D1 vline\n");
|
|
|
+
|
|
|
break;
|
|
|
default:
|
|
|
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
|
@@ -4968,23 +4972,27 @@ restart_ih:
|
|
|
case 2: /* D2 vblank/vline */
|
|
|
switch (src_data) {
|
|
|
case 0: /* D2 vblank */
|
|
|
- if (rdev->irq.stat_regs.evergreen.disp_int_cont & LB_D2_VBLANK_INTERRUPT) {
|
|
|
- if (rdev->irq.crtc_vblank_int[1]) {
|
|
|
- drm_handle_vblank(rdev->ddev, 1);
|
|
|
- rdev->pm.vblank_sync = true;
|
|
|
- wake_up(&rdev->irq.vblank_queue);
|
|
|
- }
|
|
|
- if (atomic_read(&rdev->irq.pflip[1]))
|
|
|
- radeon_crtc_handle_vblank(rdev, 1);
|
|
|
- rdev->irq.stat_regs.evergreen.disp_int_cont &= ~LB_D2_VBLANK_INTERRUPT;
|
|
|
- DRM_DEBUG("IH: D2 vblank\n");
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int_cont & LB_D2_VBLANK_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: D2 vblank - IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ if (rdev->irq.crtc_vblank_int[1]) {
|
|
|
+ drm_handle_vblank(rdev->ddev, 1);
|
|
|
+ rdev->pm.vblank_sync = true;
|
|
|
+ wake_up(&rdev->irq.vblank_queue);
|
|
|
}
|
|
|
+ if (atomic_read(&rdev->irq.pflip[1]))
|
|
|
+ radeon_crtc_handle_vblank(rdev, 1);
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int_cont &= ~LB_D2_VBLANK_INTERRUPT;
|
|
|
+ DRM_DEBUG("IH: D2 vblank\n");
|
|
|
+
|
|
|
break;
|
|
|
case 1: /* D2 vline */
|
|
|
- if (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");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int_cont & LB_D2_VLINE_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: D2 vline - IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int_cont &= ~LB_D2_VLINE_INTERRUPT;
|
|
|
+ DRM_DEBUG("IH: D2 vline\n");
|
|
|
+
|
|
|
break;
|
|
|
default:
|
|
|
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
|
@@ -4994,23 +5002,27 @@ restart_ih:
|
|
|
case 3: /* D3 vblank/vline */
|
|
|
switch (src_data) {
|
|
|
case 0: /* D3 vblank */
|
|
|
- if (rdev->irq.stat_regs.evergreen.disp_int_cont2 & LB_D3_VBLANK_INTERRUPT) {
|
|
|
- if (rdev->irq.crtc_vblank_int[2]) {
|
|
|
- drm_handle_vblank(rdev->ddev, 2);
|
|
|
- rdev->pm.vblank_sync = true;
|
|
|
- wake_up(&rdev->irq.vblank_queue);
|
|
|
- }
|
|
|
- if (atomic_read(&rdev->irq.pflip[2]))
|
|
|
- radeon_crtc_handle_vblank(rdev, 2);
|
|
|
- rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~LB_D3_VBLANK_INTERRUPT;
|
|
|
- DRM_DEBUG("IH: D3 vblank\n");
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int_cont2 & LB_D3_VBLANK_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: D3 vblank - IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ if (rdev->irq.crtc_vblank_int[2]) {
|
|
|
+ drm_handle_vblank(rdev->ddev, 2);
|
|
|
+ rdev->pm.vblank_sync = true;
|
|
|
+ wake_up(&rdev->irq.vblank_queue);
|
|
|
}
|
|
|
+ if (atomic_read(&rdev->irq.pflip[2]))
|
|
|
+ radeon_crtc_handle_vblank(rdev, 2);
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~LB_D3_VBLANK_INTERRUPT;
|
|
|
+ DRM_DEBUG("IH: D3 vblank\n");
|
|
|
+
|
|
|
break;
|
|
|
case 1: /* D3 vline */
|
|
|
- if (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");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int_cont2 & LB_D3_VLINE_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: D3 vline - IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~LB_D3_VLINE_INTERRUPT;
|
|
|
+ DRM_DEBUG("IH: D3 vline\n");
|
|
|
+
|
|
|
break;
|
|
|
default:
|
|
|
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
|
@@ -5020,23 +5032,27 @@ restart_ih:
|
|
|
case 4: /* D4 vblank/vline */
|
|
|
switch (src_data) {
|
|
|
case 0: /* D4 vblank */
|
|
|
- if (rdev->irq.stat_regs.evergreen.disp_int_cont3 & LB_D4_VBLANK_INTERRUPT) {
|
|
|
- if (rdev->irq.crtc_vblank_int[3]) {
|
|
|
- drm_handle_vblank(rdev->ddev, 3);
|
|
|
- rdev->pm.vblank_sync = true;
|
|
|
- wake_up(&rdev->irq.vblank_queue);
|
|
|
- }
|
|
|
- if (atomic_read(&rdev->irq.pflip[3]))
|
|
|
- radeon_crtc_handle_vblank(rdev, 3);
|
|
|
- rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~LB_D4_VBLANK_INTERRUPT;
|
|
|
- DRM_DEBUG("IH: D4 vblank\n");
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int_cont3 & LB_D4_VBLANK_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: D4 vblank - IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ if (rdev->irq.crtc_vblank_int[3]) {
|
|
|
+ drm_handle_vblank(rdev->ddev, 3);
|
|
|
+ rdev->pm.vblank_sync = true;
|
|
|
+ wake_up(&rdev->irq.vblank_queue);
|
|
|
}
|
|
|
+ if (atomic_read(&rdev->irq.pflip[3]))
|
|
|
+ radeon_crtc_handle_vblank(rdev, 3);
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~LB_D4_VBLANK_INTERRUPT;
|
|
|
+ DRM_DEBUG("IH: D4 vblank\n");
|
|
|
+
|
|
|
break;
|
|
|
case 1: /* D4 vline */
|
|
|
- if (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");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int_cont3 & LB_D4_VLINE_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: D4 vline - IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~LB_D4_VLINE_INTERRUPT;
|
|
|
+ DRM_DEBUG("IH: D4 vline\n");
|
|
|
+
|
|
|
break;
|
|
|
default:
|
|
|
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
|
@@ -5046,23 +5062,27 @@ restart_ih:
|
|
|
case 5: /* D5 vblank/vline */
|
|
|
switch (src_data) {
|
|
|
case 0: /* D5 vblank */
|
|
|
- if (rdev->irq.stat_regs.evergreen.disp_int_cont4 & LB_D5_VBLANK_INTERRUPT) {
|
|
|
- if (rdev->irq.crtc_vblank_int[4]) {
|
|
|
- drm_handle_vblank(rdev->ddev, 4);
|
|
|
- rdev->pm.vblank_sync = true;
|
|
|
- wake_up(&rdev->irq.vblank_queue);
|
|
|
- }
|
|
|
- if (atomic_read(&rdev->irq.pflip[4]))
|
|
|
- radeon_crtc_handle_vblank(rdev, 4);
|
|
|
- rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~LB_D5_VBLANK_INTERRUPT;
|
|
|
- DRM_DEBUG("IH: D5 vblank\n");
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int_cont4 & LB_D5_VBLANK_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: D5 vblank - IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ if (rdev->irq.crtc_vblank_int[4]) {
|
|
|
+ drm_handle_vblank(rdev->ddev, 4);
|
|
|
+ rdev->pm.vblank_sync = true;
|
|
|
+ wake_up(&rdev->irq.vblank_queue);
|
|
|
}
|
|
|
+ if (atomic_read(&rdev->irq.pflip[4]))
|
|
|
+ radeon_crtc_handle_vblank(rdev, 4);
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~LB_D5_VBLANK_INTERRUPT;
|
|
|
+ DRM_DEBUG("IH: D5 vblank\n");
|
|
|
+
|
|
|
break;
|
|
|
case 1: /* D5 vline */
|
|
|
- if (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");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int_cont4 & LB_D5_VLINE_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: D5 vline - IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~LB_D5_VLINE_INTERRUPT;
|
|
|
+ DRM_DEBUG("IH: D5 vline\n");
|
|
|
+
|
|
|
break;
|
|
|
default:
|
|
|
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
|
@@ -5072,23 +5092,27 @@ restart_ih:
|
|
|
case 6: /* D6 vblank/vline */
|
|
|
switch (src_data) {
|
|
|
case 0: /* D6 vblank */
|
|
|
- if (rdev->irq.stat_regs.evergreen.disp_int_cont5 & LB_D6_VBLANK_INTERRUPT) {
|
|
|
- if (rdev->irq.crtc_vblank_int[5]) {
|
|
|
- drm_handle_vblank(rdev->ddev, 5);
|
|
|
- rdev->pm.vblank_sync = true;
|
|
|
- wake_up(&rdev->irq.vblank_queue);
|
|
|
- }
|
|
|
- if (atomic_read(&rdev->irq.pflip[5]))
|
|
|
- radeon_crtc_handle_vblank(rdev, 5);
|
|
|
- rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~LB_D6_VBLANK_INTERRUPT;
|
|
|
- DRM_DEBUG("IH: D6 vblank\n");
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int_cont5 & LB_D6_VBLANK_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: D6 vblank - IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ if (rdev->irq.crtc_vblank_int[5]) {
|
|
|
+ drm_handle_vblank(rdev->ddev, 5);
|
|
|
+ rdev->pm.vblank_sync = true;
|
|
|
+ wake_up(&rdev->irq.vblank_queue);
|
|
|
}
|
|
|
+ if (atomic_read(&rdev->irq.pflip[5]))
|
|
|
+ radeon_crtc_handle_vblank(rdev, 5);
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~LB_D6_VBLANK_INTERRUPT;
|
|
|
+ DRM_DEBUG("IH: D6 vblank\n");
|
|
|
+
|
|
|
break;
|
|
|
case 1: /* D6 vline */
|
|
|
- if (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");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int_cont5 & LB_D6_VLINE_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: D6 vline - IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~LB_D6_VLINE_INTERRUPT;
|
|
|
+ DRM_DEBUG("IH: D6 vline\n");
|
|
|
+
|
|
|
break;
|
|
|
default:
|
|
|
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
|
@@ -5108,88 +5132,100 @@ restart_ih:
|
|
|
case 42: /* HPD hotplug */
|
|
|
switch (src_data) {
|
|
|
case 0:
|
|
|
- if (rdev->irq.stat_regs.evergreen.disp_int & DC_HPD1_INTERRUPT) {
|
|
|
- rdev->irq.stat_regs.evergreen.disp_int &= ~DC_HPD1_INTERRUPT;
|
|
|
- queue_hotplug = true;
|
|
|
- DRM_DEBUG("IH: HPD1\n");
|
|
|
- }
|
|
|
+ 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;
|
|
|
+ queue_hotplug = true;
|
|
|
+ DRM_DEBUG("IH: HPD1\n");
|
|
|
break;
|
|
|
case 1:
|
|
|
- if (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;
|
|
|
- DRM_DEBUG("IH: HPD2\n");
|
|
|
- }
|
|
|
+ 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;
|
|
|
+ queue_hotplug = true;
|
|
|
+ DRM_DEBUG("IH: HPD2\n");
|
|
|
break;
|
|
|
case 2:
|
|
|
- if (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;
|
|
|
- DRM_DEBUG("IH: HPD3\n");
|
|
|
- }
|
|
|
+ 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;
|
|
|
+ queue_hotplug = true;
|
|
|
+ DRM_DEBUG("IH: HPD3\n");
|
|
|
break;
|
|
|
case 3:
|
|
|
- if (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;
|
|
|
- DRM_DEBUG("IH: HPD4\n");
|
|
|
- }
|
|
|
+ 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;
|
|
|
+ queue_hotplug = true;
|
|
|
+ DRM_DEBUG("IH: HPD4\n");
|
|
|
break;
|
|
|
case 4:
|
|
|
- if (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;
|
|
|
- DRM_DEBUG("IH: HPD5\n");
|
|
|
- }
|
|
|
+ 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;
|
|
|
+ queue_hotplug = true;
|
|
|
+ DRM_DEBUG("IH: HPD5\n");
|
|
|
break;
|
|
|
case 5:
|
|
|
- if (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;
|
|
|
- DRM_DEBUG("IH: HPD6\n");
|
|
|
- }
|
|
|
+ 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;
|
|
|
+ queue_hotplug = true;
|
|
|
+ DRM_DEBUG("IH: HPD6\n");
|
|
|
break;
|
|
|
case 6:
|
|
|
- if (rdev->irq.stat_regs.evergreen.disp_int & DC_HPD1_RX_INTERRUPT) {
|
|
|
- rdev->irq.stat_regs.evergreen.disp_int &= ~DC_HPD1_RX_INTERRUPT;
|
|
|
- queue_dp = true;
|
|
|
- DRM_DEBUG("IH: HPD_RX 1\n");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int & DC_HPD1_RX_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int &= ~DC_HPD1_RX_INTERRUPT;
|
|
|
+ queue_dp = true;
|
|
|
+ DRM_DEBUG("IH: HPD_RX 1\n");
|
|
|
break;
|
|
|
case 7:
|
|
|
- if (rdev->irq.stat_regs.evergreen.disp_int_cont & DC_HPD2_RX_INTERRUPT) {
|
|
|
- rdev->irq.stat_regs.evergreen.disp_int_cont &= ~DC_HPD2_RX_INTERRUPT;
|
|
|
- queue_dp = true;
|
|
|
- DRM_DEBUG("IH: HPD_RX 2\n");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int_cont & DC_HPD2_RX_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int_cont &= ~DC_HPD2_RX_INTERRUPT;
|
|
|
+ queue_dp = true;
|
|
|
+ DRM_DEBUG("IH: HPD_RX 2\n");
|
|
|
break;
|
|
|
case 8:
|
|
|
- if (rdev->irq.stat_regs.evergreen.disp_int_cont2 & DC_HPD3_RX_INTERRUPT) {
|
|
|
- rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~DC_HPD3_RX_INTERRUPT;
|
|
|
- queue_dp = true;
|
|
|
- DRM_DEBUG("IH: HPD_RX 3\n");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int_cont2 & DC_HPD3_RX_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int_cont2 &= ~DC_HPD3_RX_INTERRUPT;
|
|
|
+ queue_dp = true;
|
|
|
+ DRM_DEBUG("IH: HPD_RX 3\n");
|
|
|
break;
|
|
|
case 9:
|
|
|
- if (rdev->irq.stat_regs.evergreen.disp_int_cont3 & DC_HPD4_RX_INTERRUPT) {
|
|
|
- rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~DC_HPD4_RX_INTERRUPT;
|
|
|
- queue_dp = true;
|
|
|
- DRM_DEBUG("IH: HPD_RX 4\n");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int_cont3 & DC_HPD4_RX_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int_cont3 &= ~DC_HPD4_RX_INTERRUPT;
|
|
|
+ queue_dp = true;
|
|
|
+ DRM_DEBUG("IH: HPD_RX 4\n");
|
|
|
break;
|
|
|
case 10:
|
|
|
- if (rdev->irq.stat_regs.evergreen.disp_int_cont4 & DC_HPD5_RX_INTERRUPT) {
|
|
|
- rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~DC_HPD5_RX_INTERRUPT;
|
|
|
- queue_dp = true;
|
|
|
- DRM_DEBUG("IH: HPD_RX 5\n");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int_cont4 & DC_HPD5_RX_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int_cont4 &= ~DC_HPD5_RX_INTERRUPT;
|
|
|
+ queue_dp = true;
|
|
|
+ DRM_DEBUG("IH: HPD_RX 5\n");
|
|
|
break;
|
|
|
case 11:
|
|
|
- if (rdev->irq.stat_regs.evergreen.disp_int_cont5 & DC_HPD6_RX_INTERRUPT) {
|
|
|
- rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~DC_HPD6_RX_INTERRUPT;
|
|
|
- queue_dp = true;
|
|
|
- DRM_DEBUG("IH: HPD_RX 6\n");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.disp_int_cont5 & DC_HPD6_RX_INTERRUPT))
|
|
|
+ DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.disp_int_cont5 &= ~DC_HPD6_RX_INTERRUPT;
|
|
|
+ queue_dp = true;
|
|
|
+ DRM_DEBUG("IH: HPD_RX 6\n");
|
|
|
break;
|
|
|
default:
|
|
|
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
|
@@ -5199,46 +5235,52 @@ restart_ih:
|
|
|
case 44: /* hdmi */
|
|
|
switch (src_data) {
|
|
|
case 0:
|
|
|
- if (rdev->irq.stat_regs.evergreen.afmt_status1 & AFMT_AZ_FORMAT_WTRIG) {
|
|
|
- rdev->irq.stat_regs.evergreen.afmt_status1 &= ~AFMT_AZ_FORMAT_WTRIG;
|
|
|
- queue_hdmi = true;
|
|
|
- DRM_DEBUG("IH: HDMI0\n");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.afmt_status1 & AFMT_AZ_FORMAT_WTRIG))
|
|
|
+ DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.afmt_status1 &= ~AFMT_AZ_FORMAT_WTRIG;
|
|
|
+ queue_hdmi = true;
|
|
|
+ DRM_DEBUG("IH: HDMI0\n");
|
|
|
break;
|
|
|
case 1:
|
|
|
- if (rdev->irq.stat_regs.evergreen.afmt_status2 & AFMT_AZ_FORMAT_WTRIG) {
|
|
|
- rdev->irq.stat_regs.evergreen.afmt_status2 &= ~AFMT_AZ_FORMAT_WTRIG;
|
|
|
- queue_hdmi = true;
|
|
|
- DRM_DEBUG("IH: HDMI1\n");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.afmt_status2 & AFMT_AZ_FORMAT_WTRIG))
|
|
|
+ DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.afmt_status2 &= ~AFMT_AZ_FORMAT_WTRIG;
|
|
|
+ queue_hdmi = true;
|
|
|
+ DRM_DEBUG("IH: HDMI1\n");
|
|
|
break;
|
|
|
case 2:
|
|
|
- if (rdev->irq.stat_regs.evergreen.afmt_status3 & AFMT_AZ_FORMAT_WTRIG) {
|
|
|
- rdev->irq.stat_regs.evergreen.afmt_status3 &= ~AFMT_AZ_FORMAT_WTRIG;
|
|
|
- queue_hdmi = true;
|
|
|
- DRM_DEBUG("IH: HDMI2\n");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.afmt_status3 & AFMT_AZ_FORMAT_WTRIG))
|
|
|
+ DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.afmt_status3 &= ~AFMT_AZ_FORMAT_WTRIG;
|
|
|
+ queue_hdmi = true;
|
|
|
+ DRM_DEBUG("IH: HDMI2\n");
|
|
|
break;
|
|
|
case 3:
|
|
|
- if (rdev->irq.stat_regs.evergreen.afmt_status4 & AFMT_AZ_FORMAT_WTRIG) {
|
|
|
- rdev->irq.stat_regs.evergreen.afmt_status4 &= ~AFMT_AZ_FORMAT_WTRIG;
|
|
|
- queue_hdmi = true;
|
|
|
- DRM_DEBUG("IH: HDMI3\n");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.afmt_status4 & AFMT_AZ_FORMAT_WTRIG))
|
|
|
+ DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.afmt_status4 &= ~AFMT_AZ_FORMAT_WTRIG;
|
|
|
+ queue_hdmi = true;
|
|
|
+ DRM_DEBUG("IH: HDMI3\n");
|
|
|
break;
|
|
|
case 4:
|
|
|
- if (rdev->irq.stat_regs.evergreen.afmt_status5 & AFMT_AZ_FORMAT_WTRIG) {
|
|
|
- rdev->irq.stat_regs.evergreen.afmt_status5 &= ~AFMT_AZ_FORMAT_WTRIG;
|
|
|
- queue_hdmi = true;
|
|
|
- DRM_DEBUG("IH: HDMI4\n");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.afmt_status5 & AFMT_AZ_FORMAT_WTRIG))
|
|
|
+ DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.afmt_status5 &= ~AFMT_AZ_FORMAT_WTRIG;
|
|
|
+ queue_hdmi = true;
|
|
|
+ DRM_DEBUG("IH: HDMI4\n");
|
|
|
break;
|
|
|
case 5:
|
|
|
- if (rdev->irq.stat_regs.evergreen.afmt_status6 & AFMT_AZ_FORMAT_WTRIG) {
|
|
|
- rdev->irq.stat_regs.evergreen.afmt_status6 &= ~AFMT_AZ_FORMAT_WTRIG;
|
|
|
- queue_hdmi = true;
|
|
|
- DRM_DEBUG("IH: HDMI5\n");
|
|
|
- }
|
|
|
+ if (!(rdev->irq.stat_regs.evergreen.afmt_status6 & AFMT_AZ_FORMAT_WTRIG))
|
|
|
+ DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
|
|
+
|
|
|
+ rdev->irq.stat_regs.evergreen.afmt_status6 &= ~AFMT_AZ_FORMAT_WTRIG;
|
|
|
+ queue_hdmi = true;
|
|
|
+ DRM_DEBUG("IH: HDMI5\n");
|
|
|
break;
|
|
|
default:
|
|
|
DRM_ERROR("Unhandled interrupt: %d %d\n", src_id, src_data);
|