summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@nvidia.com>2011-01-24 02:07:05 -0800
committerVarun Colbert <vcolbert@nvidia.com>2011-01-27 17:17:53 -0800
commit2a2f0d7f6cb8c708dceb9c980693772fed4ec000 (patch)
treeb18a7a63fb4e71a45087e19a167902109cc3151c /include
parent399d6b57202df9e41b5de6fc78f2357d88d5216c (diff)
video: tegra: Multi client overlay management
This creates a new device node per head - /dev/tegra_dc%u. There are a number of ioctls in linux/tegra_overlay.h to open, close, and flip overlays. This is a replacement for the extensions in the tegra fb interface, but does not remove that functionality for compatibility reasons. Once everyone has moved, we can remove the tegra fb extensions. Change-Id: Id78a94482637a7ce229ec64eb5feaf2dec2b7804 Reviewed-on: http://git-master/r/16700 Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com> Tested-by: Daniel Willemsen <dwillemsen@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/tegra_overlay.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/include/linux/tegra_overlay.h b/include/linux/tegra_overlay.h
new file mode 100644
index 000000000000..673a40f832c0
--- /dev/null
+++ b/include/linux/tegra_overlay.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2010 NVIDIA Corporation
+ * Author: Dan Willemsen <dwillemsen@nvidia.com>
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __LINUX_TEGRA_OVERLAY_H
+#define __LINUX_TEGRA_OVERLAY_H
+
+#include <linux/ioctl.h>
+#include <linux/types.h>
+#include <video/tegrafb.h>
+
+/* set index to -1 to ignore window data */
+struct tegra_overlay_windowattr {
+ __s32 index;
+ __u32 buff_id;
+ __u32 blend;
+ __u32 offset;
+ __u32 offset_u;
+ __u32 offset_v;
+ __u32 stride;
+ __u32 stride_uv;
+ __u32 pixformat;
+ __u32 x;
+ __u32 y;
+ __u32 w;
+ __u32 h;
+ __u32 out_x;
+ __u32 out_y;
+ __u32 out_w;
+ __u32 out_h;
+ __u32 z;
+ __u32 pre_syncpt_id;
+ __u32 pre_syncpt_val;
+ __u32 hfilter;
+ __u32 vfilter;
+ __u32 tiled;
+ __u32 flags;
+};
+
+struct tegra_overlay_flip_args {
+ struct tegra_overlay_windowattr win[TEGRA_FB_FLIP_N_WINDOWS];
+ __u32 post_syncpt_id;
+ __u32 post_syncpt_val;
+};
+
+#define TEGRA_OVERLAY_IOCTL_MAGIC 'O'
+
+#define TEGRA_OVERLAY_IOCTL_OPEN_WINDOW _IOWR(TEGRA_OVERLAY_IOCTL_MAGIC, 0x40, __u32)
+#define TEGRA_OVERLAY_IOCTL_CLOSE_WINDOW _IOW(TEGRA_OVERLAY_IOCTL_MAGIC, 0x41, __u32)
+#define TEGRA_OVERLAY_IOCTL_FLIP _IOW(TEGRA_OVERLAY_IOCTL_MAGIC, 0x42, struct tegra_overlay_flip_args)
+#define TEGRA_OVERLAY_IOCTL_SET_NVMAP_FD _IOW(TEGRA_OVERLAY_IOCTL_MAGIC, 0x43, __u32)
+
+#define TEGRA_OVERLAY_IOCTL_MIN_NR _IOC_NR(TEGRA_OVERLAY_IOCTL_OPEN_WINDOW)
+#define TEGRA_OVERLAY_IOCTL_MAX_NR _IOC_NR(TEGRA_OVERLAY_IOCTL_SET_NVMAP_FD)
+
+#endif