aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
diff options
context:
space:
mode:
authorEmily Deng <Emily.Deng@amd.com>2016-08-07 23:36:07 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-08-08 14:11:48 -0400
commit6b5084ccfcd4d43d31c6124968dcc537ea265994 (patch)
tree9406c186f130e8436e869b7c3c76c509374fddb0 /drivers/gpu/drm/amd/amdgpu/dce_virtual.c
parent46ac3622437692c371f3e647dc29f99e14b4f596 (diff)
drm/amdgpu: Call pageflip irq funtion when receiced vsync interrupt.
For virtual display feature, as there is no dce engine, so no pageflip irq generated. So directly call pageflip irq funtion when received vysn interrupt. Signed-off-by: Emily Deng <Emily.Deng@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/dce_virtual.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/dce_virtual.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
index ace52a342e64..1c16983ec8b6 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
@@ -36,6 +36,9 @@
36 36
37static void dce_virtual_set_display_funcs(struct amdgpu_device *adev); 37static void dce_virtual_set_display_funcs(struct amdgpu_device *adev);
38static void dce_virtual_set_irq_funcs(struct amdgpu_device *adev); 38static void dce_virtual_set_irq_funcs(struct amdgpu_device *adev);
39static int dce_virtual_pageflip_irq(struct amdgpu_device *adev,
40 struct amdgpu_irq_src *source,
41 struct amdgpu_iv_entry *entry);
39 42
40/** 43/**
41 * dce_virtual_vblank_wait - vblank wait asic callback. 44 * dce_virtual_vblank_wait - vblank wait asic callback.
@@ -650,6 +653,7 @@ static enum hrtimer_restart dce_virtual_vblank_timer_handle(struct hrtimer *vbla
650 unsigned crtc = 0; 653 unsigned crtc = 0;
651 adev->ddev->vblank[0].count++; 654 adev->ddev->vblank[0].count++;
652 drm_handle_vblank(adev->ddev, crtc); 655 drm_handle_vblank(adev->ddev, crtc);
656 dce_virtual_pageflip_irq(adev, NULL, NULL);
653 hrtimer_start(vblank_timer, ktime_set(0, DCE_VIRTUAL_VBLANK_PERIOD), HRTIMER_MODE_REL); 657 hrtimer_start(vblank_timer, ktime_set(0, DCE_VIRTUAL_VBLANK_PERIOD), HRTIMER_MODE_REL);
654 return HRTIMER_NORESTART; 658 return HRTIMER_NORESTART;
655} 659}
@@ -706,8 +710,8 @@ static void dce_virtual_crtc_vblank_int_ack(struct amdgpu_device *adev,
706} 710}
707 711
708static int dce_virtual_crtc_irq(struct amdgpu_device *adev, 712static int dce_virtual_crtc_irq(struct amdgpu_device *adev,
709 struct amdgpu_irq_src *source, 713 struct amdgpu_irq_src *source,
710 struct amdgpu_iv_entry *entry) 714 struct amdgpu_iv_entry *entry)
711{ 715{
712 unsigned crtc = 0; 716 unsigned crtc = 0;
713 unsigned irq_type = AMDGPU_CRTC_IRQ_VBLANK1; 717 unsigned irq_type = AMDGPU_CRTC_IRQ_VBLANK1;
@@ -718,7 +722,7 @@ static int dce_virtual_crtc_irq(struct amdgpu_device *adev,
718 if (amdgpu_irq_enabled(adev, source, irq_type)) { 722 if (amdgpu_irq_enabled(adev, source, irq_type)) {
719 drm_handle_vblank(adev->ddev, crtc); 723 drm_handle_vblank(adev->ddev, crtc);
720 } 724 }
721 725 dce_virtual_pageflip_irq(adev, NULL, NULL);
722 DRM_DEBUG("IH: D%d vblank\n", crtc + 1); 726 DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
723 return 0; 727 return 0;
724} 728}