[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190604095534.10337-4-tina.zhang@intel.com>
Date: Tue, 4 Jun 2019 17:55:34 +0800
From: Tina Zhang <tina.zhang@...el.com>
To: intel-gvt-dev@...ts.freedesktop.org, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Tina Zhang <tina.zhang@...el.com>, kraxel@...hat.com,
zhenyuw@...ux.intel.com, zhiyuan.lv@...el.com,
zhi.a.wang@...el.com, kevin.tian@...el.com, hang.yuan@...el.com,
alex.williamson@...hat.com
Subject: [RFC PATCH v2 3/3] drm/i915/gvt: Send plane flip events to user space
Send the primary plane and the cursor plane flip events to user space.
Signed-off-by: Tina Zhang <tina.zhang@...el.com>
---
drivers/gpu/drm/i915/gvt/handlers.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c
index 18f01eeb2510..67129de8bc45 100644
--- a/drivers/gpu/drm/i915/gvt/handlers.c
+++ b/drivers/gpu/drm/i915/gvt/handlers.c
@@ -763,6 +763,20 @@ static int pri_surf_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
else
set_bit(event, vgpu->irq.flip_done_event[pipe]);
+ if (vgpu->vdev.pri_flip_trigger)
+ eventfd_signal(vgpu->vdev.pri_flip_trigger, 1);
+
+ return 0;
+}
+
+static int cur_surf_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
+ void *p_data, unsigned int bytes)
+{
+ write_vreg(vgpu, offset, p_data, bytes);
+
+ if (vgpu->vdev.cur_flip_trigger)
+ eventfd_signal(vgpu->vdev.cur_flip_trigger, 1);
+
return 0;
}
@@ -1969,9 +1983,9 @@ static int init_generic_mmio_info(struct intel_gvt *gvt)
MMIO_D(CURPOS(PIPE_B), D_ALL);
MMIO_D(CURPOS(PIPE_C), D_ALL);
- MMIO_D(CURBASE(PIPE_A), D_ALL);
- MMIO_D(CURBASE(PIPE_B), D_ALL);
- MMIO_D(CURBASE(PIPE_C), D_ALL);
+ MMIO_DH(CURBASE(PIPE_A), D_ALL, NULL, cur_surf_mmio_write);
+ MMIO_DH(CURBASE(PIPE_B), D_ALL, NULL, cur_surf_mmio_write);
+ MMIO_DH(CURBASE(PIPE_C), D_ALL, NULL, cur_surf_mmio_write);
MMIO_D(CUR_FBC_CTL(PIPE_A), D_ALL);
MMIO_D(CUR_FBC_CTL(PIPE_B), D_ALL);
--
2.17.1
Powered by blists - more mailing lists