summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorS. Holmes <sholmes@nvidia.com>2011-03-07 16:08:18 -0700
committerVarun Colbert <vcolbert@nvidia.com>2011-04-14 21:23:10 -0700
commit0c7714c9efe4d017bc73ebc2b2c119bb8a342735 (patch)
tree88cc91c49794fa6397d17113f2b35b1402d0f3a2 /include/linux
parent8de40995f4ee35073c99c7f07b631450bc8824d6 (diff)
tegra_mediaserver: Adding kernel media driver
This kernel driver will replace the functionality that was previously in the NVRM daemon root process and allow multiple instances of OpenMAX to function and AVP resource tracking and cleanup. Bug 772210 Change-Id: Ia5eb559cde4644bae5fd8b23a1de57cd65f3fdd8 Reviewed-on: http://git-master/r/25115 Tested-by: Stephen Holmes <sholmes@nvidia.com> Reviewed-by: Stephen Holmes <sholmes@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/tegra_mediaserver.h112
1 files changed, 112 insertions, 0 deletions
diff --git a/include/linux/tegra_mediaserver.h b/include/linux/tegra_mediaserver.h
new file mode 100644
index 000000000000..f28473baf63e
--- /dev/null
+++ b/include/linux/tegra_mediaserver.h
@@ -0,0 +1,112 @@
+/* include/linux/tegra_mediaserver.h
+ *
+ * Media Server driver for NVIDIA Tegra SoCs
+ *
+ * Copyright (c) 2011, NVIDIA Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef _TEGRA_MEDIASERVER_H
+#define _TEGRA_MEDIASERVER_H
+
+#include <linux/ioctl.h>
+
+#define TEGRA_MEDIASERVER_MAGIC 'm'
+#define TEGRA_MEDIASERVER_IOCTL_ALLOC \
+ _IOWR(TEGRA_MEDIASERVER_MAGIC, 0x40, \
+ union tegra_mediaserver_alloc_info)
+
+enum tegra_mediaserver_resource_type {
+ TEGRA_MEDIASERVER_RESOURCE_BLOCK = 0,
+ TEGRA_MEDIASERVER_RESOURCE_IRAM,
+};
+
+enum tegra_mediaserver_block_type {
+ TEGRA_MEDIASERVER_BLOCK_AUDDEC = 0,
+ TEGRA_MEDIASERVER_BLOCK_VIDDEC,
+};
+
+enum tegra_mediaserver_iram_type {
+ TEGRA_MEDIASERVER_IRAM_SCRATCH = 0,
+ TEGRA_MEDIASERVER_IRAM_SHARED,
+};
+
+
+struct tegra_mediaserver_block_info {
+ int nvmm_block_handle;
+ int avp_block_handle;
+ int avp_block_library_handle;
+ int service_handle;
+ int service_library_handle;
+};
+
+struct tegra_mediaserver_iram_info {
+ unsigned long rm_handle;
+ int physical_address;
+};
+
+union tegra_mediaserver_alloc_info {
+ struct {
+ int tegra_mediaserver_resource_type;
+
+ union {
+ struct tegra_mediaserver_block_info block;
+
+ struct {
+ int tegra_mediaserver_iram_type;
+ int alignment;
+ size_t size;
+ } iram;
+ } u;
+ } in;
+
+ struct {
+ union {
+ struct {
+ int count;
+ } block;
+
+ struct tegra_mediaserver_iram_info iram;
+ } u;
+ } out;
+};
+
+
+#define TEGRA_MEDIASERVER_IOCTL_FREE \
+ _IOR(TEGRA_MEDIASERVER_MAGIC, 0x41, union tegra_mediaserver_free_info)
+
+union tegra_mediaserver_free_info {
+ struct {
+ int tegra_mediaserver_resource_type;
+
+ union {
+ int nvmm_block_handle;
+ int iram_rm_handle;
+ } u;
+ } in;
+};
+
+
+#define TEGRA_MEDIASERVER_IOCTL_UPDATE_BLOCK_INFO \
+ _IOR(TEGRA_MEDIASERVER_MAGIC, 0x45, \
+ union tegra_mediaserver_update_block_info)
+
+union tegra_mediaserver_update_block_info {
+ struct tegra_mediaserver_block_info in;
+};
+#endif
+