From: Michel Dänzer Date: Tue, 10 Jun 2014 01:21:57 +0000 (+0900) Subject: drm/radeon: Move fb update from radeon_flip_work_func to radeon_crtc_page_flip X-Git-Tag: firefly_0821_release~176^2~3773^2~3^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=685d54b330d0f15c4f6c7bdf51e009aab0d6a750;p=firefly-linux-kernel-4.4.55.git drm/radeon: Move fb update from radeon_flip_work_func to radeon_crtc_page_flip Fixes WARN()s from the DRM core since the page flip rework. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=77521 Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index a4e725c6b8c8..5ed617056b9c 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -462,9 +462,6 @@ static void radeon_flip_work_func(struct work_struct *__work) /* We borrow the event spin lock for protecting flip_work */ spin_lock_irqsave(&crtc->dev->event_lock, flags); - /* update crtc fb */ - crtc->primary->fb = fb; - /* set the proper interrupt */ radeon_irq_kms_pflip_irq_get(rdev, radeon_crtc->crtc_id); @@ -539,6 +536,9 @@ static int radeon_crtc_page_flip(struct drm_crtc *crtc, } radeon_crtc->flip_work = work; + /* update crtc fb */ + crtc->primary->fb = fb; + spin_unlock_irqrestore(&crtc->dev->event_lock, flags); queue_work(radeon_crtc->flip_queue, &work->flip_work);