Skip to content

Commit 77b31f2

Browse files
committed
change in Std types for common headers
Change-Id: If2079f53a28d1326274322e9149a44300c3de14e
1 parent f7b5da5 commit 77b31f2

File tree

10 files changed

+79
-66
lines changed

10 files changed

+79
-66
lines changed

Source/Common/AssertTracer/AssertTracer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ void __stdcall ReportAssert(
136136
Sends message to the system log.
137137
138138
Input:
139-
const ULONG ComponentMask
139+
const unsigned long ComponentMask
140140
Contains the component id for which raised assert (KMD, MINIPORT..)
141141
const char *expr -
142142
The expression passed to function.

Source/GmmLib/Resource/GmmResourceInfoCommonEx.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ bool GmmLib::GmmResourceInfoCommon::CopyClientParams(GMM_RESCREATE_PARAMS &Creat
5151
!(pGmmGlobalContext->GetSkuTable().FtrWddm2GpuMmu ||
5252
pGmmGlobalContext->GetSkuTable().FtrWddm2Svm);
5353

54-
#if !__GMM_KMD__
54+
#if !__GMM_KMD__ && _WIN32
5555
if(pGmmGlobalContext->GetWaTable().WaLLCCachingUnsupported)
5656
{
5757
Surf.Flags.Info.GttMapType = (CreateParams.Flags.Info.Cacheable) ?

Source/GmmLib/inc/External/Common/GmmGttExt.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ OTHER DEALINGS IN THE SOFTWARE.
2222

2323
#pragma once
2424

25+
#ifdef _WIN32
26+
2527
// Set packing alignment
2628
#pragma pack(push, 8)
2729

@@ -57,4 +59,6 @@ typedef enum GMM_GTT_CACHETYPE_ENUM
5759
GMM_GTT_CACHETYPE_WB_ELLC_AGE_1 = 18, // Gen7.5+
5860
GMM_GTT_CACHETYPE_WB_ELLC_AGE_0 = 19, // Gen7.5+
5961
GMM_GTT_CACHETYPE_MAX
60-
}GMM_GTT_CACHETYPE;
62+
}GMM_GTT_CACHETYPE;
63+
64+
#endif

Source/GmmLib/inc/External/Common/GmmPlatformExt.h

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ extern "C" {
2929
#pragma pack(push, 8)
3030

3131
#ifndef __GMM_KMD__
32+
#ifdef _WIN32
33+
#ifndef PHYSICAL_ADDRESS
34+
#define PHYSICAL_ADDRESS LARGE_INTEGER
35+
#endif
36+
#endif
3237
#ifndef PAGE_SIZE
3338
#define PAGE_SIZE 4096
3439
#endif

Source/inc/common/gfxmacro.h

+7-6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE.
2525

2626
#include <limits.h>
2727
#include <string.h> // for memcpy
28+
#include <stdint.h>
2829

2930
// ### __GFXMACRO_ASSERT ######################################################
3031
// Since an "always-callable" GFX_ASSERT/etc. is no longer really in-place,
@@ -66,9 +67,9 @@ OTHER DEALINGS IN THE SOFTWARE.
6667
((1UL << (hi)) - \
6768
(1UL << (lo))))
6869

69-
#define GFX_MASK_LARGE(lo,hi) (((UINT64)1 << (hi)) | \
70-
(((UINT64)1 << (hi)) - \
71-
((UINT64)1 << (lo))))
70+
#define GFX_MASK_LARGE(lo,hi) (((uint64_t)1 << (hi)) | \
71+
(((uint64_t)1 << (hi)) - \
72+
((uint64_t)1 << (lo))))
7273

7374
#define GFX_IS_POWER_OF_2(a) (((a) > 0) && !((a) & ((a) - 1)))
7475

@@ -289,19 +290,19 @@ __S_INLINE int64_t GFX_POW2_SIZE (int64_t x)
289290
{
290291
#ifdef __CT__
291292
{
292-
_BitScanReverse64(&HighBit, x - 1);
293+
_BitScanReverse64((DWORD *)&HighBit, x - 1);
293294
}
294295
#else // Break into separate Upper/Lower scans...
295296
{
296297
#define UDW_1 ((int64_t) _UI32_MAX + 1) // <-- UpperDW Value of 1 (i.e. 0x00000001`00000000).
297298

298299
if(x < UDW_1)
299300
{
300-
_BitScanReverse(&HighBit, GFX_ULONG_CAST(x - 1));
301+
_BitScanReverse((DWORD *)&HighBit, GFX_ULONG_CAST(x - 1));
301302
}
302303
else if(x > UDW_1)
303304
{
304-
_BitScanReverse(&HighBit, GFX_ULONG_CAST((x - 1) >> 32));
305+
_BitScanReverse((DWORD *)&HighBit, GFX_ULONG_CAST((x - 1) >> 32));
305306
HighBit += 32;
306307
}
307308
else

Source/inc/common/gtsysinfo.h

+10-10
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ OTHER DEALINGS IN THE SOFTWARE.
4040

4141
typedef struct GT_SUBSLICE_INFO
4242
{
43-
uint8_t Enabled; // determine if this SS is enabled.
43+
bool Enabled; // determine if this SS is enabled.
4444
uint32_t EuEnabledCount; // Total Count of EU enabled on this SubSlice
4545
uint32_t EuEnabledMask; // Mask of EUs enabled on this SubSlice
4646
} GT_SUBSLICE_INFO;
4747

4848
typedef struct GT_SLICE_INFO
4949
{
50-
uint8_t Enabled; // determine if this slice is enabled.
50+
bool Enabled; // determine if this slice is enabled.
5151
GT_SUBSLICE_INFO SubSliceInfo[GT_MAX_SUBSLICE_PER_SLICE]; // SS details that belong to this slice.
5252
uint32_t SubSliceEnabledCount; // No. of SS enabled in this slice
5353
} GT_SLICE_INFO;
@@ -82,7 +82,7 @@ typedef struct GT_VEBOX_INFO
8282

8383
uint32_t NumberOfVEBoxEnabled; // Number of bits set among bit 0-3 of VEBoxEnableMask; used on CNL
8484

85-
uint8_t IsValid; // flag to check if VEBoxInfo is valid.
85+
bool IsValid; // flag to check if VEBoxInfo is valid.
8686

8787
} GT_VEBOX_INFO;
8888

@@ -116,7 +116,7 @@ typedef struct GT_VDBOX_INFO
116116

117117
uint32_t NumberOfVDBoxEnabled; // Number of bits set among bit 0-7 of VDBoxEnableMask;
118118

119-
uint8_t IsValid; // flag to check if VDBoxInfo is valid.
119+
bool IsValid; // flag to check if VDBoxInfo is valid.
120120

121121
} GT_VDBOX_INFO;
122122

@@ -136,7 +136,7 @@ typedef struct GT_SYSTEM_INFO
136136
uint64_t L3CacheSizeInKb; // Total L3 cache size in kilo bytes
137137
uint64_t LLCCacheSizeInKb; // Total LLC cache size in kilo bytes
138138
uint64_t EdramSizeInKb; // Total EDRAM size in kilo bytes
139-
uint32_t L3BankCount; // Total L3 banks across all slices. This is not bank count per slice.
139+
uint32_t L3BankCount; // Total L3 banks across all slices. This is not bank count per slice.
140140
uint32_t MaxFillRate; // Fillrate with Alphablend (in Pix/Clk)
141141
uint32_t EuCountPerPoolMax; // Max EU count per pool
142142
uint32_t EuCountPerPoolMin; // Min EU count per pool
@@ -148,28 +148,28 @@ typedef struct GT_SYSTEM_INFO
148148
uint32_t TotalPsThreadsWindowerRange; // Total threads in PS Windower Range
149149

150150
// Note: The CSR size requirement is not clear at this moment. Till then the driver will set
151-
// the maximum size that should be sufficient for all platform SKUs.
151+
// the maximum size that should be sufficient for all platform SKUs.
152152
uint32_t CsrSizeInMb; // Total size that driver needs to allocate for CSR.
153153

154154
/*------------------------------------*/
155155
// Below fields are required for proper allocation of scratch/private space for threads execution.
156156
// Threads scratch space has to be allocated based on native die config. So allocation has to be
157157
// done even for unfused or non-enabled slices/subslices/EUs. Since H/W doesn't provide us a way to know
158158
// about the native die config S/W will allocate based on max EU/S/SS.
159-
uint32_t MaxEuPerSubSlice; // Max available EUs per sub-slice.
159+
uint32_t MaxEuPerSubSlice; // Max available EUs per sub-slice.
160160
uint32_t MaxSlicesSupported; // Max slices this platfrom can have.
161161
uint32_t MaxSubSlicesSupported; // Max total sub-slices this platform can have (not per slice)
162162
/*------------------------------------*/
163163

164164
// Flag to determine if hashing is enabled. If enabled then one of the L3 banks will be disabled.
165165
// As a result 'L3BankCount' will be reduced by 1 bank during system info derivation routine.
166166
// Note: Only expected only in CNL (limited SKUs).
167-
uint8_t IsL3HashModeEnabled;
167+
bool IsL3HashModeEnabled;
168168

169169
// VEBox/VDBox info
170170
GT_VDBOX_INFO VDBoxInfo; // VDBoxInfo provides details(enabled/disabled) of all VDBox instances.
171171
GT_VEBOX_INFO VEBoxInfo; // VEBoxInfo provides details(enabled/disabled) of all VEBox instances.
172-
172+
173173
// SliceInfo provides the detailed breakdown of the Slice/Subslice/EU configuration. It is useful
174174
// for various WA that depend on the specific SSEU components enabled or disabled, but it is not
175175
// considered critically important to driver function at this time and may not be validly populated
@@ -179,7 +179,7 @@ typedef struct GT_SYSTEM_INFO
179179
// purpose. At the moment we are constrained by USC not to make any changes to the GT System
180180
// Info interface which require USC changes. USC currently references IsDynamicallyPopulated.
181181
GT_SLICE_INFO SliceInfo[GT_MAX_SLICE];
182-
uint8_t IsDynamicallyPopulated;
182+
bool IsDynamicallyPopulated;
183183

184184
//SqidiInfo provides the detailed information for number of SQIDIs supported in GT.
185185
//It also provides total no. of doorbells available per SQIDI unit.

Source/inc/umKmInc/UmKmDmaPerfTimer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ OTHER DEALINGS IN THE SOFTWARE.
3131
#if defined (LHDM) || defined(KM_PERF_CONTROLLER_BUILD) || defined(_PERF_REPORT)
3232
#include "UmKmEnum.h"
3333
#endif
34-
34+
#include <stdint.h>
3535
// Set packing alignment
3636
#pragma pack(push, 1)
3737

Source/inc/umKmInc/sharedata.h

+28-28
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ typedef struct __KMD_OVERLAY_CAPS_INFO
102102

103103
KMD_OVERLAY_OVERRIDE OVOverride;
104104

105-
uint32_t MaxOverlayDisplayWidth;
106-
uint32_t MaxOverlayDisplayHeight;
105+
uint32_t MaxOverlayDisplayWidth;
106+
uint32_t MaxOverlayDisplayHeight;
107107
uint8_t HWScalerExists;
108-
uint32_t MaxHWScalerStride;
108+
uint32_t MaxHWScalerStride;
109109
} KMD_OVERLAY_CAPS_INFO;
110110

111111
// Frame Rate
@@ -120,10 +120,10 @@ typedef struct __KM_SYSTEM_INFO
120120

121121
GT_SYSTEM_INFO SystemInfo;
122122
// ShadowReg 119 caluclated value required for WA <WaProgramMgsrForCorrectSliceSpecificMmioReads>
123-
uint32_t ShadowRegValue;
124-
uint32_t ShadowRegValueforL3SpecificRegReads; // Shadow reg value for L3 bank specific MMIO reads.
123+
uint32_t ShadowRegValue;
124+
uint32_t ShadowRegValueforL3SpecificRegReads; // Shadow reg value for L3 bank specific MMIO reads.
125125

126-
uint32_t GfxDevId; // DeviceID
126+
uint32_t GfxDevId; // DeviceID
127127
}KM_SYSTEM_INFO;
128128

129129

@@ -149,47 +149,47 @@ typedef struct _KM_DEFERRED_WAIT_INFO
149149
#pragma pack (push,1)
150150
typedef struct _ADAPTER_INFO
151151
{
152-
uint32_t KmdVersionInfo; // Version ID
152+
uint32_t KmdVersionInfo; // Version ID
153153
DRIVER_VERSION_INFO DriverVersionInfo; //
154154
PLATFORM GfxPlatform; // Chipset Gfx family, product, render core, display core, etc
155155
SKU_FEATURE_TABLE SkuTable; // SKU feature table
156156
WA_TABLE WaTable; // WA table
157-
uint32_t GfxTimeStampFreq; // In Hz (No. of clock ticks per second). So timestamp base = 1 / GfxTimeStampFreq
158-
uint32_t GfxCoreFrequency; // In MHz.
159-
uint32_t FSBFrequency; // In MHz.
160-
uint32_t MinRenderFreq; // In MHz.
161-
uint32_t MaxRenderFreq; // In MHz.
162-
uint32_t PackageTdp; // TDP Power for the platform (In Watt)
163-
uint32_t MaxFillRate; // Fillrate with Alphablend (In Pix/Clk)
164-
uint32_t NumberOfEUs; // Number of EUs in GT
157+
uint32_t GfxTimeStampFreq; // In Hz (No. of clock ticks per second). So timestamp base = 1 / GfxTimeStampFreq
158+
uint32_t GfxCoreFrequency; // In MHz.
159+
uint32_t FSBFrequency; // In MHz.
160+
uint32_t MinRenderFreq; // In MHz.
161+
uint32_t MaxRenderFreq; // In MHz.
162+
uint32_t PackageTdp; // TDP Power for the platform (In Watt)
163+
uint32_t MaxFillRate; // Fillrate with Alphablend (In Pix/Clk)
164+
uint32_t NumberOfEUs; // Number of EUs in GT
165165

166166
// NOTE: Name is kept same so that we don't have to change PC_TARGET macro and usage
167167
// of that.
168-
uint32_t dwReleaseTarget; // PC Release Target Information supplied by INF
168+
uint32_t dwReleaseTarget; // PC Release Target Information supplied by INF
169169

170170
// Following member can be use by UMD for optimal use of DMA and
171171
// command buffer
172-
uint32_t SizeOfDmaBuffer; // Size of DMA buffer set (In Bytes)
173-
uint32_t PatchLocationListSize; // Size of Patch Location List (In number of entries)
174-
uint32_t AllocationListSize; // Size of Patch Location List (In number of entries)
175-
uint32_t SmallPatchLocationListSize; // Size of Patch Location List for UMD context that needs a small Patch Location List,
172+
uint32_t SizeOfDmaBuffer; // Size of DMA buffer set (In Bytes)
173+
uint32_t PatchLocationListSize; // Size of Patch Location List (In number of entries)
174+
uint32_t AllocationListSize; // Size of Patch Location List (In number of entries)
175+
uint32_t SmallPatchLocationListSize; // Size of Patch Location List for UMD context that needs a small Patch Location List,
176176
// currently only used by media context (In number of entries)
177-
uint32_t DefaultCmdBufferSize; // Size of Cmd buffer default location
177+
uint32_t DefaultCmdBufferSize; // Size of Cmd buffer default location
178178

179179
// Following Members can be use for any UMD optimization (like Size of vertex buffer to allocate)
180180
// any cacheline related read/write, etc
181-
int64_t GfxMemorySize; // Total GFX memory (In MBytes)
182-
uint32_t SystemMemorySize; // Total System Memory (In MBytes)
183-
uint32_t CacheLineSize; // Processor CacheLine size
181+
int64_t GfxMemorySize; // Total GFX memory (In MBytes)
182+
uint32_t SystemMemorySize; // Total System Memory (In MBytes)
183+
uint32_t CacheLineSize; // Processor CacheLine size
184184
PROCESSOR_FAMILY ProcessorFamily; // Processor Family
185185
uint8_t IsHTSupported; // Is Hyper Threaded CPU
186186
uint8_t IsMutiCoreCpu; // Is Multi Core CPU
187187
uint8_t IsVTDSupported; // Is Chipset VT is supported
188188
char DeviceRegistryPath[UMD_KMD_MAX_REGISTRY_PATH_LENGTH]; // Array that contains the device registry path
189-
uint32_t RegistryPathLength; // Actual chars (not including any trailing NULL) in the array set by the KMD
190-
int64_t DedicatedVideoMemory; // Dedicated Video Memory
191-
int64_t SystemSharedMemory; // System Shared Memory
192-
int64_t SystemVideoMemory; // SystemVideoMemory
189+
uint32_t RegistryPathLength; // Actual chars (not including any trailing NULL) in the array set by the KMD
190+
int64_t DedicatedVideoMemory; // Dedicated Video Memory
191+
int64_t SystemSharedMemory; // System Shared Memory
192+
int64_t SystemVideoMemory; // SystemVideoMemory
193193
FRAME_RATE OutputFrameRate; // Output Frame Rate
194194
FRAME_RATE InputFrameRate; // Input Frame Rate
195195
KMD_CAPS_INFO Caps; // List of capabilities supported by the KMD

Source/util/g_gfxDebug.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ enum
151151
#ifdef __cplusplus
152152
extern "C" {
153153
#endif
154-
void GMMPrintMessage(uint32_t DebugLevel, const char *DebugMessageFmt, ...);
154+
void GMMPrintMessage(unsigned long DebugLevel, const char *DebugMessageFmt, ...);
155155

156156
#ifdef __cplusplus
157157
}

0 commit comments

Comments
 (0)