1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2001-2020 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: MIT
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21  * DEALINGS IN THE SOFTWARE.
22  */
23 
24 #pragma once
25 
26 #include <nvtypes.h>
27 
28 //
29 // This file was generated with FINN, an NVIDIA coding tool.
30 // Source file:      ctrl/ctrl9096.finn
31 //
32 
33 #include "ctrl/ctrlxxxx.h"
34 #define NV9096_CTRL_CMD(cat,idx)  \
35     NVXXXX_CTRL_CMD(0x9096, NV9096_CTRL_##cat, idx)
36 
37 /* NV9096 command categories (6bits) */
38 #define NV9096_CTRL_RESERVED                                            (0x00U)
39 #define NV9096_CTRL_ZBC                                                 (0x01U)
40 
41 
42 /*
43  * NV9096_CTRL_CMD_NULL
44  *
45  * This command does nothing.
46  * This command does not take any parameters.
47  *
48  * Possible status values returned are:
49  *   NV_OK
50  */
51 #define NV9096_CTRL_CMD_NULL                                            (0x90960000U) /* finn: Evaluated from "(FINN_GF100_ZBC_CLEAR_RESERVED_INTERFACE_ID << 8) | 0x0" */
52 
53 /*
54  * NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_
55  * These are various possible CtFormats which
56  * the Client passes down to RM to set in the DS
57  * Color Table.
58  */
59 
60 
61 
62 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_INVALID             0x00000000U
63 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_ZERO                0x00000001U
64 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_UNORM_ONE           0x00000002U
65 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_RF32_GF32_BF32_AF32 0x00000004U
66 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_R16_G16_B16_A16     0x00000008U
67 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_RN16_GN16_BN16_AN16 0x0000000cU
68 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_RS16_GS16_BS16_AS16 0x00000010U
69 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_RU16_GU16_BU16_AU16 0x00000014U
70 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_RF16_GF16_BF16_AF16 0x00000016U
71 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_A8R8G8B8            0x00000018U
72 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_A8RL8GL8BL8         0x0000001cU
73 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_A2B10G10R10         0x00000020U
74 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_AU2BU10GU10RU10     0x00000024U
75 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_A8B8G8R8            0x00000028U
76 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_A8BL8GL8RL8         0x0000002cU
77 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_AN8BN8GN8RN8        0x00000030U
78 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_AS8BS8GS8RS8        0x00000034U
79 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_AU8BU8GU8RU8        0x00000038U
80 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_A2R10G10B10         0x0000003cU
81 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL_BF10GF11RF11        0x00000040U
82 
83 /*
84  * NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR
85  *
86  * This command attempts to add a new entry to Color ZBC Tables.
87  *
88  *  colorFB
89  *    This field sets the raw framebuffer values for the ZBC table entries. Prior to
90  *    GA10x, these values are written into the "L2" table.
91  *    From GA10x and later, these values are written in "CROP" table.
92  *  colorDS
93  *    This field sets format-independent values for ZBC table entries. Prior to GA10X,
94  *    these values are written in the "DS" table and  matched with the format-independent
95  *    clear color sent in the 3D class. These values are ignored on GA10X and later
96  *  format
97  *    This field specifies color format for ZBC table entries and should be one of the
98  *    NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT* enums. Prior to GA10X, these values
99  *    are written in the format field of the hardware ZBC table entry and are matched
100  *    against the color format sent in the 3D class. These values are ignored on GA10X and later.
101  *  bSkipL2Table
102  *    This parameter specifies if the L2 ZBC table should be updated or not. If
103  *    this parameter is set to a non-zero value, the L2 ZBC table will not be
104  *    updated. If this parameter is set to 0, the L2 ZBC table will be updated. This
105  *    parameter will skip programming DS table values in Pre-GA10x. From GA10x and later
106  *    this parameter will skip programming CROP table entries.
107  *    Note: This parameter will only be supported in verification platforms.
108  *
109  * Possible status values returned are:
110  *   NV_OK
111  *   NVOS_STATUS_INSUFFICIENT_RESOURCES
112  */
113 #define NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR        (0x90960101U) /* finn: Evaluated from "(FINN_GF100_ZBC_CLEAR_ZBC_INTERFACE_ID << 8) | NV9096_CTRL_SET_ZBC_COLOR_CLEAR_PARAMS_MESSAGE_ID" */
114 
115 #define NV9096_CTRL_SET_ZBC_COLOR_CLEAR_VALUE_SIZE 4U
116 #define NV9096_CTRL_SET_ZBC_COLOR_CLEAR_PARAMS_MESSAGE_ID (0x1U)
117 
118 typedef struct NV9096_CTRL_SET_ZBC_COLOR_CLEAR_PARAMS {
119     NvU32  colorFB[NV9096_CTRL_SET_ZBC_COLOR_CLEAR_VALUE_SIZE];
120     NvU32  colorDS[NV9096_CTRL_SET_ZBC_COLOR_CLEAR_VALUE_SIZE];
121     NvU32  format;
122     NvBool bSkipL2Table;
123 } NV9096_CTRL_SET_ZBC_COLOR_CLEAR_PARAMS;
124 
125 
126 /*
127  * NV9096_CTRL_CMD_SET_ZBC_DEPTH_CLEAR_FMT_VAL
128  * These are various possible formats which the Client passes down to RM to set in the ZBC clear
129  * Table.
130  *
131  * Though the "Depth" data written in both the DS as well as L2 Version of the
132  * depth table are of (only available!) FP32 Format. Still the format
133  * support is currently given with _CTRL_CMD_SET_ZBC_DEPTH_CLEAR as this format will
134  * be used later on to disable/remove an entry from the table.
135  * In future this field is going to be significant for
136  * "Depth" entries too.
137  */
138 
139 #define NV9096_CTRL_CMD_SET_ZBC_DEPTH_CLEAR_FMT_VAL_INVALID 0x00000000U
140 // Fix me: Fix the name to FMT_VAL_FP32
141 #define NV9096_CTRL_CMD_SET_ZBC_DEPTH_CLEAR_FMT_FP32        0x00000001U
142 
143 /*
144  * NV9096_CTRL_CMD_SET_ZBC_DEPTH_CLEAR
145  *
146  * This command attempts to add a new entry to Depth ZBC Tables.
147  *
148  *  depth
149  *    This field specifies the ZBC depth clear value to be set.
150  *  format
151  *    This field specifies the Depth format for the data send in  by the client.
152  *  bSkipL2Table
153  *    This parameter specifies if the L2 ZBC table should be updated or not. If
154  *    this parameter is set to a non-zero value, the L2 ZBC table will not be
155  *    updated. If this parameter is set to 0, the L2 ZBC table will be updated.
156  *    Note: This parameter will only be supported in verification platforms.
157  *
158 
159  * Possible status values returned are:
160  *   NV_OK
161  *   NVOS_STATUS_INSUFFICIENT_RESOURCES
162  */
163 #define NV9096_CTRL_CMD_SET_ZBC_DEPTH_CLEAR                 (0x90960102U) /* finn: Evaluated from "(FINN_GF100_ZBC_CLEAR_ZBC_INTERFACE_ID << 8) | NV9096_CTRL_SET_ZBC_DEPTH_CLEAR_PARAMS_MESSAGE_ID" */
164 
165 #define NV9096_CTRL_SET_ZBC_DEPTH_CLEAR_PARAMS_MESSAGE_ID (0x2U)
166 
167 typedef struct NV9096_CTRL_SET_ZBC_DEPTH_CLEAR_PARAMS {
168     NvU32  depth;
169     NvU32  format;
170     NvBool bSkipL2Table;
171 } NV9096_CTRL_SET_ZBC_DEPTH_CLEAR_PARAMS;
172 
173 /*
174  * NV9096_CTRL_CMD_GET_ZBC_CLEAR_TABLE
175  *
176  *
177  * This command is used to get the ZBC Clear Color/Depth/Stencil table data i.e. color
178  * values and the status "Use-satatus" of each value in the table from RM.
179  *
180  *   colorFB
181  *      This value returns raw framebuffer values for color ZBC table entries. Pre-GA10x, these values
182  *      are taken from the "L2" table. From GA10x+, these values are taken from CROP table. This value is
183  *      set only when valType is chosen as "NV9096_CTRL_ZBC_CLEAR_OBJECT_TYPE_COLOR"
184  *   colorDS
185  *      Pre-GA10x, returns the DS color value set for ZBC. From GA10x+, returns zeroes since this format is
186  *      deprecated in HW. This value is set only when valType is chosen as "NV9096_CTRL_ZBC_CLEAR_OBJECT_TYPE_COLOR"
187  *   depth
188  *     This field returns the ZBC depth clear value set, when valType is chosen as "NV9096_CTRL_ZBC_CLEAR_OBJECT_TYPE_DEPTH".
189  *   stencil
190  *     This field returns the ZBC stencil clear value set, when valType is chosen as "NV9096_CTRL_ZBC_CLEAR_OBJECT_TYPE_STENCIL"
191  *   format
192  *      This field returns the format of color, depth, or stencil ZBC table entries, using the
193  *      NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT,
194  *      NV9096_CTRL_CMD_SET_ZBC_DEPTH_CLEAR_FMT,
195  *      NV9096_CTRL_CMD_SET_ZBC_STENCIL_CLEAR_FMT* enums depending on the table identified by valType.
196  *      On GA10X and later, color ZBC table entries do not have a format in hardware and this query
197  *      returns a format of "INVALID".
198  *   valType
199  *     This filed specifies the type of the Table  data to be fetched.
200  *     Possible Types are :
201  *       NV9096_CTRL_ZBC_CLEAR_OBJECT_TYPE_COLOR
202  *       NV9096_CTRL_ZBC_CLEAR_OBJECT_TYPE_DEPTH
203  *       NV9096_CTRL_ZBC_CLEAR_OBJECT_TYPE_STENCIL
204  *   indexUsed
205  *     This boolean parameter indicates if a particular index of the table is valid or not.
206  *
207  *   Note: The following parameters are deprecated after Tegra interface is also changed. Clients need
208  *   to use NV9096_CTRL_CMD_GET_ZBC_CLEAR_TABLE_SIZE to query the (start, end) indexes of respective ZBC tables
209  *
210  *   indexSize
211  *     This parameter is used to fetch the table size when "valType" parameter
212  *     is specified as " 0 ".(INVALID TYPE). It is also used to pass in the
213  *     index of the ZBC table for which we want the COLOR/DEPTH info.
214  *   indexStart
215  *      This parameter is used to return the valid starting index of ZBC table, when
216  *      "valType" parameter is specified as "INVALID_TYPE". It will also be used
217  *       as input index to query the ZBC table for COLOR/QUERY/STENCIL Info.
218  *   indexEnd
219  *       This parameter is used to return the valid ending index of ZBC table, when
220  *       "valType" parameter is specified as "INVALID_TYPE".
221  *
222  * Possible status values returned are:
223  *   NV_OK
224  *   NV_ERR_INVALID_ARGUMENT
225  */
226 #define NV9096_CTRL_CMD_GET_ZBC_CLEAR_TABLE       (0x90960103U) /* finn: Evaluated from "(FINN_GF100_ZBC_CLEAR_ZBC_INTERFACE_ID << 8) | NV9096_CTRL_GET_ZBC_CLEAR_TABLE_PARAMS_MESSAGE_ID" */
227 
228 #define NV9096_CTRL_ZBC_CLEAR_OBJECT_TYPE_INVALID 0U
229 #define NV9096_CTRL_ZBC_CLEAR_OBJECT_TYPE_COLOR   1U
230 #define NV9096_CTRL_ZBC_CLEAR_OBJECT_TYPE_DEPTH   2U
231 #define NV9096_CTRL_ZBC_CLEAR_OBJECT_TYPE_STENCIL 3U
232 #define NV9096_CTRL_GET_ZBC_CLEAR_TABLE_PARAMS_MESSAGE_ID (0x3U)
233 
234 typedef struct NV9096_CTRL_GET_ZBC_CLEAR_TABLE_PARAMS {
235     struct {
236         NvU32 colorFB[NV9096_CTRL_SET_ZBC_COLOR_CLEAR_VALUE_SIZE];
237         NvU32 colorDS[NV9096_CTRL_SET_ZBC_COLOR_CLEAR_VALUE_SIZE];
238         NvU32 depth;
239         NvU32 stencil;
240     } value;
241     NvU32 indexSize;
242     NvU32 indexStart;
243     NvU32 indexEnd;
244     NvU32 indexUsed; /* TODO: Change to NvBool, need to fix the tegra interface too */
245     NvU32 format;
246     NvU32 valType;
247 } NV9096_CTRL_GET_ZBC_CLEAR_TABLE_PARAMS;
248 
249 /*
250  * Note: This ctrl call is deprecated. To program ZBC table entries, please use
251  *  NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR
252  *  NV9096_CTRL_CMD_SET_ZBC_DEPTH_CLEAR
253  *  NV9096_CTRL_CMD_SET_ZBC_STENCIL_CLEAR
254  *  which will update a single entry in single table at a time.
255  *
256  *
257  * NV9096_CTRL_CMD_SET_ZBC_CLEAR_TABLE
258  *
259  * This command is used to set the ZBC Clear Color/Depth/Stencil table data at a specified
260  * index. The parameters to this command are described below.
261  *
262  *  colorFB
263  *    This array field specifies the L2 color value to be written to the ZBC table.
264  *  colorDS
265  *    This array field specifies the DS color value to be written to the ZBC table.
266  *  colorFormat
267  *    This field specifies the ZBC color format to be set. This field must be set
268  *    to one of the valid NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL* defines.
269  *  depth
270  *    This field specifies the ZBC depth clear value to be set.
271  *  depthFormat
272  *    This field specifies the ZBC depth format to be set. This field must be set
273  *    to one of the valid NV9096_CTRL_CMD_SET_ZBC_DEPTH_CLEAR_FMT_VAL* defines.
274  *  stencil
275  *    This field specifies the ZBC stencil clear value to be set.
276  *  stencilFormat
277  *    This field specifies the ZBC stencil format to be set. This field must be set
278  *    to one of the valid NV9096_CTRL_CMD_SET_ZBC_STENCIL_CLEAR_FMT_VAL* defines.
279  *  index
280  *    This field specifies the index at which the color/depth data is to be
281  *    written into the ZBC table. Legal values for this field must lie between
282  *    1 and the value returned in the indexSize parameter of the
283  *    NV9096_CTRL_CMD_GET_ZBC_CLEAR_TABLE control call when called with the
284  *    parameter valType set to NV9096_CTRL_ZBC_CLEAR_OBJECT_TYPE_INVALID.
285  *  bSkipL2Table
286  *    This parameter specifies if the L2 ZBC table should be updated or not. If
287  *    this parameter is set to a non-zero value, the L2 ZBC table will not be
288  *    updated. If this parameter is set to 0, the L2 ZBC table will be updated.
289  *
290  * Possible status values returned are:
291  *    NV_OK
292  *    NV_ERR_INVALID_ARGUMENT
293  *    NV_ERR_INSUFFICIENT_RESOURCES
294  */
295 #define NV9096_CTRL_CMD_SET_ZBC_CLEAR_TABLE (0x90960104U) /* finn: Evaluated from "(FINN_GF100_ZBC_CLEAR_ZBC_INTERFACE_ID << 8) | NV9096_CTRL_SET_ZBC_CLEAR_TABLE_PARAMS_MESSAGE_ID" */
296 
297 #define NV9096_CTRL_SET_ZBC_CLEAR_TABLE_PARAMS_MESSAGE_ID (0x4U)
298 
299 typedef struct NV9096_CTRL_SET_ZBC_CLEAR_TABLE_PARAMS {
300     NvU32  colorFB[NV9096_CTRL_SET_ZBC_COLOR_CLEAR_VALUE_SIZE];
301     NvU32  colorDS[NV9096_CTRL_SET_ZBC_COLOR_CLEAR_VALUE_SIZE];
302     NvU32  colorFormat;
303     NvU32  depth;
304     NvU32  depthFormat;
305     NvU32  stencil;
306     NvU32  stencilFormat;
307     NvU32  index;
308     NvBool bSkipL2Table;
309 } NV9096_CTRL_SET_ZBC_CLEAR_TABLE_PARAMS;
310 
311 /*
312  * NV9096_CTRL_CMD_SET_ZBC_STENCIL_CLEAR_FMT_VAL_
313  * These are various possible Formats which the Client passes down to RM to set in the
314  * ZBC clear(DSS) Table.
315  */
316 
317 #define NV9096_CTRL_CMD_SET_ZBC_STENCIL_CLEAR_FMT_VAL_INVALID 0x00000000U
318 // Fix me: Change it to CLEAR_FMT_VAL_U8
319 #define NV9096_CTRL_CMD_SET_ZBC_STENCIL_CLEAR_FMT_U8          0x00000001U
320 
321 /*
322  * NV9096_CTRL_CMD_SET_ZBC_STENCIL_CLEAR
323  *
324  * This command attempts to add a new entry to Stencil ZBC Tables.
325  *
326  *  stencil
327  *    This field specifies the ZBC stencil clear value to be set.
328  *  format
329  *    This field specifies the stencil format for the data send in  by the client.
330  *  bSkipL2Table
331  *    This parameter specifies if the L2 ZBC table should be updated or not. If
332  *    this parameter is set to a non-zero value, the L2 ZBC table will not be
333  *    updated. If this parameter is set to 0, the L2 ZBC table will be updated.
334  *    Note: This parameter will only be supported in verification platforms.
335  * Possible status values returned are:
336  *   NV_OK
337  *   NVOS_STATUS_INSUFFICIENT_RESOURCES
338  */
339 #define NV9096_CTRL_CMD_SET_ZBC_STENCIL_CLEAR                 (0x90960105U) /* finn: Evaluated from "(FINN_GF100_ZBC_CLEAR_ZBC_INTERFACE_ID << 8) | NV9096_CTRL_SET_ZBC_STENCIL_CLEAR_PARAMS_MESSAGE_ID" */
340 
341 #define NV9096_CTRL_SET_ZBC_STENCIL_CLEAR_PARAMS_MESSAGE_ID (0x5U)
342 
343 typedef struct NV9096_CTRL_SET_ZBC_STENCIL_CLEAR_PARAMS {
344     NvU32  stencil;
345     NvU32  format;
346     NvBool bSkipL2Table;
347 } NV9096_CTRL_SET_ZBC_STENCIL_CLEAR_PARAMS;
348 
349 /*
350  * NV9096_CTRL_CMD_GET_ZBC_CLEAR_TABLE_SIZE
351  *   This command returns the range of valid indices in the color, depth, or stencil ZBC tables.
352  *
353  *   indexStart
354  *      This parameter is used to return the first valid index in the color, depth, or stencil ZBC table,
355  *      depending on the value passed in the tableType
356  *   indexEnd
357  *      This parameter is used to return the last valid index in the color, depth, or stencil ZBC table,
358  *      depending on the value passed in the tableType
359  *   tableType
360  *     This field specifies the type of the Table  data to be fetched.
361  *     Possible Types are :
362  *       NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE_COLOR
363  *       NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE_DEPTH
364  *       NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE_STENCIL
365  *
366  * Possible status values returned are:
367  *   NV_OK
368  *   NV_ERR_INVALID_ARGUMENT
369  */
370 
371 typedef enum NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE {
372     NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE_INVALID = 0,
373     NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE_COLOR = 1,
374     NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE_DEPTH = 2,
375     NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE_STENCIL = 3,
376     NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE_COUNT = 4,
377 } NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE;
378 
379 #define NV9096_CTRL_CMD_GET_ZBC_CLEAR_TABLE_SIZE (0x90960106U) /* finn: Evaluated from "(FINN_GF100_ZBC_CLEAR_ZBC_INTERFACE_ID << 8) | NV9096_CTRL_GET_ZBC_CLEAR_TABLE_SIZE_PARAMS_MESSAGE_ID" */
380 
381 #define NV9096_CTRL_GET_ZBC_CLEAR_TABLE_SIZE_PARAMS_MESSAGE_ID (0x6U)
382 
383 typedef struct NV9096_CTRL_GET_ZBC_CLEAR_TABLE_SIZE_PARAMS {
384     NvU32                            indexStart;
385     NvU32                            indexEnd;
386     NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE tableType;
387 } NV9096_CTRL_GET_ZBC_CLEAR_TABLE_SIZE_PARAMS;
388 
389 /*
390  * NV9096_CTRL_CMD_GET_ZBC_CLEAR_TABLE_ENTRY
391  *   This command returns the ZBC entry stored in the color, depth or stencil ZBC tables
392  *
393  *   colorFB[out]
394  *      This value returns raw framebuffer values for color ZBC table entries. Pre-GA10x, these values
395  *      are taken from the "L2" table. From GA10x+, these values are taken from CROP table. This value is
396  *      set only when valType is chosen as "NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE_COLOR"
397  *   colorDS[out]
398  *      Pre-GA10x, returns the DS color value set for ZBC. From GA10x+, returns zeroes since this format is
399  *      deprecated in HW. This value is set only when valType is chosen as "NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE_COLOR"
400  *   depth[out]
401  *      This field specifies the ZBC depth clear value set, when valType is chosen as "NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE_DEPTH".
402  *   stencil[out]
403  *      This field specifies the ZBC stencil clear value set, when valType is chosen as "NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE_STENCIL"
404  *   format
405  *      This field returns the format of color, depth, or stencil ZBC table entries, using the
406  *      NV9096_CTRL_CMD_SET_ZBC_COLOR_CLEAR_FMT_VAL*,
407  *      NV9096_CTRL_CMD_SET_ZBC_DEPTH_CLEAR_FMT*,
408  *      NV9096_CTRL_CMD_SET_ZBC_STENCIL_CLEAR_FMT* enums depending on the table identified by valType.
409  *      On GA10X and later, color ZBC table entries do not have a format in hardware and this query
410  *      returns a format of "INVALID".
411  *   index[in]
412  *      This field specifies table index for which the ZBC entry information needs to be fetched.
413  *   bIndexValid[out]
414  *      This field specifies whether the entry is valid or not.
415  *   tableType[in]
416  *      This field specifies the type of the Table  data to be fetched.
417  *      Possible Types are :
418  *       NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE_COLOR
419  *       NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE_DEPTH
420  *       NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE_STENCIL
421  *
422  * Possible status values returned are:
423  *   NV_OK
424  *   NV_ERR_INVALID_ARGUMENT
425  */
426 
427 #define NV9096_CTRL_CMD_GET_ZBC_CLEAR_TABLE_ENTRY (0x90960107U) /* finn: Evaluated from "(FINN_GF100_ZBC_CLEAR_ZBC_INTERFACE_ID << 8) | NV9096_CTRL_GET_ZBC_CLEAR_TABLE_ENTRY_PARAMS_MESSAGE_ID" */
428 
429 #define NV9096_CTRL_GET_ZBC_CLEAR_TABLE_ENTRY_PARAMS_MESSAGE_ID (0x7U)
430 
431 typedef struct NV9096_CTRL_GET_ZBC_CLEAR_TABLE_ENTRY_PARAMS {
432     struct {
433         NvU32 colorFB[NV9096_CTRL_SET_ZBC_COLOR_CLEAR_VALUE_SIZE];
434         NvU32 colorDS[NV9096_CTRL_SET_ZBC_COLOR_CLEAR_VALUE_SIZE];
435         NvU32 depth;
436         NvU32 stencil;
437     } value;
438     NvU32                            format;
439     NvU32                            index;
440     NvBool                           bIndexValid;
441     NV9096_CTRL_ZBC_CLEAR_TABLE_TYPE tableType;
442 } NV9096_CTRL_GET_ZBC_CLEAR_TABLE_ENTRY_PARAMS;
443 
444 /* _ctrl9096_h_ */
445