[PATCH 09/13] drm/amdgpu: Call pageflip irq funtion when receiced vsync interrupt.
Emily Deng
Emily.Deng at amd.com
Thu Aug 4 03:42:49 UTC 2016
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 at amd.com>
---
drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 10 +++++++---
1 file 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 00d3844..ef3c135 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
@@ -36,6 +36,9 @@
static void dce_virtual_set_display_funcs(struct amdgpu_device *adev);
static void dce_virtual_set_irq_funcs(struct amdgpu_device *adev);
+static int dce_virtual_pageflip_irq(struct amdgpu_device *adev,
+ struct amdgpu_irq_src *source,
+ struct amdgpu_iv_entry *entry);
/**
* dce_virtual_vblank_wait - vblank wait asic callback.
@@ -695,6 +698,7 @@ static enum hrtimer_restart dce_virtual_vblank_timer_handle(struct hrtimer *vbla
unsigned crtc = 0;
adev->ddev->vblank[0].count++;
drm_handle_vblank(adev->ddev, crtc);
+ dce_virtual_pageflip_irq(adev, NULL, NULL);
hrtimer_start(vblank_timer, ktime_set(0, DCE_VIRTUAL_VBLANK_PERIOD), HRTIMER_MODE_REL);
return HRTIMER_NORESTART;
}
@@ -751,8 +755,8 @@ static void dce_virtual_crtc_vblank_int_ack(struct amdgpu_device *adev,
}
static int dce_virtual_crtc_irq(struct amdgpu_device *adev,
- struct amdgpu_irq_src *source,
- struct amdgpu_iv_entry *entry)
+ struct amdgpu_irq_src *source,
+ struct amdgpu_iv_entry *entry)
{
unsigned crtc = 0;
unsigned irq_type = AMDGPU_CRTC_IRQ_VBLANK1;
@@ -763,7 +767,7 @@ static int dce_virtual_crtc_irq(struct amdgpu_device *adev,
if (amdgpu_irq_enabled(adev, source, irq_type)) {
drm_handle_vblank(adev->ddev, crtc);
}
-
+ dce_virtual_pageflip_irq(adev, NULL, NULL);
DRM_DEBUG("IH: D%d vblank\n", crtc + 1);
return 0;
}
--
1.9.1
More information about the amd-gfx
mailing list