diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/cik.c')
| -rw-r--r-- | drivers/gpu/drm/radeon/cik.c | 336 |
1 files changed, 192 insertions, 144 deletions
diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index 4ecf5caa8c6d..248953d2fdb7 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c | |||
| @@ -7964,23 +7964,27 @@ restart_ih: | |||
| 7964 | case 1: /* D1 vblank/vline */ | 7964 | case 1: /* D1 vblank/vline */ |
| 7965 | switch (src_data) { | 7965 | switch (src_data) { |
| 7966 | case 0: /* D1 vblank */ | 7966 | case 0: /* D1 vblank */ |
| 7967 | if (rdev->irq.stat_regs.cik.disp_int & LB_D1_VBLANK_INTERRUPT) { | 7967 | if (!(rdev->irq.stat_regs.cik.disp_int & LB_D1_VBLANK_INTERRUPT)) |
| 7968 | if (rdev->irq.crtc_vblank_int[0]) { | 7968 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 7969 | drm_handle_vblank(rdev->ddev, 0); | 7969 | |
| 7970 | rdev->pm.vblank_sync = true; | 7970 | if (rdev->irq.crtc_vblank_int[0]) { |
| 7971 | wake_up(&rdev->irq.vblank_queue); | 7971 | drm_handle_vblank(rdev->ddev, 0); |
| 7972 | } | 7972 | rdev->pm.vblank_sync = true; |
| 7973 | if (atomic_read(&rdev->irq.pflip[0])) | 7973 | wake_up(&rdev->irq.vblank_queue); |
| 7974 | radeon_crtc_handle_vblank(rdev, 0); | ||
| 7975 | rdev->irq.stat_regs.cik.disp_int &= ~LB_D1_VBLANK_INTERRUPT; | ||
| 7976 | DRM_DEBUG("IH: D1 vblank\n"); | ||
| 7977 | } | 7974 | } |
| 7975 | if (atomic_read(&rdev->irq.pflip[0])) | ||
| 7976 | radeon_crtc_handle_vblank(rdev, 0); | ||
| 7977 | rdev->irq.stat_regs.cik.disp_int &= ~LB_D1_VBLANK_INTERRUPT; | ||
| 7978 | DRM_DEBUG("IH: D1 vblank\n"); | ||
| 7979 | |||
| 7978 | break; | 7980 | break; |
| 7979 | case 1: /* D1 vline */ | 7981 | case 1: /* D1 vline */ |
| 7980 | if (rdev->irq.stat_regs.cik.disp_int & LB_D1_VLINE_INTERRUPT) { | 7982 | if (!(rdev->irq.stat_regs.cik.disp_int & LB_D1_VLINE_INTERRUPT)) |
| 7981 | rdev->irq.stat_regs.cik.disp_int &= ~LB_D1_VLINE_INTERRUPT; | 7983 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 7982 | DRM_DEBUG("IH: D1 vline\n"); | 7984 | |
| 7983 | } | 7985 | rdev->irq.stat_regs.cik.disp_int &= ~LB_D1_VLINE_INTERRUPT; |
| 7986 | DRM_DEBUG("IH: D1 vline\n"); | ||
| 7987 | |||
| 7984 | break; | 7988 | break; |
| 7985 | default: | 7989 | default: |
| 7986 | DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); | 7990 | DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); |
| @@ -7990,23 +7994,27 @@ restart_ih: | |||
| 7990 | case 2: /* D2 vblank/vline */ | 7994 | case 2: /* D2 vblank/vline */ |
| 7991 | switch (src_data) { | 7995 | switch (src_data) { |
| 7992 | case 0: /* D2 vblank */ | 7996 | case 0: /* D2 vblank */ |
| 7993 | if (rdev->irq.stat_regs.cik.disp_int_cont & LB_D2_VBLANK_INTERRUPT) { | 7997 | if (!(rdev->irq.stat_regs.cik.disp_int_cont & LB_D2_VBLANK_INTERRUPT)) |
| 7994 | if (rdev->irq.crtc_vblank_int[1]) { | 7998 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 7995 | drm_handle_vblank(rdev->ddev, 1); | 7999 | |
| 7996 | rdev->pm.vblank_sync = true; | 8000 | if (rdev->irq.crtc_vblank_int[1]) { |
| 7997 | wake_up(&rdev->irq.vblank_queue); | 8001 | drm_handle_vblank(rdev->ddev, 1); |
| 7998 | } | 8002 | rdev->pm.vblank_sync = true; |
| 7999 | if (atomic_read(&rdev->irq.pflip[1])) | 8003 | wake_up(&rdev->irq.vblank_queue); |
| 8000 | radeon_crtc_handle_vblank(rdev, 1); | ||
| 8001 | rdev->irq.stat_regs.cik.disp_int_cont &= ~LB_D2_VBLANK_INTERRUPT; | ||
| 8002 | DRM_DEBUG("IH: D2 vblank\n"); | ||
| 8003 | } | 8004 | } |
| 8005 | if (atomic_read(&rdev->irq.pflip[1])) | ||
| 8006 | radeon_crtc_handle_vblank(rdev, 1); | ||
| 8007 | rdev->irq.stat_regs.cik.disp_int_cont &= ~LB_D2_VBLANK_INTERRUPT; | ||
| 8008 | DRM_DEBUG("IH: D2 vblank\n"); | ||
| 8009 | |||
| 8004 | break; | 8010 | break; |
| 8005 | case 1: /* D2 vline */ | 8011 | case 1: /* D2 vline */ |
| 8006 | if (rdev->irq.stat_regs.cik.disp_int_cont & LB_D2_VLINE_INTERRUPT) { | 8012 | if (!(rdev->irq.stat_regs.cik.disp_int_cont & LB_D2_VLINE_INTERRUPT)) |
| 8007 | rdev->irq.stat_regs.cik.disp_int_cont &= ~LB_D2_VLINE_INTERRUPT; | 8013 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8008 | DRM_DEBUG("IH: D2 vline\n"); | 8014 | |
| 8009 | } | 8015 | rdev->irq.stat_regs.cik.disp_int_cont &= ~LB_D2_VLINE_INTERRUPT; |
| 8016 | DRM_DEBUG("IH: D2 vline\n"); | ||
| 8017 | |||
| 8010 | break; | 8018 | break; |
| 8011 | default: | 8019 | default: |
| 8012 | DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); | 8020 | DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); |
| @@ -8016,23 +8024,27 @@ restart_ih: | |||
| 8016 | case 3: /* D3 vblank/vline */ | 8024 | case 3: /* D3 vblank/vline */ |
| 8017 | switch (src_data) { | 8025 | switch (src_data) { |
| 8018 | case 0: /* D3 vblank */ | 8026 | case 0: /* D3 vblank */ |
| 8019 | if (rdev->irq.stat_regs.cik.disp_int_cont2 & LB_D3_VBLANK_INTERRUPT) { | 8027 | if (!(rdev->irq.stat_regs.cik.disp_int_cont2 & LB_D3_VBLANK_INTERRUPT)) |
| 8020 | if (rdev->irq.crtc_vblank_int[2]) { | 8028 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8021 | drm_handle_vblank(rdev->ddev, 2); | 8029 | |
| 8022 | rdev->pm.vblank_sync = true; | 8030 | if (rdev->irq.crtc_vblank_int[2]) { |
| 8023 | wake_up(&rdev->irq.vblank_queue); | 8031 | drm_handle_vblank(rdev->ddev, 2); |
| 8024 | } | 8032 | rdev->pm.vblank_sync = true; |
| 8025 | if (atomic_read(&rdev->irq.pflip[2])) | 8033 | wake_up(&rdev->irq.vblank_queue); |
| 8026 | radeon_crtc_handle_vblank(rdev, 2); | ||
| 8027 | rdev->irq.stat_regs.cik.disp_int_cont2 &= ~LB_D3_VBLANK_INTERRUPT; | ||
| 8028 | DRM_DEBUG("IH: D3 vblank\n"); | ||
| 8029 | } | 8034 | } |
| 8035 | if (atomic_read(&rdev->irq.pflip[2])) | ||
| 8036 | radeon_crtc_handle_vblank(rdev, 2); | ||
| 8037 | rdev->irq.stat_regs.cik.disp_int_cont2 &= ~LB_D3_VBLANK_INTERRUPT; | ||
| 8038 | DRM_DEBUG("IH: D3 vblank\n"); | ||
| 8039 | |||
| 8030 | break; | 8040 | break; |
| 8031 | case 1: /* D3 vline */ | 8041 | case 1: /* D3 vline */ |
| 8032 | if (rdev->irq.stat_regs.cik.disp_int_cont2 & LB_D3_VLINE_INTERRUPT) { | 8042 | if (!(rdev->irq.stat_regs.cik.disp_int_cont2 & LB_D3_VLINE_INTERRUPT)) |
| 8033 | rdev->irq.stat_regs.cik.disp_int_cont2 &= ~LB_D3_VLINE_INTERRUPT; | 8043 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8034 | DRM_DEBUG("IH: D3 vline\n"); | 8044 | |
| 8035 | } | 8045 | rdev->irq.stat_regs.cik.disp_int_cont2 &= ~LB_D3_VLINE_INTERRUPT; |
| 8046 | DRM_DEBUG("IH: D3 vline\n"); | ||
| 8047 | |||
| 8036 | break; | 8048 | break; |
| 8037 | default: | 8049 | default: |
| 8038 | DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); | 8050 | DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); |
| @@ -8042,23 +8054,27 @@ restart_ih: | |||
| 8042 | case 4: /* D4 vblank/vline */ | 8054 | case 4: /* D4 vblank/vline */ |
| 8043 | switch (src_data) { | 8055 | switch (src_data) { |
| 8044 | case 0: /* D4 vblank */ | 8056 | case 0: /* D4 vblank */ |
| 8045 | if (rdev->irq.stat_regs.cik.disp_int_cont3 & LB_D4_VBLANK_INTERRUPT) { | 8057 | if (!(rdev->irq.stat_regs.cik.disp_int_cont3 & LB_D4_VBLANK_INTERRUPT)) |
| 8046 | if (rdev->irq.crtc_vblank_int[3]) { | 8058 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8047 | drm_handle_vblank(rdev->ddev, 3); | 8059 | |
| 8048 | rdev->pm.vblank_sync = true; | 8060 | if (rdev->irq.crtc_vblank_int[3]) { |
| 8049 | wake_up(&rdev->irq.vblank_queue); | 8061 | drm_handle_vblank(rdev->ddev, 3); |
| 8050 | } | 8062 | rdev->pm.vblank_sync = true; |
| 8051 | if (atomic_read(&rdev->irq.pflip[3])) | 8063 | wake_up(&rdev->irq.vblank_queue); |
| 8052 | radeon_crtc_handle_vblank(rdev, 3); | ||
| 8053 | rdev->irq.stat_regs.cik.disp_int_cont3 &= ~LB_D4_VBLANK_INTERRUPT; | ||
| 8054 | DRM_DEBUG("IH: D4 vblank\n"); | ||
| 8055 | } | 8064 | } |
| 8065 | if (atomic_read(&rdev->irq.pflip[3])) | ||
| 8066 | radeon_crtc_handle_vblank(rdev, 3); | ||
| 8067 | rdev->irq.stat_regs.cik.disp_int_cont3 &= ~LB_D4_VBLANK_INTERRUPT; | ||
| 8068 | DRM_DEBUG("IH: D4 vblank\n"); | ||
| 8069 | |||
| 8056 | break; | 8070 | break; |
| 8057 | case 1: /* D4 vline */ | 8071 | case 1: /* D4 vline */ |
| 8058 | if (rdev->irq.stat_regs.cik.disp_int_cont3 & LB_D4_VLINE_INTERRUPT) { | 8072 | if (!(rdev->irq.stat_regs.cik.disp_int_cont3 & LB_D4_VLINE_INTERRUPT)) |
| 8059 | rdev->irq.stat_regs.cik.disp_int_cont3 &= ~LB_D4_VLINE_INTERRUPT; | 8073 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8060 | DRM_DEBUG("IH: D4 vline\n"); | 8074 | |
| 8061 | } | 8075 | rdev->irq.stat_regs.cik.disp_int_cont3 &= ~LB_D4_VLINE_INTERRUPT; |
| 8076 | DRM_DEBUG("IH: D4 vline\n"); | ||
| 8077 | |||
| 8062 | break; | 8078 | break; |
| 8063 | default: | 8079 | default: |
| 8064 | DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); | 8080 | DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); |
| @@ -8068,23 +8084,27 @@ restart_ih: | |||
| 8068 | case 5: /* D5 vblank/vline */ | 8084 | case 5: /* D5 vblank/vline */ |
| 8069 | switch (src_data) { | 8085 | switch (src_data) { |
| 8070 | case 0: /* D5 vblank */ | 8086 | case 0: /* D5 vblank */ |
| 8071 | if (rdev->irq.stat_regs.cik.disp_int_cont4 & LB_D5_VBLANK_INTERRUPT) { | 8087 | if (!(rdev->irq.stat_regs.cik.disp_int_cont4 & LB_D5_VBLANK_INTERRUPT)) |
| 8072 | if (rdev->irq.crtc_vblank_int[4]) { | 8088 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8073 | drm_handle_vblank(rdev->ddev, 4); | 8089 | |
| 8074 | rdev->pm.vblank_sync = true; | 8090 | if (rdev->irq.crtc_vblank_int[4]) { |
| 8075 | wake_up(&rdev->irq.vblank_queue); | 8091 | drm_handle_vblank(rdev->ddev, 4); |
| 8076 | } | 8092 | rdev->pm.vblank_sync = true; |
| 8077 | if (atomic_read(&rdev->irq.pflip[4])) | 8093 | wake_up(&rdev->irq.vblank_queue); |
| 8078 | radeon_crtc_handle_vblank(rdev, 4); | ||
| 8079 | rdev->irq.stat_regs.cik.disp_int_cont4 &= ~LB_D5_VBLANK_INTERRUPT; | ||
| 8080 | DRM_DEBUG("IH: D5 vblank\n"); | ||
| 8081 | } | 8094 | } |
| 8095 | if (atomic_read(&rdev->irq.pflip[4])) | ||
| 8096 | radeon_crtc_handle_vblank(rdev, 4); | ||
| 8097 | rdev->irq.stat_regs.cik.disp_int_cont4 &= ~LB_D5_VBLANK_INTERRUPT; | ||
| 8098 | DRM_DEBUG("IH: D5 vblank\n"); | ||
| 8099 | |||
| 8082 | break; | 8100 | break; |
| 8083 | case 1: /* D5 vline */ | 8101 | case 1: /* D5 vline */ |
| 8084 | if (rdev->irq.stat_regs.cik.disp_int_cont4 & LB_D5_VLINE_INTERRUPT) { | 8102 | if (!(rdev->irq.stat_regs.cik.disp_int_cont4 & LB_D5_VLINE_INTERRUPT)) |
| 8085 | rdev->irq.stat_regs.cik.disp_int_cont4 &= ~LB_D5_VLINE_INTERRUPT; | 8103 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8086 | DRM_DEBUG("IH: D5 vline\n"); | 8104 | |
| 8087 | } | 8105 | rdev->irq.stat_regs.cik.disp_int_cont4 &= ~LB_D5_VLINE_INTERRUPT; |
| 8106 | DRM_DEBUG("IH: D5 vline\n"); | ||
| 8107 | |||
| 8088 | break; | 8108 | break; |
| 8089 | default: | 8109 | default: |
| 8090 | DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); | 8110 | DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); |
| @@ -8094,23 +8114,27 @@ restart_ih: | |||
| 8094 | case 6: /* D6 vblank/vline */ | 8114 | case 6: /* D6 vblank/vline */ |
| 8095 | switch (src_data) { | 8115 | switch (src_data) { |
| 8096 | case 0: /* D6 vblank */ | 8116 | case 0: /* D6 vblank */ |
| 8097 | if (rdev->irq.stat_regs.cik.disp_int_cont5 & LB_D6_VBLANK_INTERRUPT) { | 8117 | if (!(rdev->irq.stat_regs.cik.disp_int_cont5 & LB_D6_VBLANK_INTERRUPT)) |
| 8098 | if (rdev->irq.crtc_vblank_int[5]) { | 8118 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8099 | drm_handle_vblank(rdev->ddev, 5); | 8119 | |
| 8100 | rdev->pm.vblank_sync = true; | 8120 | if (rdev->irq.crtc_vblank_int[5]) { |
| 8101 | wake_up(&rdev->irq.vblank_queue); | 8121 | drm_handle_vblank(rdev->ddev, 5); |
| 8102 | } | 8122 | rdev->pm.vblank_sync = true; |
| 8103 | if (atomic_read(&rdev->irq.pflip[5])) | 8123 | wake_up(&rdev->irq.vblank_queue); |
| 8104 | radeon_crtc_handle_vblank(rdev, 5); | ||
| 8105 | rdev->irq.stat_regs.cik.disp_int_cont5 &= ~LB_D6_VBLANK_INTERRUPT; | ||
| 8106 | DRM_DEBUG("IH: D6 vblank\n"); | ||
| 8107 | } | 8124 | } |
| 8125 | if (atomic_read(&rdev->irq.pflip[5])) | ||
| 8126 | radeon_crtc_handle_vblank(rdev, 5); | ||
| 8127 | rdev->irq.stat_regs.cik.disp_int_cont5 &= ~LB_D6_VBLANK_INTERRUPT; | ||
| 8128 | DRM_DEBUG("IH: D6 vblank\n"); | ||
| 8129 | |||
| 8108 | break; | 8130 | break; |
| 8109 | case 1: /* D6 vline */ | 8131 | case 1: /* D6 vline */ |
| 8110 | if (rdev->irq.stat_regs.cik.disp_int_cont5 & LB_D6_VLINE_INTERRUPT) { | 8132 | if (!(rdev->irq.stat_regs.cik.disp_int_cont5 & LB_D6_VLINE_INTERRUPT)) |
| 8111 | rdev->irq.stat_regs.cik.disp_int_cont5 &= ~LB_D6_VLINE_INTERRUPT; | 8133 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8112 | DRM_DEBUG("IH: D6 vline\n"); | 8134 | |
| 8113 | } | 8135 | rdev->irq.stat_regs.cik.disp_int_cont5 &= ~LB_D6_VLINE_INTERRUPT; |
| 8136 | DRM_DEBUG("IH: D6 vline\n"); | ||
| 8137 | |||
| 8114 | break; | 8138 | break; |
| 8115 | default: | 8139 | default: |
| 8116 | DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); | 8140 | DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); |
| @@ -8130,88 +8154,112 @@ restart_ih: | |||
| 8130 | case 42: /* HPD hotplug */ | 8154 | case 42: /* HPD hotplug */ |
| 8131 | switch (src_data) { | 8155 | switch (src_data) { |
| 8132 | case 0: | 8156 | case 0: |
| 8133 | if (rdev->irq.stat_regs.cik.disp_int & DC_HPD1_INTERRUPT) { | 8157 | if (!(rdev->irq.stat_regs.cik.disp_int & DC_HPD1_INTERRUPT)) |
| 8134 | rdev->irq.stat_regs.cik.disp_int &= ~DC_HPD1_INTERRUPT; | 8158 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8135 | queue_hotplug = true; | 8159 | |
| 8136 | DRM_DEBUG("IH: HPD1\n"); | 8160 | rdev->irq.stat_regs.cik.disp_int &= ~DC_HPD1_INTERRUPT; |
| 8137 | } | 8161 | queue_hotplug = true; |
| 8162 | DRM_DEBUG("IH: HPD1\n"); | ||
| 8163 | |||
| 8138 | break; | 8164 | break; |
| 8139 | case 1: | 8165 | case 1: |
| 8140 | if (rdev->irq.stat_regs.cik.disp_int_cont & DC_HPD2_INTERRUPT) { | 8166 | if (!(rdev->irq.stat_regs.cik.disp_int_cont & DC_HPD2_INTERRUPT)) |
| 8141 | rdev->irq.stat_regs.cik.disp_int_cont &= ~DC_HPD2_INTERRUPT; | 8167 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8142 | queue_hotplug = true; | 8168 | |
| 8143 | DRM_DEBUG("IH: HPD2\n"); | 8169 | rdev->irq.stat_regs.cik.disp_int_cont &= ~DC_HPD2_INTERRUPT; |
| 8144 | } | 8170 | queue_hotplug = true; |
| 8171 | DRM_DEBUG("IH: HPD2\n"); | ||
| 8172 | |||
| 8145 | break; | 8173 | break; |
| 8146 | case 2: | 8174 | case 2: |
| 8147 | if (rdev->irq.stat_regs.cik.disp_int_cont2 & DC_HPD3_INTERRUPT) { | 8175 | if (!(rdev->irq.stat_regs.cik.disp_int_cont2 & DC_HPD3_INTERRUPT)) |
| 8148 | rdev->irq.stat_regs.cik.disp_int_cont2 &= ~DC_HPD3_INTERRUPT; | 8176 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8149 | queue_hotplug = true; | 8177 | |
| 8150 | DRM_DEBUG("IH: HPD3\n"); | 8178 | rdev->irq.stat_regs.cik.disp_int_cont2 &= ~DC_HPD3_INTERRUPT; |
| 8151 | } | 8179 | queue_hotplug = true; |
| 8180 | DRM_DEBUG("IH: HPD3\n"); | ||
| 8181 | |||
| 8152 | break; | 8182 | break; |
| 8153 | case 3: | 8183 | case 3: |
| 8154 | if (rdev->irq.stat_regs.cik.disp_int_cont3 & DC_HPD4_INTERRUPT) { | 8184 | if (!(rdev->irq.stat_regs.cik.disp_int_cont3 & DC_HPD4_INTERRUPT)) |
| 8155 | rdev->irq.stat_regs.cik.disp_int_cont3 &= ~DC_HPD4_INTERRUPT; | 8185 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8156 | queue_hotplug = true; | 8186 | |
| 8157 | DRM_DEBUG("IH: HPD4\n"); | 8187 | rdev->irq.stat_regs.cik.disp_int_cont3 &= ~DC_HPD4_INTERRUPT; |
| 8158 | } | 8188 | queue_hotplug = true; |
| 8189 | DRM_DEBUG("IH: HPD4\n"); | ||
| 8190 | |||
| 8159 | break; | 8191 | break; |
| 8160 | case 4: | 8192 | case 4: |
| 8161 | if (rdev->irq.stat_regs.cik.disp_int_cont4 & DC_HPD5_INTERRUPT) { | 8193 | if (!(rdev->irq.stat_regs.cik.disp_int_cont4 & DC_HPD5_INTERRUPT)) |
| 8162 | rdev->irq.stat_regs.cik.disp_int_cont4 &= ~DC_HPD5_INTERRUPT; | 8194 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8163 | queue_hotplug = true; | 8195 | |
| 8164 | DRM_DEBUG("IH: HPD5\n"); | 8196 | rdev->irq.stat_regs.cik.disp_int_cont4 &= ~DC_HPD5_INTERRUPT; |
| 8165 | } | 8197 | queue_hotplug = true; |
| 8198 | DRM_DEBUG("IH: HPD5\n"); | ||
| 8199 | |||
| 8166 | break; | 8200 | break; |
| 8167 | case 5: | 8201 | case 5: |
| 8168 | if (rdev->irq.stat_regs.cik.disp_int_cont5 & DC_HPD6_INTERRUPT) { | 8202 | if (!(rdev->irq.stat_regs.cik.disp_int_cont5 & DC_HPD6_INTERRUPT)) |
| 8169 | rdev->irq.stat_regs.cik.disp_int_cont5 &= ~DC_HPD6_INTERRUPT; | 8203 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8170 | queue_hotplug = true; | 8204 | |
| 8171 | DRM_DEBUG("IH: HPD6\n"); | 8205 | rdev->irq.stat_regs.cik.disp_int_cont5 &= ~DC_HPD6_INTERRUPT; |
| 8172 | } | 8206 | queue_hotplug = true; |
| 8207 | DRM_DEBUG("IH: HPD6\n"); | ||
| 8208 | |||
| 8173 | break; | 8209 | break; |
| 8174 | case 6: | 8210 | case 6: |
| 8175 | if (rdev->irq.stat_regs.cik.disp_int & DC_HPD1_RX_INTERRUPT) { | 8211 | if (!(rdev->irq.stat_regs.cik.disp_int & DC_HPD1_RX_INTERRUPT)) |
| 8176 | rdev->irq.stat_regs.cik.disp_int &= ~DC_HPD1_RX_INTERRUPT; | 8212 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8177 | queue_dp = true; | 8213 | |
| 8178 | DRM_DEBUG("IH: HPD_RX 1\n"); | 8214 | rdev->irq.stat_regs.cik.disp_int &= ~DC_HPD1_RX_INTERRUPT; |
| 8179 | } | 8215 | queue_dp = true; |
| 8216 | DRM_DEBUG("IH: HPD_RX 1\n"); | ||
| 8217 | |||
| 8180 | break; | 8218 | break; |
| 8181 | case 7: | 8219 | case 7: |
| 8182 | if (rdev->irq.stat_regs.cik.disp_int_cont & DC_HPD2_RX_INTERRUPT) { | 8220 | if (!(rdev->irq.stat_regs.cik.disp_int_cont & DC_HPD2_RX_INTERRUPT)) |
| 8183 | rdev->irq.stat_regs.cik.disp_int_cont &= ~DC_HPD2_RX_INTERRUPT; | 8221 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8184 | queue_dp = true; | 8222 | |
| 8185 | DRM_DEBUG("IH: HPD_RX 2\n"); | 8223 | rdev->irq.stat_regs.cik.disp_int_cont &= ~DC_HPD2_RX_INTERRUPT; |
| 8186 | } | 8224 | queue_dp = true; |
| 8225 | DRM_DEBUG("IH: HPD_RX 2\n"); | ||
| 8226 | |||
| 8187 | break; | 8227 | break; |
| 8188 | case 8: | 8228 | case 8: |
| 8189 | if (rdev->irq.stat_regs.cik.disp_int_cont2 & DC_HPD3_RX_INTERRUPT) { | 8229 | if (!(rdev->irq.stat_regs.cik.disp_int_cont2 & DC_HPD3_RX_INTERRUPT)) |
| 8190 | rdev->irq.stat_regs.cik.disp_int_cont2 &= ~DC_HPD3_RX_INTERRUPT; | 8230 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8191 | queue_dp = true; | 8231 | |
| 8192 | DRM_DEBUG("IH: HPD_RX 3\n"); | 8232 | rdev->irq.stat_regs.cik.disp_int_cont2 &= ~DC_HPD3_RX_INTERRUPT; |
| 8193 | } | 8233 | queue_dp = true; |
| 8234 | DRM_DEBUG("IH: HPD_RX 3\n"); | ||
| 8235 | |||
| 8194 | break; | 8236 | break; |
| 8195 | case 9: | 8237 | case 9: |
| 8196 | if (rdev->irq.stat_regs.cik.disp_int_cont3 & DC_HPD4_RX_INTERRUPT) { | 8238 | if (!(rdev->irq.stat_regs.cik.disp_int_cont3 & DC_HPD4_RX_INTERRUPT)) |
| 8197 | rdev->irq.stat_regs.cik.disp_int_cont3 &= ~DC_HPD4_RX_INTERRUPT; | 8239 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8198 | queue_dp = true; | 8240 | |
| 8199 | DRM_DEBUG("IH: HPD_RX 4\n"); | 8241 | rdev->irq.stat_regs.cik.disp_int_cont3 &= ~DC_HPD4_RX_INTERRUPT; |
| 8200 | } | 8242 | queue_dp = true; |
| 8243 | DRM_DEBUG("IH: HPD_RX 4\n"); | ||
| 8244 | |||
| 8201 | break; | 8245 | break; |
| 8202 | case 10: | 8246 | case 10: |
| 8203 | if (rdev->irq.stat_regs.cik.disp_int_cont4 & DC_HPD5_RX_INTERRUPT) { | 8247 | if (!(rdev->irq.stat_regs.cik.disp_int_cont4 & DC_HPD5_RX_INTERRUPT)) |
| 8204 | rdev->irq.stat_regs.cik.disp_int_cont4 &= ~DC_HPD5_RX_INTERRUPT; | 8248 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8205 | queue_dp = true; | 8249 | |
| 8206 | DRM_DEBUG("IH: HPD_RX 5\n"); | 8250 | rdev->irq.stat_regs.cik.disp_int_cont4 &= ~DC_HPD5_RX_INTERRUPT; |
| 8207 | } | 8251 | queue_dp = true; |
| 8252 | DRM_DEBUG("IH: HPD_RX 5\n"); | ||
| 8253 | |||
| 8208 | break; | 8254 | break; |
| 8209 | case 11: | 8255 | case 11: |
| 8210 | if (rdev->irq.stat_regs.cik.disp_int_cont5 & DC_HPD6_RX_INTERRUPT) { | 8256 | if (!(rdev->irq.stat_regs.cik.disp_int_cont5 & DC_HPD6_RX_INTERRUPT)) |
| 8211 | rdev->irq.stat_regs.cik.disp_int_cont5 &= ~DC_HPD6_RX_INTERRUPT; | 8257 | DRM_DEBUG("IH: IH event w/o asserted irq bit?\n"); |
| 8212 | queue_dp = true; | 8258 | |
| 8213 | DRM_DEBUG("IH: HPD_RX 6\n"); | 8259 | rdev->irq.stat_regs.cik.disp_int_cont5 &= ~DC_HPD6_RX_INTERRUPT; |
| 8214 | } | 8260 | queue_dp = true; |
| 8261 | DRM_DEBUG("IH: HPD_RX 6\n"); | ||
| 8262 | |||
| 8215 | break; | 8263 | break; |
| 8216 | default: | 8264 | default: |
| 8217 | DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); | 8265 | DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data); |
