aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r600.c
diff options
context:
space:
mode:
authorMario Kleiner <mario.kleiner@tuebingen.mpg.de>2010-11-21 10:59:02 -0500
committerDave Airlie <airlied@redhat.com>2010-11-21 20:51:27 -0500
commit3e4ea7421f45966c93c8cbe81569e8dc93a58b87 (patch)
tree9a27cb7455aeed88a1ccaa0ec6d234b606c480f6 /drivers/gpu/drm/radeon/r600.c
parent6f34be50bd1bdd2ff3c955940e033a80d05f248a (diff)
drm/kms/radeon: Reorder vblank and pageflip interrupt handling.
In the vblank irq handler, calls to actual vblank handling, or at least drm_handle_vblank(), need to happen before calls to radeon_crtc_handle_flip(). Reason: The high precision pageflip timestamping and some other pageflip optimizations will need the updated vblank count and timestamps for the current vblank interval. These are calculated in drm_handle_vblank(), therefore it must go first. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600.c')
-rw-r--r--drivers/gpu/drm/radeon/r600.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 15b95724c408..7057b392e005 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -3294,13 +3294,13 @@ restart_ih:
3294 switch (src_data) { 3294 switch (src_data) {
3295 case 0: /* D1 vblank */ 3295 case 0: /* D1 vblank */
3296 if (rdev->irq.stat_regs.r600.disp_int & LB_D1_VBLANK_INTERRUPT) { 3296 if (rdev->irq.stat_regs.r600.disp_int & LB_D1_VBLANK_INTERRUPT) {
3297 if (rdev->irq.pflip[0])
3298 radeon_crtc_handle_flip(rdev, 0);
3299 if (rdev->irq.crtc_vblank_int[0]) { 3297 if (rdev->irq.crtc_vblank_int[0]) {
3300 drm_handle_vblank(rdev->ddev, 0); 3298 drm_handle_vblank(rdev->ddev, 0);
3301 rdev->pm.vblank_sync = true; 3299 rdev->pm.vblank_sync = true;
3302 wake_up(&rdev->irq.vblank_queue); 3300 wake_up(&rdev->irq.vblank_queue);
3303 } 3301 }
3302 if (rdev->irq.pflip[0])
3303 radeon_crtc_handle_flip(rdev, 0);
3304 rdev->irq.stat_regs.r600.disp_int &= ~LB_D1_VBLANK_INTERRUPT; 3304 rdev->irq.stat_regs.r600.disp_int &= ~LB_D1_VBLANK_INTERRUPT;
3305 DRM_DEBUG("IH: D1 vblank\n"); 3305 DRM_DEBUG("IH: D1 vblank\n");
3306 } 3306 }
@@ -3320,13 +3320,13 @@ restart_ih:
3320 switch (src_data) { 3320 switch (src_data) {
3321 case 0: /* D2 vblank */ 3321 case 0: /* D2 vblank */
3322 if (rdev->irq.stat_regs.r600.disp_int & LB_D2_VBLANK_INTERRUPT) { 3322 if (rdev->irq.stat_regs.r600.disp_int & LB_D2_VBLANK_INTERRUPT) {
3323 if (rdev->irq.pflip[1])
3324 radeon_crtc_handle_flip(rdev, 1);
3325 if (rdev->irq.crtc_vblank_int[1]) { 3323 if (rdev->irq.crtc_vblank_int[1]) {
3326 drm_handle_vblank(rdev->ddev, 1); 3324 drm_handle_vblank(rdev->ddev, 1);
3327 rdev->pm.vblank_sync = true; 3325 rdev->pm.vblank_sync = true;
3328 wake_up(&rdev->irq.vblank_queue); 3326 wake_up(&rdev->irq.vblank_queue);
3329 } 3327 }
3328 if (rdev->irq.pflip[1])
3329 radeon_crtc_handle_flip(rdev, 1);
3330 rdev->irq.stat_regs.r600.disp_int &= ~LB_D2_VBLANK_INTERRUPT; 3330 rdev->irq.stat_regs.r600.disp_int &= ~LB_D2_VBLANK_INTERRUPT;
3331 DRM_DEBUG("IH: D2 vblank\n"); 3331 DRM_DEBUG("IH: D2 vblank\n");
3332 } 3332 }