aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r600.c
diff options
context:
space:
mode:
authorChristian Koenig <christian.koenig@amd.com>2012-05-17 13:52:00 -0400
committerChristian König <deathsimple@vodafone.de>2012-06-21 03:38:53 -0400
commit736fc37fd7c7634e939e9ec0c67765941913bb82 (patch)
treebf98094b72dc7b41ae4714a7b51f0e54d799419a /drivers/gpu/drm/radeon/r600.c
parentfb98257a9d9d2089972b18079d5bdd4412e107e2 (diff)
drm/radeon: replace pflip and sw_int counters with atomics
So we can skip the locking. Also renames sw_int to ring_int, cause that better matches its purpose. Signed-off-by: Christian Koenig <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600.c')
-rw-r--r--drivers/gpu/drm/radeon/r600.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 9cd77286542c..43d0c41922a5 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -3025,18 +3025,18 @@ int r600_irq_set(struct radeon_device *rdev)
3025 hdmi1 = RREG32(HDMI1_AUDIO_PACKET_CONTROL) & ~HDMI0_AZ_FORMAT_WTRIG_MASK; 3025 hdmi1 = RREG32(HDMI1_AUDIO_PACKET_CONTROL) & ~HDMI0_AZ_FORMAT_WTRIG_MASK;
3026 } 3026 }
3027 3027
3028 if (rdev->irq.sw_int[RADEON_RING_TYPE_GFX_INDEX]) { 3028 if (atomic_read(&rdev->irq.ring_int[RADEON_RING_TYPE_GFX_INDEX])) {
3029 DRM_DEBUG("r600_irq_set: sw int\n"); 3029 DRM_DEBUG("r600_irq_set: sw int\n");
3030 cp_int_cntl |= RB_INT_ENABLE; 3030 cp_int_cntl |= RB_INT_ENABLE;
3031 cp_int_cntl |= TIME_STAMP_INT_ENABLE; 3031 cp_int_cntl |= TIME_STAMP_INT_ENABLE;
3032 } 3032 }
3033 if (rdev->irq.crtc_vblank_int[0] || 3033 if (rdev->irq.crtc_vblank_int[0] ||
3034 rdev->irq.pflip[0]) { 3034 atomic_read(&rdev->irq.pflip[0])) {
3035 DRM_DEBUG("r600_irq_set: vblank 0\n"); 3035 DRM_DEBUG("r600_irq_set: vblank 0\n");
3036 mode_int |= D1MODE_VBLANK_INT_MASK; 3036 mode_int |= D1MODE_VBLANK_INT_MASK;
3037 } 3037 }
3038 if (rdev->irq.crtc_vblank_int[1] || 3038 if (rdev->irq.crtc_vblank_int[1] ||
3039 rdev->irq.pflip[1]) { 3039 atomic_read(&rdev->irq.pflip[1])) {
3040 DRM_DEBUG("r600_irq_set: vblank 1\n"); 3040 DRM_DEBUG("r600_irq_set: vblank 1\n");
3041 mode_int |= D2MODE_VBLANK_INT_MASK; 3041 mode_int |= D2MODE_VBLANK_INT_MASK;
3042 } 3042 }
@@ -3334,7 +3334,7 @@ restart_ih:
3334 rdev->pm.vblank_sync = true; 3334 rdev->pm.vblank_sync = true;
3335 wake_up(&rdev->irq.vblank_queue); 3335 wake_up(&rdev->irq.vblank_queue);
3336 } 3336 }
3337 if (rdev->irq.pflip[0]) 3337 if (atomic_read(&rdev->irq.pflip[0]))
3338 radeon_crtc_handle_flip(rdev, 0); 3338 radeon_crtc_handle_flip(rdev, 0);
3339 rdev->irq.stat_regs.r600.disp_int &= ~LB_D1_VBLANK_INTERRUPT; 3339 rdev->irq.stat_regs.r600.disp_int &= ~LB_D1_VBLANK_INTERRUPT;
3340 DRM_DEBUG("IH: D1 vblank\n"); 3340 DRM_DEBUG("IH: D1 vblank\n");
@@ -3360,7 +3360,7 @@ restart_ih:
3360 rdev->pm.vblank_sync = true; 3360 rdev->pm.vblank_sync = true;
3361 wake_up(&rdev->irq.vblank_queue); 3361 wake_up(&rdev->irq.vblank_queue);
3362 } 3362 }
3363 if (rdev->irq.pflip[1]) 3363 if (atomic_read(&rdev->irq.pflip[1]))
3364 radeon_crtc_handle_flip(rdev, 1); 3364 radeon_crtc_handle_flip(rdev, 1);
3365 rdev->irq.stat_regs.r600.disp_int &= ~LB_D2_VBLANK_INTERRUPT; 3365 rdev->irq.stat_regs.r600.disp_int &= ~LB_D2_VBLANK_INTERRUPT;
3366 DRM_DEBUG("IH: D2 vblank\n"); 3366 DRM_DEBUG("IH: D2 vblank\n");