1 /* include/linux/tegra_mediaserver.h
3 * Media Server driver for NVIDIA Tegra SoCs
5 * Copyright (c) 2011, NVIDIA Corporation.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef _TEGRA_MEDIASERVER_H
24 #define _TEGRA_MEDIASERVER_H
26 #include <linux/ioctl.h>
28 #define TEGRA_MEDIASERVER_MAGIC 'm'
29 #define TEGRA_MEDIASERVER_IOCTL_ALLOC \
30 _IOWR(TEGRA_MEDIASERVER_MAGIC, 0x40, \
31 union tegra_mediaserver_alloc_info)
33 enum tegra_mediaserver_resource_type {
34 TEGRA_MEDIASERVER_RESOURCE_BLOCK = 0,
35 TEGRA_MEDIASERVER_RESOURCE_IRAM,
38 enum tegra_mediaserver_block_type {
39 TEGRA_MEDIASERVER_BLOCK_AUDDEC = 0,
40 TEGRA_MEDIASERVER_BLOCK_VIDDEC,
43 enum tegra_mediaserver_iram_type {
44 TEGRA_MEDIASERVER_IRAM_SCRATCH = 0,
45 TEGRA_MEDIASERVER_IRAM_SHARED,
49 struct tegra_mediaserver_block_info {
50 int nvmm_block_handle;
52 int avp_block_library_handle;
54 int service_library_handle;
57 struct tegra_mediaserver_iram_info {
58 unsigned long rm_handle;
62 union tegra_mediaserver_alloc_info {
64 int tegra_mediaserver_resource_type;
67 struct tegra_mediaserver_block_info block;
70 int tegra_mediaserver_iram_type;
83 struct tegra_mediaserver_iram_info iram;
89 #define TEGRA_MEDIASERVER_IOCTL_FREE \
90 _IOR(TEGRA_MEDIASERVER_MAGIC, 0x41, union tegra_mediaserver_free_info)
92 union tegra_mediaserver_free_info {
94 int tegra_mediaserver_resource_type;
97 int nvmm_block_handle;
104 #define TEGRA_MEDIASERVER_IOCTL_UPDATE_BLOCK_INFO \
105 _IOR(TEGRA_MEDIASERVER_MAGIC, 0x45, \
106 union tegra_mediaserver_update_block_info)
108 union tegra_mediaserver_update_block_info {
109 struct tegra_mediaserver_block_info in;