@@ -311,11 +311,15 @@ int r100_irq_process(struct radeon_device *rdev)
}
/* Vertical blank interrupts */
if (status & RADEON_CRTC_VBLANK_STAT) {
+ if (!rdev->pm.vblank_sync)
+ radeon_pm_debug_check_in_vbl(rdev, false);
drm_handle_vblank(rdev->ddev, 0);
rdev->pm.vblank_sync = true;
wake_up(&rdev->irq.vblank_queue);
}
if (status & RADEON_CRTC2_VBLANK_STAT) {
+ if (!rdev->pm.vblank_sync)
+ radeon_pm_debug_check_in_vbl(rdev, false);
drm_handle_vblank(rdev->ddev, 1);
rdev->pm.vblank_sync = true;
wake_up(&rdev->irq.vblank_queue);
@@ -2764,6 +2764,8 @@ restart_ih:
switch (src_data) {
case 0: /* D1 vblank */
if (disp_int & LB_D1_VBLANK_INTERRUPT) {
+ if (!rdev->pm.vblank_sync)
+ radeon_pm_debug_check_in_vbl(rdev, false);
drm_handle_vblank(rdev->ddev, 0);
rdev->pm.vblank_sync = true;
wake_up(&rdev->irq.vblank_queue);
@@ -2786,6 +2788,8 @@ restart_ih:
switch (src_data) {
case 0: /* D2 vblank */
if (disp_int & LB_D2_VBLANK_INTERRUPT) {
+ if (!rdev->pm.vblank_sync)
+ radeon_pm_debug_check_in_vbl(rdev, false);
drm_handle_vblank(rdev->ddev, 1);
rdev->pm.vblank_sync = true;
wake_up(&rdev->irq.vblank_queue);
@@ -74,6 +74,8 @@
#include "radeon_mode.h"
#include "radeon_reg.h"
+bool radeon_pm_debug_check_in_vbl(struct radeon_device *rdev, bool finish);
+
/*
* Modules parameters.
*/
@@ -28,7 +28,6 @@
#define RADEON_RECLOCK_DELAY_MS 200
#define RADEON_WAIT_VBLANK_TIMEOUT 200
-static bool radeon_pm_debug_check_in_vbl(struct radeon_device *rdev, bool finish);
static void radeon_pm_set_clocks_locked(struct radeon_device *rdev);
static void radeon_pm_set_clocks(struct radeon_device *rdev);
static void radeon_pm_idle_work_handler(struct work_struct *work);
@@ -209,9 +208,7 @@ static void radeon_set_power_state(struct radeon_device *rdev)
/* set engine clock */
radeon_sync_with_vblank(rdev);
- radeon_pm_debug_check_in_vbl(rdev, false);
radeon_set_engine_clock(rdev, rdev->pm.requested_clock_mode->sclk);
- radeon_pm_debug_check_in_vbl(rdev, true);
#if 0
/* set memory clock */
@@ -322,7 +319,7 @@ void radeon_pm_compute_clocks(struct radeon_device *rdev)
mutex_unlock(&rdev->pm.mutex);
}
-static bool radeon_pm_debug_check_in_vbl(struct radeon_device *rdev, bool finish)
+bool radeon_pm_debug_check_in_vbl(struct radeon_device *rdev, bool finish)
{
u32 stat_crtc1 = 0, stat_crtc2 = 0;
bool in_vbl = true;
@@ -391,11 +391,15 @@ int rs600_irq_process(struct radeon_device *rdev)
radeon_fence_process(rdev);
/* Vertical blank interrupts */
if (G_007EDC_LB_D1_VBLANK_INTERRUPT(r500_disp_int)) {
+ if (!rdev->pm.vblank_sync)
+ radeon_pm_debug_check_in_vbl(rdev, false);
drm_handle_vblank(rdev->ddev, 0);
rdev->pm.vblank_sync = true;
wake_up(&rdev->irq.vblank_queue);
}
if (G_007EDC_LB_D2_VBLANK_INTERRUPT(r500_disp_int)) {
+ if (!rdev->pm.vblank_sync)
+ radeon_pm_debug_check_in_vbl(rdev, false);
drm_handle_vblank(rdev->ddev, 1);
rdev->pm.vblank_sync = true;
wake_up(&rdev->irq.vblank_queue);