summaryrefslogtreecommitdiffstats
path: root/include/linux/tegra_vgpu_t19x.h
blob: 38dbbf6059db39d83b378121206bba9df2059843 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
 * Copyright (c) 2017, NVIDIA CORPORATION.  All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
 * version 2, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope 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 __TEGRA_VGPU_T19X_H
#define __TEGRA_VGPU_T19X_H

#define TEGRA_VGPU_CMD_ALLOC_CTX_HEADER		100
#define TEGRA_VGPU_CMD_FREE_CTX_HEADER		101
#define TEGRA_VGPU_CMD_MAP_SYNCPT		102
#define TEGRA_VGPU_CMD_TSG_BIND_CHANNEL_EX 	103

struct tegra_vgpu_alloc_ctx_header_params {
	u64 ch_handle;
	u64 ctx_header_va;
};

struct tegra_vgpu_free_ctx_header_params {
	u64 ch_handle;
};

struct tegra_vgpu_map_syncpt_params {
	u64 as_handle;
	u64 gpu_va;
	u64 len;
	u64 offset;
	u8 prot;
};

struct tegra_vgpu_tsg_bind_channel_ex_params {
	u32 tsg_id;
	u64 ch_handle;
	u32 subctx_id;
	u32 runqueue_sel;
};

union tegra_vgpu_t19x_params {
	struct tegra_vgpu_alloc_ctx_header_params alloc_ctx_header;
	struct tegra_vgpu_free_ctx_header_params free_ctx_header;
	struct tegra_vgpu_map_syncpt_params map_syncpt;
	struct tegra_vgpu_tsg_bind_channel_ex_params tsg_bind_channel_ex;
};

#define TEGRA_VGPU_ATTRIB_MAX_SUBCTX_COUNT	100

#endif