summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/qxl/qxl_drv.c
diff options
context:
space:
mode:
authorAndreas Pokorny <andreas.pokorny@canonical.com>2014-08-08 12:40:55 +0400
committerDave Airlie <airlied@redhat.com>2014-09-03 09:35:27 +0400
commit058e9f5c8236ad740ab984588b507758e5feee6d (patch)
tree21a2b80796bbc325069625cdb121dc92122165a1 /drivers/gpu/drm/qxl/qxl_drv.c
parent6ba59f3b5c977af2df3f9446f030f71e29d77dc1 (diff)
downloadlinux-058e9f5c8236ad740ab984588b507758e5feee6d.tar.xz
drm/qxl: simple crtc page flipping emulated using buffer copy
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_drv.c')
-rw-r--r--drivers/gpu/drm/qxl/qxl_drv.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c
index a3fd92029a14..b8a3eae4b1b1 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.c
+++ b/drivers/gpu/drm/qxl/qxl_drv.c
@@ -84,6 +84,7 @@ static const struct file_operations qxl_fops = {
.release = drm_release,
.unlocked_ioctl = drm_ioctl,
.poll = drm_poll,
+ .read = drm_read,
.mmap = qxl_mmap,
};
@@ -195,6 +196,20 @@ static int qxl_pm_restore(struct device *dev)
return qxl_drm_resume(drm_dev, false);
}
+static u32 qxl_noop_get_vblank_counter(struct drm_device *dev, int crtc)
+{
+ return dev->vblank[crtc].count.counter;
+}
+
+static int qxl_noop_enable_vblank(struct drm_device *dev, int crtc)
+{
+ return 0;
+}
+
+static void qxl_noop_disable_vblank(struct drm_device *dev, int crtc)
+{
+}
+
static const struct dev_pm_ops qxl_pm_ops = {
.suspend = qxl_pm_suspend,
.resume = qxl_pm_resume,
@@ -216,6 +231,9 @@ static struct drm_driver qxl_driver = {
DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
.load = qxl_driver_load,
.unload = qxl_driver_unload,
+ .get_vblank_counter = qxl_noop_get_vblank_counter,
+ .enable_vblank = qxl_noop_enable_vblank,
+ .disable_vblank = qxl_noop_disable_vblank,
.dumb_create = qxl_mode_dumb_create,
.dumb_map_offset = qxl_mode_dumb_mmap,