mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Signed-off-by: Mario Kleiner <[email protected]> CC: Michel Dänzer <[email protected]> CC: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
This commit is contained in:
parent
07f18f0bb8
commit
bd833144a2
3 changed files with 42 additions and 24 deletions
|
|
@ -3403,19 +3403,25 @@ static int dce_v10_0_crtc_irq(struct amdgpu_device *adev,
|
|||
|
||||
switch (entry->src_data) {
|
||||
case 0: /* vblank */
|
||||
if (disp_int & interrupt_status_offsets[crtc].vblank) {
|
||||
if (disp_int & interrupt_status_offsets[crtc].vblank)
|
||||
dce_v10_0_crtc_vblank_int_ack(adev, crtc);
|
||||
if (amdgpu_irq_enabled(adev, source, irq_type)) {
|
||||
drm_handle_vblank(adev->ddev, crtc);
|
||||
}
|
||||
DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
|
||||
else
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (amdgpu_irq_enabled(adev, source, irq_type)) {
|
||||
drm_handle_vblank(adev->ddev, crtc);
|
||||
}
|
||||
DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
|
||||
|
||||
break;
|
||||
case 1: /* vline */
|
||||
if (disp_int & interrupt_status_offsets[crtc].vline) {
|
||||
if (disp_int & interrupt_status_offsets[crtc].vline)
|
||||
dce_v10_0_crtc_vline_int_ack(adev, crtc);
|
||||
DRM_DEBUG("IH: D%d vline\n", crtc + 1);
|
||||
}
|
||||
else
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
DRM_DEBUG("IH: D%d vline\n", crtc + 1);
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", entry->src_id, entry->src_data);
|
||||
|
|
|
|||
|
|
@ -3402,19 +3402,25 @@ static int dce_v11_0_crtc_irq(struct amdgpu_device *adev,
|
|||
|
||||
switch (entry->src_data) {
|
||||
case 0: /* vblank */
|
||||
if (disp_int & interrupt_status_offsets[crtc].vblank) {
|
||||
if (disp_int & interrupt_status_offsets[crtc].vblank)
|
||||
dce_v11_0_crtc_vblank_int_ack(adev, crtc);
|
||||
if (amdgpu_irq_enabled(adev, source, irq_type)) {
|
||||
drm_handle_vblank(adev->ddev, crtc);
|
||||
}
|
||||
DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
|
||||
else
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (amdgpu_irq_enabled(adev, source, irq_type)) {
|
||||
drm_handle_vblank(adev->ddev, crtc);
|
||||
}
|
||||
DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
|
||||
|
||||
break;
|
||||
case 1: /* vline */
|
||||
if (disp_int & interrupt_status_offsets[crtc].vline) {
|
||||
if (disp_int & interrupt_status_offsets[crtc].vline)
|
||||
dce_v11_0_crtc_vline_int_ack(adev, crtc);
|
||||
DRM_DEBUG("IH: D%d vline\n", crtc + 1);
|
||||
}
|
||||
else
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
DRM_DEBUG("IH: D%d vline\n", crtc + 1);
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", entry->src_id, entry->src_data);
|
||||
|
|
|
|||
|
|
@ -3237,19 +3237,25 @@ static int dce_v8_0_crtc_irq(struct amdgpu_device *adev,
|
|||
|
||||
switch (entry->src_data) {
|
||||
case 0: /* vblank */
|
||||
if (disp_int & interrupt_status_offsets[crtc].vblank) {
|
||||
if (disp_int & interrupt_status_offsets[crtc].vblank)
|
||||
WREG32(mmLB_VBLANK_STATUS + crtc_offsets[crtc], LB_VBLANK_STATUS__VBLANK_ACK_MASK);
|
||||
if (amdgpu_irq_enabled(adev, source, irq_type)) {
|
||||
drm_handle_vblank(adev->ddev, crtc);
|
||||
}
|
||||
DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
|
||||
else
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (amdgpu_irq_enabled(adev, source, irq_type)) {
|
||||
drm_handle_vblank(adev->ddev, crtc);
|
||||
}
|
||||
DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
|
||||
|
||||
break;
|
||||
case 1: /* vline */
|
||||
if (disp_int & interrupt_status_offsets[crtc].vline) {
|
||||
if (disp_int & interrupt_status_offsets[crtc].vline)
|
||||
WREG32(mmLB_VLINE_STATUS + crtc_offsets[crtc], LB_VLINE_STATUS__VLINE_ACK_MASK);
|
||||
DRM_DEBUG("IH: D%d vline\n", crtc + 1);
|
||||
}
|
||||
else
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
DRM_DEBUG("IH: D%d vline\n", crtc + 1);
|
||||
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", entry->src_id, entry->src_data);
|
||||
|
|
|
|||
Loading…
Reference in a new issue