diff options
author | Richard Zhao <rizhao@nvidia.com> | 2015-04-16 14:57:10 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2015-06-06 10:24:40 -0400 |
commit | df67ff6a75cba1fc96ae5fbe7dba260250eae9fd (patch) | |
tree | 7a14ec613736d295d4d06da8e2bf11609290102a /include/linux/tegra_vgpu.h | |
parent | cb28a538cfbec71b441b29290166c114145d6d60 (diff) |
gpu: nvgpu: add zbc support to vgpu
For both adding and querying zbc entry, added callbacks in gr ops.
Native gpu driver (gk20a) and vgpu will both hook there. For vgpu, it
will add or query zbc entry from RM server.
Bug 1558561
Change-Id: If8a4850ecfbff41d8592664f5f93ad8c25f6fbce
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: http://git-master/r/732775
(cherry picked from commit a3787cf971128904c2712338087685b02673065d)
Reviewed-on: http://git-master/r/737880
(cherry picked from commit fca2a0457c968656dc29455608f35acab094d816)
Reviewed-on: http://git-master/r/753278
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'include/linux/tegra_vgpu.h')
-rw-r--r-- | include/linux/tegra_vgpu.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/include/linux/tegra_vgpu.h b/include/linux/tegra_vgpu.h index e1674440..a295c9ef 100644 --- a/include/linux/tegra_vgpu.h +++ b/include/linux/tegra_vgpu.h | |||
@@ -62,7 +62,9 @@ enum { | |||
62 | TEGRA_VGPU_CMD_CHANNEL_BIND_ZCULL, | 62 | TEGRA_VGPU_CMD_CHANNEL_BIND_ZCULL, |
63 | TEGRA_VGPU_CMD_CACHE_MAINT, | 63 | TEGRA_VGPU_CMD_CACHE_MAINT, |
64 | TEGRA_VGPU_CMD_SUBMIT_RUNLIST, | 64 | TEGRA_VGPU_CMD_SUBMIT_RUNLIST, |
65 | TEGRA_VGPU_CMD_GET_ZCULL_INFO | 65 | TEGRA_VGPU_CMD_GET_ZCULL_INFO, |
66 | TEGRA_VGPU_CMD_ZBC_SET_TABLE, | ||
67 | TEGRA_VGPU_CMD_ZBC_QUERY_TABLE | ||
66 | }; | 68 | }; |
67 | 69 | ||
68 | struct tegra_vgpu_connect_params { | 70 | struct tegra_vgpu_connect_params { |
@@ -191,6 +193,29 @@ struct tegra_vgpu_zcull_info_params { | |||
191 | u32 subregion_count; | 193 | u32 subregion_count; |
192 | }; | 194 | }; |
193 | 195 | ||
196 | #define TEGRA_VGPU_ZBC_COLOR_VALUE_SIZE 4 | ||
197 | #define TEGRA_VGPU_ZBC_TYPE_INVALID 0 | ||
198 | #define TEGRA_VGPU_ZBC_TYPE_COLOR 1 | ||
199 | #define TEGRA_VGPU_ZBC_TYPE_DEPTH 2 | ||
200 | |||
201 | struct tegra_vgpu_zbc_set_table_params { | ||
202 | u32 color_ds[TEGRA_VGPU_ZBC_COLOR_VALUE_SIZE]; | ||
203 | u32 color_l2[TEGRA_VGPU_ZBC_COLOR_VALUE_SIZE]; | ||
204 | u32 depth; | ||
205 | u32 format; | ||
206 | u32 type; /* color or depth */ | ||
207 | }; | ||
208 | |||
209 | struct tegra_vgpu_zbc_query_table_params { | ||
210 | u32 color_ds[TEGRA_VGPU_ZBC_COLOR_VALUE_SIZE]; | ||
211 | u32 color_l2[TEGRA_VGPU_ZBC_COLOR_VALUE_SIZE]; | ||
212 | u32 depth; | ||
213 | u32 ref_cnt; | ||
214 | u32 format; | ||
215 | u32 type; /* color or depth */ | ||
216 | u32 index_size; /* [out] size, [in] index */ | ||
217 | }; | ||
218 | |||
194 | struct tegra_vgpu_cmd_msg { | 219 | struct tegra_vgpu_cmd_msg { |
195 | u32 cmd; | 220 | u32 cmd; |
196 | int ret; | 221 | int ret; |
@@ -211,6 +236,8 @@ struct tegra_vgpu_cmd_msg { | |||
211 | struct tegra_vgpu_runlist_params runlist; | 236 | struct tegra_vgpu_runlist_params runlist; |
212 | struct tegra_vgpu_golden_ctx_params golden_ctx; | 237 | struct tegra_vgpu_golden_ctx_params golden_ctx; |
213 | struct tegra_vgpu_zcull_info_params zcull_info; | 238 | struct tegra_vgpu_zcull_info_params zcull_info; |
239 | struct tegra_vgpu_zbc_set_table_params zbc_set_table; | ||
240 | struct tegra_vgpu_zbc_query_table_params zbc_query_table; | ||
214 | } params; | 241 | } params; |
215 | }; | 242 | }; |
216 | 243 | ||