1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2014-2022 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 #pragma once
24 
25 #include <nvtypes.h>
26 
27 //
28 // This file was generated with FINN, an NVIDIA coding tool.
29 // Source file:      ctrl/ctrl0080/ctrl0080bsp.finn
30 //
31 
32 #include "ctrl/ctrl0080/ctrl0080base.h"
33 
34 /* NV01_DEVICE_XX/NV03_DEVICE bit stream processor control commands and parameters */
35 
36 /*
37  * NV0080_CTRL_CMD_BSP_GET_CAPS
38  *
39  * This command returns the set of BSP capabilities for the device
40  * in the form of an array of unsigned bytes.  BSP capabilities
41  * include supported features and required workarounds for the decoder
42  * within the device, each represented by a byte offset into the
43  * table and a bit position within that byte.
44  *
45  *   capsTblSize
46  *     This parameter specifies the size in bytes of the caps table.
47  *     This value should be set to NV0080_CTRL_BSP_CAPS_TBL_SIZE.
48  *   capsTbl
49  *     This parameter specifies a pointer to the client's caps table buffer
50  *     into which the BSP caps bits will be transferred by the RM.
51  *     The caps table is an array of unsigned bytes.
52  *   instanceId
53  *     This parameter specifies the instance Id of NVDEC for which
54  *     cap bits are requested.
55  *
56  * Possible status values returned are:
57  *   NV_OK
58  *   NV_ERR_INVALID_PARAM_STRUCT
59  *   NV_ERR_INVALID_ARGUMENT
60  */
61 
62 #define NV0080_CTRL_CMD_BSP_GET_CAPS (0x801c01) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_BSP_INTERFACE_ID << 8) | NV0080_CTRL_BSP_GET_CAPS_PARAMS_MESSAGE_ID" */
63 
64 #define NV0080_CTRL_BSP_GET_CAPS_PARAMS_MESSAGE_ID (0x1U)
65 
66 typedef struct NV0080_CTRL_BSP_GET_CAPS_PARAMS {
67     NvU32 capsTblSize;
68     NV_DECLARE_ALIGNED(NvP64 capsTbl, 8);
69     NvU32 instanceId;
70 } NV0080_CTRL_BSP_GET_CAPS_PARAMS;
71 
72 
73 
74 /*
75  * Size in bytes of bsp caps table. This value should be one greater
76  * than the largest byte_index value above.
77  */
78 #define NV0080_CTRL_BSP_CAPS_TBL_SIZE   8
79 
80 /*
81  * NV0080_CTRL_CMD_BSP_GET_CAPS_V2
82  *
83  * This command returns the set of BSP capabilities for the device
84  * in the form of an array of unsigned bytes.  BSP capabilities
85  * include supported features and required workarounds for the decoder
86  * within the device, each represented by a byte offset into the
87  * table and a bit position within that byte.
88  * (The V2 version flattens the capsTbl array pointer).
89  *
90  *   capsTbl
91  *     This parameter is an array of unsigned bytes where the BSP caps bits
92  *     will be transferred by the RM.
93  *   instanceId
94  *     This parameter specifies the instance Id of NVDEC for which
95  *     cap bits are requested.
96  *
97  * Possible status values returned are:
98  *   NV_OK
99  *   NV_ERR_INVALID_PARAM_STRUCT
100  *   NV_ERR_INVALID_ARGUMENT
101  */
102 
103 #define NV0080_CTRL_CMD_BSP_GET_CAPS_V2 (0x801c02) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_BSP_INTERFACE_ID << 8) | NV0080_CTRL_BSP_GET_CAPS_PARAMS_V2_MESSAGE_ID" */
104 
105 #define NV0080_CTRL_BSP_GET_CAPS_PARAMS_V2_MESSAGE_ID (0x2U)
106 
107 typedef struct NV0080_CTRL_BSP_GET_CAPS_PARAMS_V2 {
108     NvU8  capsTbl[NV0080_CTRL_BSP_CAPS_TBL_SIZE];
109     NvU32 instanceId;
110 } NV0080_CTRL_BSP_GET_CAPS_PARAMS_V2;
111 
112 /* _ctrl0080bsp_h_ */
113