diff options
author | Matthew Garrett <mjg@redhat.com> | 2010-04-26 16:02:26 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-05-18 04:21:22 -0400 |
commit | d9932a3241cc6a9629d6586ec362583cb77d7a29 (patch) | |
tree | 050f0becbb25c40b11ef6a37a3ac107647792bb7 /drivers/gpu | |
parent | 7c5ee5366f79f53de2a11e73953daee6d58df124 (diff) |
radeon: Stop the ttm workqueue while reclocking
The ttm bo workqueue may touch objects while we're reclocking, so make
sure it's blocked until we're done.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_pm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index c9390ea56f96..79d3336eede5 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c | |||
@@ -460,9 +460,11 @@ bool radeon_pm_debug_check_in_vbl(struct radeon_device *rdev, bool finish) | |||
460 | static void radeon_pm_idle_work_handler(struct work_struct *work) | 460 | static void radeon_pm_idle_work_handler(struct work_struct *work) |
461 | { | 461 | { |
462 | struct radeon_device *rdev; | 462 | struct radeon_device *rdev; |
463 | int resched; | ||
463 | rdev = container_of(work, struct radeon_device, | 464 | rdev = container_of(work, struct radeon_device, |
464 | pm.idle_work.work); | 465 | pm.idle_work.work); |
465 | 466 | ||
467 | resched = ttm_bo_lock_delayed_workqueue(&rdev->mman.bdev); | ||
466 | mutex_lock(&rdev->ddev->struct_mutex); | 468 | mutex_lock(&rdev->ddev->struct_mutex); |
467 | mutex_lock(&rdev->pm.mutex); | 469 | mutex_lock(&rdev->pm.mutex); |
468 | if (rdev->pm.state == PM_STATE_ACTIVE) { | 470 | if (rdev->pm.state == PM_STATE_ACTIVE) { |
@@ -509,6 +511,7 @@ static void radeon_pm_idle_work_handler(struct work_struct *work) | |||
509 | } | 511 | } |
510 | mutex_unlock(&rdev->pm.mutex); | 512 | mutex_unlock(&rdev->pm.mutex); |
511 | mutex_unlock(&rdev->ddev->struct_mutex); | 513 | mutex_unlock(&rdev->ddev->struct_mutex); |
514 | ttm_bo_unlock_delayed_workqueue(&rdev->mman.bdev, resched); | ||
512 | 515 | ||
513 | queue_delayed_work(rdev->wq, &rdev->pm.idle_work, | 516 | queue_delayed_work(rdev->wq, &rdev->pm.idle_work, |
514 | msecs_to_jiffies(RADEON_IDLE_LOOP_MS)); | 517 | msecs_to_jiffies(RADEON_IDLE_LOOP_MS)); |