diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index d017314..84baae5 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -360,6 +360,8 @@ void radeon_crtc_handle_flip(struct radeon_device *rdev, int crtc_id) if (radeon_crtc == NULL) return; + DRM_DEBUG_DRIVER("Entering for CRTC %d\n", crtc_id); + spin_lock_irqsave(&rdev->ddev->event_lock, flags); work = radeon_crtc->flip_work; if (radeon_crtc->flip_status != RADEON_FLIP_SUBMITTED) { @@ -376,14 +378,17 @@ void radeon_crtc_handle_flip(struct radeon_device *rdev, int crtc_id) radeon_crtc->flip_work = NULL; /* wakeup userspace */ - if (work->event) + if (work->event) { + DRM_DEBUG_DRIVER("Sending flip completion event for CRTC %d\n", crtc_id); drm_send_vblank_event(rdev->ddev, crtc_id, work->event); + } spin_unlock_irqrestore(&rdev->ddev->event_lock, flags); drm_vblank_put(rdev->ddev, radeon_crtc->crtc_id); radeon_irq_kms_pflip_irq_put(rdev, work->crtc_id); queue_work(radeon_crtc->flip_queue, &work->unpin_work); + DRM_DEBUG_DRIVER("Leaving for CRTC %d\n", crtc_id); } /** @@ -407,6 +412,8 @@ static void radeon_flip_work_func(struct work_struct *__work) unsigned repcnt = 4; struct drm_vblank_crtc *vblank = &crtc->dev->vblank[work->crtc_id]; + DRM_DEBUG_DRIVER("Entering for CRTC %d\n", work->crtc_id); + down_read(&rdev->exclusive_lock); if (work->fence) { struct radeon_fence *fence; @@ -489,12 +496,14 @@ static void radeon_flip_work_func(struct work_struct *__work) vblank->framedur_ns / 1000, vblank->linedur_ns / 1000, stat, vpos, hpos); + DRM_DEBUG_DRIVER("Programming flip for CRTC %d\n", work->crtc_id); /* do the flip (mmio) */ radeon_page_flip(rdev, radeon_crtc->crtc_id, work->base, work->async); radeon_crtc->flip_status = RADEON_FLIP_SUBMITTED; spin_unlock_irqrestore(&crtc->dev->event_lock, flags); up_read(&rdev->exclusive_lock); + DRM_DEBUG_DRIVER("Leaving for CRTC %d\n", work->crtc_id); } static int radeon_crtc_page_flip(struct drm_crtc *crtc, @@ -515,6 +524,8 @@ static int radeon_crtc_page_flip(struct drm_crtc *crtc, unsigned long flags; int r; + DRM_DEBUG_DRIVER("Entering for CRTC %d\n", radeon_crtc->crtc_id); + work = kzalloc(sizeof *work, GFP_KERNEL); if (work == NULL) return -ENOMEM; @@ -621,7 +632,9 @@ static int radeon_crtc_page_flip(struct drm_crtc *crtc, spin_unlock_irqrestore(&crtc->dev->event_lock, flags); + DRM_DEBUG_DRIVER("Queuing flip work for CRTC %d\n", work->crtc_id); queue_work(radeon_crtc->flip_queue, &work->flip_work); + DRM_DEBUG_DRIVER("Leaving for CRTC %d\n", work->crtc_id); return 0; vblank_cleanup: