1 /*==============================================================================
2 Copyright(c) 2017 Intel Corporation
3 
4 Permission is hereby granted, free of charge, to any person obtaining a
5 copy of this software and associated documentation files(the "Software"),
6 to deal in the Software without restriction, including without limitation
7 the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 and / or sell copies of the Software, and to permit persons to whom the
9 Software is furnished to do so, subject to the following conditions:
10 
11 The above copyright notice and this permission notice shall be included
12 in all copies or substantial portions of the Software.
13 
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 OTHER DEALINGS IN THE SOFTWARE.
21 ============================================================================*/
22 
23 #pragma once
24 
25 
26 //------------------------------------------------------------------------
27 // Texture Values
28 //------------------------------------------------------------------------
29 #define __GMM_MIN_TEXTURE_WIDTH                         0x1
30 #define __GMM_EVEN_ROW                                  0x2
31 #define __GMM_LINEAR_RENDER_ALIGNMENT                   0x4     // need DWORD aligned
32 #define __GMM_8BPP_LINEAR_RENDER_ALIGNMENT              0x8     // need QWORD aligned (HW workaround)
33 #define GMM_IMCx_PLANE_ROW_ALIGNMENT                    16
34 
35 //------------------------------------------------------------------------
36 // Misc
37 //------------------------------------------------------------------------
38 #define GMM_MDL_PAGE_SHIFT                              12      // Size of bit-shift to convert btween MDL page NUMBER and page ADDRESS.
39 #define GMM_FIELD_NA                                   0xFFFFFFFF
40 #define GMM_INTERNAL_RESOURCE                           0       // Used for Alloc Tag Mapping
41 #define GMM_MAX_NUMBER_MOCS_INDEXES                    (64)
42 #define GMM_GEN9_MAX_NUMBER_MOCS_INDEXES               (62)     // On SKL there are 64 MOCS indexes, but the last two are reserved by h/w.
43 #define GMM_NUM_PAT_ENTRIES                             8
44 #define GMM_NUM_MEMORY_TYPES                            4
45 #define GMM_NUM_GFX_PAT_TYPES                           6
46 #define GMM_TILED_RESOURCE_NO_MIP_TAIL                 0xF
47 #define GMM_TILED_RESOURCE_NO_PACKED_MIPS              0xF
48 #define GMM_GEN10_HDCL1_MOCS_INDEX_START               (48)     // CNL+ MOCS index 48-61 allows HDC L1 caching, last 2 are reserved by h/w.
49 #define GMM_MSAA_SAMPLES_MIN                            1       //Define min and max MSAA samples
50 #define GMM_MSAA_SAMPLES_MAX                            16
51 #define GMM_HIZ_CLEAR_COLOR_SIZE                       (8)
52 #define GMM_MEDIA_COMPRESSION_STATE_SIZE               (64)
53 #define GMM_CLEAR_COLOR_FLOAT_SIZE                     (16)
54 #define GMM_MAX_LCU_SIZE                                64  // Media Largest coding Unit
55