From: Michel Dänzer <michel.daenzer@xxxxxxx> The vertical blank interrupt is already enabled/disabled via drm_vblank_get/put(), so we only need to update the number of pending page flips. Signed-off-by: Michel Dänzer <michel.daenzer@xxxxxxx> --- drivers/gpu/drm/radeon/radeon.h | 2 -- drivers/gpu/drm/radeon/radeon_display.c | 5 ++-- drivers/gpu/drm/radeon/radeon_irq_kms.c | 52 --------------------------------- 3 files changed, 2 insertions(+), 57 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 7a45c93..e497ed5 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -769,8 +769,6 @@ int radeon_irq_kms_init(struct radeon_device *rdev); void radeon_irq_kms_fini(struct radeon_device *rdev); void radeon_irq_kms_sw_irq_get(struct radeon_device *rdev, int ring); void radeon_irq_kms_sw_irq_put(struct radeon_device *rdev, int ring); -void radeon_irq_kms_pflip_irq_get(struct radeon_device *rdev, int crtc); -void radeon_irq_kms_pflip_irq_put(struct radeon_device *rdev, int crtc); void radeon_irq_kms_enable_afmt(struct radeon_device *rdev, int block); void radeon_irq_kms_disable_afmt(struct radeon_device *rdev, int block); void radeon_irq_kms_enable_hpd(struct radeon_device *rdev, unsigned hpd_mask); diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index e66323e..2c54483 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -325,7 +325,7 @@ void radeon_crtc_handle_flip(struct radeon_device *rdev, int crtc_id) drm_vblank_put(rdev->ddev, radeon_crtc->crtc_id); radeon_fence_unref(&work->fence); - radeon_irq_kms_pflip_irq_put(rdev, work->crtc_id); + atomic_dec(&rdev->irq.pflip[radeon_crtc->crtc_id]); queue_work(radeon_crtc->flip_queue, &work->unpin_work); } @@ -435,8 +435,7 @@ 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); - /* set the proper interrupt */ - radeon_irq_kms_pflip_irq_get(rdev, radeon_crtc->crtc_id); + atomic_inc(&rdev->irq.pflip[radeon_crtc->crtc_id]); work->base = base; radeon_crtc->flip_status = RADEON_FLIP_SUBMITTED; diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c index 089c9ff..8633f82 100644 --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c @@ -366,58 +366,6 @@ void radeon_irq_kms_sw_irq_put(struct radeon_device *rdev, int ring) } /** - * radeon_irq_kms_pflip_irq_get - enable pageflip interrupt - * - * @rdev: radeon device pointer - * @crtc: crtc whose interrupt you want to enable - * - * Enables the pageflip interrupt for a specific crtc (all asics). - * For pageflips we use the vblank interrupt source. - */ -void radeon_irq_kms_pflip_irq_get(struct radeon_device *rdev, int crtc) -{ - unsigned long irqflags; - - if (crtc < 0 || crtc >= rdev->num_crtc) - return; - - if (!rdev->ddev->irq_enabled) - return; - - if (atomic_inc_return(&rdev->irq.pflip[crtc]) == 1) { - spin_lock_irqsave(&rdev->irq.lock, irqflags); - radeon_irq_set(rdev); - spin_unlock_irqrestore(&rdev->irq.lock, irqflags); - } -} - -/** - * radeon_irq_kms_pflip_irq_put - disable pageflip interrupt - * - * @rdev: radeon device pointer - * @crtc: crtc whose interrupt you want to disable - * - * Disables the pageflip interrupt for a specific crtc (all asics). - * For pageflips we use the vblank interrupt source. - */ -void radeon_irq_kms_pflip_irq_put(struct radeon_device *rdev, int crtc) -{ - unsigned long irqflags; - - if (crtc < 0 || crtc >= rdev->num_crtc) - return; - - if (!rdev->ddev->irq_enabled) - return; - - if (atomic_dec_and_test(&rdev->irq.pflip[crtc])) { - spin_lock_irqsave(&rdev->irq.lock, irqflags); - radeon_irq_set(rdev); - spin_unlock_irqrestore(&rdev->irq.lock, irqflags); - } -} - -/** * radeon_irq_kms_enable_afmt - enable audio format change interrupt * * @rdev: radeon device pointer -- 2.0.0 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel