xref: /aosp_15_r20/external/mesa3d/src/amd/common/ac_vcn.h (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1 /*
2  * Copyright © 2022 Advanced Micro Devices, Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining
5  * a copy of this software and associated documentation files (the
6  * "Software"), to deal in the Software without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sub license, and/or sell copies of the Software, and to
9  * permit persons to whom the Software is furnished to do so, subject to
10  * the following conditions:
11  *
12  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
14  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15  * NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS
16  * AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
18  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
19  * USE OR OTHER DEALINGS IN THE SOFTWARE.
20  *
21  * The above copyright notice and this permission notice (including the
22  * next paragraph) shall be included in all copies or substantial portions
23  * of the Software.
24  */
25 
26 #ifndef AC_VCN_H
27 #define AC_VCN_H
28 
29 #define RADEON_VCN_ENGINE_INFO                                        (0x30000001)
30 #define RADEON_VCN_SIGNATURE                                          (0x30000002)
31 #define RADEON_VCN_ENGINE_TYPE_COMMON                                 (0x00000001)
32 #define RADEON_VCN_ENGINE_TYPE_ENCODE                                 (0x00000002)
33 #define RADEON_VCN_ENGINE_TYPE_DECODE                                 (0x00000003)
34 
35 #define RADEON_VCN_ENGINE_INFO_SIZE                                   (0x00000010)
36 #define RADEON_VCN_SIGNATURE_SIZE                                     (0x00000010)
37 
38 #define RADEON_VCN_IB_COMMON_OP_WRITEMEMORY                           (0x33000001)
39 
40 struct rvcn_sq_var {
41    unsigned int *ib_total_size_in_dw;
42    unsigned int *ib_checksum;
43 };
44 
45 struct rvcn_cmn_engine_ib_package {
46    unsigned int package_size;
47    unsigned int package_type;
48 };
49 
50 struct rvcn_cmn_engine_op_writememory {
51     unsigned int dest_addr_lo;           // Low address of memory
52     unsigned int dest_addr_hi;           // High address of memory
53     unsigned int data;                   // data to be written
54 };
55 
56 #endif
57