aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
diff options
context:
space:
mode:
authorVitaly Prosyak <vitaly.prosyak@amd.com>2015-10-20 15:02:03 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-02-10 16:08:55 -0500
commit6bd9e877ce5322baf84c991c4509b49cf39a9b57 (patch)
tree41750b369880b1372874e0a72f16f38f44fdb816 /drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
parent9ddf940f5d73ca4a0ee1e8f65993f7f080f1ed20 (diff)
drm/amdgpu: Move MMIO flip out of spinlocked region
Prior actual MMIO flip we need to acquire DAL mutex to guard our target state which get modified on reset mode. Assign page flip status before actual flip to handle the possible race condition with interrupt. Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_display.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_display.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index acd066d0a805..531627b0a900 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -118,12 +118,12 @@ static void amdgpu_flip_work_func(struct work_struct *__work)
118 spin_lock_irqsave(&crtc->dev->event_lock, flags); 118 spin_lock_irqsave(&crtc->dev->event_lock, flags);
119 }; 119 };
120 120
121 /* do the flip (mmio) */
122 adev->mode_info.funcs->page_flip(adev, work->crtc_id, work->base);
123 /* set the flip status */ 121 /* set the flip status */
124 amdgpuCrtc->pflip_status = AMDGPU_FLIP_SUBMITTED; 122 amdgpuCrtc->pflip_status = AMDGPU_FLIP_SUBMITTED;
125
126 spin_unlock_irqrestore(&crtc->dev->event_lock, flags); 123 spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
124
125 /* Do the flip (mmio) */
126 adev->mode_info.funcs->page_flip(adev, work->crtc_id, work->base);
127} 127}
128 128
129/* 129/*