| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
#ifndef __MHW_RENDER_G12_X_H__ |
| 28 |
#define __MHW_RENDER_G12_X_H__ |
| 29 |
|
| 30 |
#include "mhw_render_generic.h" |
| 31 |
#include "mhw_render_hwcmd_g12_X.h" |
| 32 |
#include "mhw_mmio_g12.h" |
| 33 |
#include "mhw_state_heap_g12.h" |
| 34 |
|
| 35 |
typedef struct MHW_RENDER_ENGINE_L3_CACHE_SETTINGS_G12 : MHW_RENDER_ENGINE_L3_CACHE_SETTINGS |
| 36 |
{ |
| 37 |
uint32_t dwTcCntlReg = 0; |
| 38 |
uint32_t dwAllocReg = 0; |
| 39 |
bool bUpdateDefault = 0; |
| 40 |
} *PMHW_RENDER_ENGINE_L3_CACHE_SETTINGS_G12; |
| 41 |
|
| 42 |
typedef struct MHW_RENDER_ENGINE_L3_CACHE_CONFIG_G12 : MHW_RENDER_ENGINE_L3_CACHE_CONFIG |
| 43 |
{ |
| 44 |
uint32_t dwRcsL3CacheTcCntlReg_Register = 0; |
| 45 |
uint32_t dwL3CacheTcCntlReg_Setting = 0; |
| 46 |
uint32_t dwRcsL3CacheAllocReg_Register = 0; |
| 47 |
uint32_t dwL3CacheAllocReg_Setting = 0; |
| 48 |
uint32_t dwCcs0L3CacheTcCntlReg_Register = 0; |
| 49 |
uint32_t dwCcs0L3CacheAllocReg_Register = 0; |
| 50 |
} *PMHW_RENDER_ENGINE_L3_CACHE_CONFIG_G12; |
| 51 |
|
| 52 |
struct MHW_VFE_PARAMS_G12 : MHW_VFE_PARAMS |
| 53 |
{ |
| 54 |
bool bFusedEuDispatch = 0; |
| 55 |
uint32_t numOfWalkers = 0; |
| 56 |
bool enableSingleSliceDispatchCcsMode = 0; |
| 57 |
|
| 58 |
|
| 59 |
uint32_t scratchStateOffset = 0; |
| 60 |
}; |
| 61 |
|
| 62 |
class MhwRenderInterfaceG12 : public MhwRenderInterfaceGeneric<mhw_render_g12_X> |
| 63 |
{ |
| 64 |
public: |
| 65 |
MhwRenderInterfaceG12( |
| 66 |
MhwMiInterface *miInterface, |
| 67 |
PMOS_INTERFACE osInterface, |
| 68 |
MEDIA_SYSTEM_INFO *gtSystemInfo, |
| 69 |
uint8_t newStateHeapManagerRequested) : |
| 70 |
MhwRenderInterfaceGeneric(miInterface, osInterface, gtSystemInfo, newStateHeapManagerRequested) |
| 71 |
{ |
| 72 |
MHW_FUNCTION_ENTER; |
| 73 |
|
| 74 |
m_l3CacheCntlRegisterValueDefault = 0x80000080; |
| 75 |
|
| 76 |
InitMmioRegisters(); |
| 77 |
} |
| 78 |
|
| 79 |
virtual ~MhwRenderInterfaceG12() { MHW_FUNCTION_ENTER; } |
| 80 |
|
| 81 |
MOS_STATUS AddMediaVfeCmd( |
| 82 |
PMOS_COMMAND_BUFFER cmdBuffer, |
| 83 |
PMHW_VFE_PARAMS params); |
| 84 |
|
| 85 |
MOS_STATUS AddPipelineSelectCmd( |
| 86 |
PMOS_COMMAND_BUFFER cmdBuffer, |
| 87 |
bool gpGpuPipe); |
| 88 |
|
| 89 |
MOS_STATUS AddMediaObject( |
| 90 |
PMOS_COMMAND_BUFFER cmdBuffer, |
| 91 |
PMHW_BATCH_BUFFER batchBuffer, |
| 92 |
PMHW_MEDIA_OBJECT_PARAMS params); |
| 93 |
|
| 94 |
MOS_STATUS AddPaletteLoadCmd( |
| 95 |
PMOS_COMMAND_BUFFER cmdBuffer, |
| 96 |
PMHW_PALETTE_PARAMS params) |
| 97 |
{ |
| 98 |
MHW_ASSERTMESSAGE("PALETTE_ENTRY is not supported!"); |
| 99 |
return MOS_STATUS_PLATFORM_NOT_SUPPORTED; |
| 100 |
} |
| 101 |
|
| 102 |
MOS_STATUS AddGpgpuCsrBaseAddrCmd( |
| 103 |
PMOS_COMMAND_BUFFER cmdBuffer, |
| 104 |
PMOS_RESOURCE csrResource); |
| 105 |
|
| 106 |
MOS_STATUS EnableL3Caching( |
| 107 |
PMHW_RENDER_ENGINE_L3_CACHE_SETTINGS cacheSettings); |
| 108 |
|
| 109 |
MOS_STATUS SetL3Cache( |
| 110 |
PMOS_COMMAND_BUFFER cmdBuffer ); |
| 111 |
|
| 112 |
MHW_RENDER_ENGINE_L3_CACHE_CONFIG* GetL3CacheConfig() { return &m_l3CacheConfig; } |
| 113 |
|
| 114 |
virtual PMHW_MI_MMIOREGISTERS GetMmioRegisters() |
| 115 |
{ |
| 116 |
return &m_mmioRegisters; |
| 117 |
} |
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
virtual uint32_t GetSamplerStateAVSIncUnit() { return MHW_SAMPLER_STATE_AVS_INC_G12; } |
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
virtual uint32_t GetSamplerStateConvIncUnit() { return MHW_SAMPLER_STATE_CONV_INC_G12; } |
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
virtual void GetSamplerResolutionAlignUnit(bool isAVSSampler, uint32_t &widthAlignUnit, uint32_t &heightAlignUnit) |
| 143 |
{ |
| 144 |
|
| 145 |
|
| 146 |
widthAlignUnit = isAVSSampler ? MHW_AVS_SAMPLER_WIDTH_ALIGN_UNIT : MHW_SAMPLER_WIDTH_ALIGN_UNIT_G12; |
| 147 |
heightAlignUnit = isAVSSampler ? MHW_AVS_SAMPLER_HEIGHT_ALIGN_UNIT : MHW_SAMPLER_HEIGHT_ALIGN_UNIT_G12; |
| 148 |
} |
| 149 |
|
| 150 |
protected: |
| 151 |
MHW_RENDER_ENGINE_L3_CACHE_CONFIG_G12 m_l3CacheConfig; |
| 152 |
|
| 153 |
uint32_t m_l3CacheTcCntlRegisterValueDefault = 0; |
| 154 |
uint32_t m_l3CacheAllocRegisterValueDefault = 0xD0000020; |
| 155 |
|
| 156 |
private: |
| 157 |
|
| 158 |
MHW_MI_MMIOREGISTERS m_mmioRegisters = {}; |
| 159 |
void InitMmioRegisters(); |
| 160 |
}; |
| 161 |
#endif |