summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Vorobiov <s.vorobiov@samsung.com>2014-02-18 17:02:45 +0400
committerStanislav Vorobiov <s.vorobiov@samsung.com>2014-03-06 17:57:17 +0400
commit739af7c5b39b2cab52472aa7b8f37a1f18d8e1a5 (patch)
tree71fd3aaf7f8d08a03963b5900c9f55753ef42610
parent9a9480f293bcaa3ceccc16eae9858a7bbb9aa5b4 (diff)
downloadlibdrm-submit/tizen/20140402.053430.tar.gz
libdrm-submit/tizen/20140402.053430.tar.bz2
libdrm-submit/tizen/20140402.053430.zip
Change-Id: I2e1418425f1b4a17f49f19fabb8c4a2bdc84e5ef Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
-rw-r--r--include/drm/vigs_drm.h11
-rw-r--r--vigs/Makefile.am2
-rw-r--r--vigs/vigs.c16
-rw-r--r--vigs/vigs.h13
4 files changed, 40 insertions, 2 deletions
diff --git a/include/drm/vigs_drm.h b/include/drm/vigs_drm.h
index 3eba112e..1694801d 100644
--- a/include/drm/vigs_drm.h
+++ b/include/drm/vigs_drm.h
@@ -33,7 +33,7 @@
/*
* Bump this whenever driver interface changes.
*/
-#define DRM_VIGS_DRIVER_VERSION 11
+#define DRM_VIGS_DRIVER_VERSION 12
/*
* Surface access flags.
@@ -134,6 +134,12 @@ struct drm_vigs_fence_unref
uint32_t handle;
};
+struct drm_vigs_plane_set_zpos
+{
+ uint32_t plane_id;
+ int zpos;
+};
+
#define DRM_VIGS_GET_PROTOCOL_VERSION 0x00
#define DRM_VIGS_CREATE_SURFACE 0x01
#define DRM_VIGS_CREATE_EXECBUFFER 0x02
@@ -148,6 +154,7 @@ struct drm_vigs_fence_unref
#define DRM_VIGS_FENCE_WAIT 0x0B
#define DRM_VIGS_FENCE_SIGNALED 0x0C
#define DRM_VIGS_FENCE_UNREF 0x0D
+#define DRM_VIGS_PLANE_SET_ZPOS 0x0E
#define DRM_IOCTL_VIGS_GET_PROTOCOL_VERSION DRM_IOR(DRM_COMMAND_BASE + \
DRM_VIGS_GET_PROTOCOL_VERSION, struct drm_vigs_get_protocol_version)
@@ -177,5 +184,7 @@ struct drm_vigs_fence_unref
DRM_VIGS_FENCE_SIGNALED, struct drm_vigs_fence_signaled)
#define DRM_IOCTL_VIGS_FENCE_UNREF DRM_IOW(DRM_COMMAND_BASE + \
DRM_VIGS_FENCE_UNREF, struct drm_vigs_fence_unref)
+#define DRM_IOCTL_VIGS_PLANE_SET_ZPOS DRM_IOW(DRM_COMMAND_BASE + \
+ DRM_VIGS_PLANE_SET_ZPOS, struct drm_vigs_plane_set_zpos)
#endif
diff --git a/vigs/Makefile.am b/vigs/Makefile.am
index f15ceff7..195bbf31 100644
--- a/vigs/Makefile.am
+++ b/vigs/Makefile.am
@@ -12,7 +12,7 @@ AM_CFLAGS = \
libdrm_vigs_la_LTLIBRARIES = libdrm_vigs.la
libdrm_vigs_ladir = $(libdir)
-libdrm_vigs_la_LDFLAGS = -version-number 6:0:0 -no-undefined
+libdrm_vigs_la_LDFLAGS = -version-number 7:0:0 -no-undefined
libdrm_vigs_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
libdrm_vigs_la_SOURCES = vigs.c
diff --git a/vigs/vigs.c b/vigs/vigs.c
index f49d777e..0e1a4181 100644
--- a/vigs/vigs.c
+++ b/vigs/vigs.c
@@ -657,3 +657,19 @@ int vigs_drm_fence_check(struct vigs_drm_fence *fence)
return 0;
}
+
+int vigs_drm_plane_set_zpos(struct vigs_drm_device *dev,
+ uint32_t plane_id,
+ int zpos)
+{
+ struct drm_vigs_plane_set_zpos req =
+ {
+ .plane_id = plane_id,
+ .zpos = zpos
+ };
+ int ret;
+
+ ret = drmIoctl(dev->fd, DRM_IOCTL_VIGS_PLANE_SET_ZPOS, &req);
+
+ return (ret != 0) ? -errno : 0;
+}
diff --git a/vigs/vigs.h b/vigs/vigs.h
index 87c6b0fa..08300904 100644
--- a/vigs/vigs.h
+++ b/vigs/vigs.h
@@ -231,6 +231,19 @@ int vigs_drm_fence_check(struct vigs_drm_fence *fence);
* @}
*/
+/*
+ * Plane functions.
+ * @{
+ */
+
+int vigs_drm_plane_set_zpos(struct vigs_drm_device *dev,
+ uint32_t plane_id,
+ int zpos);
+
+/*
+ * @}
+ */
+
#ifdef __cplusplus
};
#endif /* __cplusplus */