1 /*===================== begin_copyright_notice ==================================
2 /*
3 * Copyright (c) 2019, Intel Corporation
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
13 * in all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16 * OR 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
19 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 * OTHER DEALINGS IN THE SOFTWARE.
22 */
23 //!
24 //! \file      cm_device_rt_base.h
25 //! \brief     Contains CmDeviceRTBase declarations.
26 //!
27 
28 #ifndef MEDIADRIVER_COMMON_CM_CMDEVICERT_BASE_H_
29 #define MEDIADRIVER_COMMON_CM_CMDEVICERT_BASE_H_
30 
31 #include "cm_device.h"
32 
33 #include "cm_array.h"
34 #include "cm_csync.h"
35 #include "cm_hal.h"
36 #include "cm_log.h"
37 #include "cm_program.h"
38 #include "cm_notifier.h"
39 
40 #if USE_EXTENSION_CODE
41 #include "cm_gtpin.h"
42 #endif
43 
44 namespace CMRT_UMD
45 {
46 class CmSurfaceManager;
47 class CmQueue;
48 class CmQueueRT;
49 class CmKernel;
50 class CmThreadSpace;
51 class CmThreadGroupSpace;
52 class CmVebox;
53 class CmSampler;
54 class CmEvent;
55 class CmTask;
56 class CmQueueBase;
57 class CmProgram;
58 class CmBuffer;
59 class CmBufferUP;
60 class CmBufferSVM;
61 class CmBufferStateless;
62 class CmSurface2D;
63 class CmSurface2DUP;
64 class CmSurface2DUPRT;
65 class CmSurface3D;
66 class CmSampler8x8;
67 class CmSampler8x8State_RT;
68 
69 //! \brief    CmDevice memory object count
70 struct CM_OBJECT_COUNT
71 {
72     int32_t kernelCount;
73     int32_t programCount;
74     int32_t taskCount;
75     int32_t threadSpaceCount;
76     int32_t threadGroupSpaceCount;
77     int32_t veboxCount;
78     int32_t eventCount;
79 };
80 
81 
82 //! \brief    Class CmDeviceRTBase definitions
83 class CmDeviceRTBase: public CmDevice
84 {
85 public:
86 
87     CM_RT_API int32_t CreateBuffer(uint32_t size,
88                                    CmBuffer* & pSurface);
89 
90     CM_RT_API int32_t CreateBuffer(PMOS_RESOURCE pMosResource,
91                                    CmBuffer* & pSurface);
92 
93     CM_RT_API virtual  int32_t CreateSurface2D(uint32_t width,
94                                       uint32_t height,
95                                       CM_SURFACE_FORMAT format,
96                                       CmSurface2D* & pSurface) = 0;
97 
98     CM_RT_API virtual  int32_t CreateSurface2D(PMOS_RESOURCE pMosResource,
99                                       CmSurface2D* & pSurface) = 0;
100 
101     CM_RT_API int32_t CreateSurface3D(uint32_t width,
102                                       uint32_t height,
103                                       uint32_t depth,
104                                       CM_SURFACE_FORMAT format,
105                                       CmSurface3D* & pSurface);
106 
107     CM_RT_API int32_t DestroySurface(CmBuffer* & pSurface);
108 
109     CM_RT_API int32_t DestroySurface(CmSurface2D* & pSurface);
110 
111     CM_RT_API int32_t DestroySurface(CmSurface3D* & pSurface);
112 
113     CM_RT_API int32_t CreateQueue(CmQueue* & pQueue);
114 
115     CM_RT_API int32_t LoadProgram(void* pCommonISACode,
116                                   const uint32_t size,
117                                   CmProgram*& pProgram,
118                                   const char* options = nullptr);
119 
120     CM_RT_API int32_t CreateKernel(CmProgram* pProgram,
121                                    const char* kernelName,
122                                    CmKernel* & pKernel,
123                                    const char* options = nullptr);
124 
125     CM_RT_API virtual int32_t CreateKernel(CmProgram* pProgram,
126                                            const char* kernelName,
127                                            const void * fncPnt,
128                                            CmKernel* & pKernel,
129                                            const char* options = nullptr)
130     { return CM_NOT_IMPLEMENTED; }
131 
132     CM_RT_API int32_t
133     CreateSampler(const CM_SAMPLER_STATE & sampleState,
134                   CmSampler* & pSampler);
135 
136     CM_RT_API int32_t DestroyKernel(CmKernel*& pKernel);
137 
138     CM_RT_API int32_t DestroySampler(CmSampler*& pSampler);
139 
140     CM_RT_API int32_t DestroyProgram(CmProgram* & pProgram);
141 
142     CM_RT_API int32_t DestroyThreadSpace(CmThreadSpace* & pTS);
143 
144     CM_RT_API int32_t CreateTask(CmTask *& pTask);
145 
146     CM_RT_API int32_t DestroyTask(CmTask*& pTask);
147 
148     CM_RT_API int32_t GetCaps(CM_DEVICE_CAP_NAME capName,
149                               uint32_t & capValueSize,
150                               void* pCapValue);
151 
152     CM_RT_API int32_t CreateThreadSpace(uint32_t width,
153                                         uint32_t height,
154                                         CmThreadSpace* & pTS);
155 
156     CM_RT_API int32_t CreateBufferUP(uint32_t size,
157                                      void* pSystMem,
158                                      CmBufferUP* & pSurface);
159 
160     CM_RT_API int32_t DestroyBufferUP(CmBufferUP* & pSurface);
161 
162     CM_RT_API int32_t ForceDestroyBufferUP(CmBufferUP* & pSurface);
163 
164     CM_RT_API int32_t GetSurface2DInfo(uint32_t width,
165                                        uint32_t height,
166                                        CM_SURFACE_FORMAT format,
167                                        uint32_t & pitch,
168                                        uint32_t & physicalSize);
169 
170     CM_RT_API int32_t CreateSurface2DUP(uint32_t width,
171                                         uint32_t height,
172                                         CM_SURFACE_FORMAT format,
173                                         void* pSysMem,
174                                         CmSurface2DUP* & pSurface);
175 
176     CM_RT_API int32_t DestroySurface2DUP(CmSurface2DUP* & pSurface);
177 
178     CM_RT_API int32_t CreateVmeSurfaceG7_5(CmSurface2D* pCurSurface,
179                                            CmSurface2D** pForwardSurface,
180                                            CmSurface2D** pBackwardSurface,
181                                            const uint32_t surfaceCountForward,
182                                            const uint32_t surfaceCountBackward,
183                                            SurfaceIndex* & pVmeIndex);
184 
185     CM_RT_API int32_t DestroyVmeSurfaceG7_5(SurfaceIndex* & pVmeIndex);
186 
187     CM_RT_API int32_t CreateSampler8x8(const CM_SAMPLER_8X8_DESCR  & smplDescr,
188                                        CmSampler8x8 *& psmplrState);
189 
190     CM_RT_API int32_t DestroySampler8x8(CmSampler8x8*& ps8x8State);
191 
192     CM_RT_API int32_t
193     CreateSampler8x8Surface(CmSurface2D* p2DSurface,
194                             SurfaceIndex* & pDIIndex,
195                             CM_SAMPLER8x8_SURFACE surf_type,
196                             CM_SURFACE_ADDRESS_CONTROL_MODE mode);
197 
198     CM_RT_API int32_t DestroySampler8x8Surface(SurfaceIndex* & pDIIndex);
199 
200     CM_RT_API int32_t CreateThreadGroupSpace(uint32_t thrdSpaceWidth,
201                                              uint32_t thrdSpaceHeight,
202                                              uint32_t grpSpaceWidth,
203                                              uint32_t grpSpaceHeight,
204                                              CmThreadGroupSpace*& pTGS);
205 
206     CM_RT_API int32_t DestroyThreadGroupSpace(CmThreadGroupSpace*& pTGS);
207 
208     CM_RT_API int32_t SetL3Config(const L3ConfigRegisterValues *l3_c);
209 
210     CM_RT_API int32_t SetSuggestedL3Config(L3_SUGGEST_CONFIG l3_s_c);
211 
212     CM_RT_API int32_t SetCaps(CM_DEVICE_CAP_NAME capName,
213                               size_t capValueSize,
214                               void* pCapValue);
215 
216     CM_RT_API int32_t
217     CreateSamplerSurface2D(CmSurface2D* p2DSurface,
218                            SurfaceIndex* & pSamplerSurfaceIndex);
219 
220     CM_RT_API int32_t
221     CreateSamplerSurface3D(CmSurface3D* p3DSurface,
222                            SurfaceIndex* & pSamplerSurfaceIndex);
223 
224     CM_RT_API int32_t
225     DestroySamplerSurface(SurfaceIndex* & pSamplerSurfaceIndex);
226 
227     CM_RT_API int32_t
228     InitPrintBuffer(size_t size = CM_DEFAULT_PRINT_BUFFER_SIZE);
229 
230     CM_RT_API int32_t FlushPrintBuffer();
231 
232     CM_RT_API int32_t CreateVebox(CmVebox* & pVebox);
233 
234     CM_RT_API int32_t DestroyVebox(CmVebox* & pVebox);
235 
236     CM_RT_API int32_t CreateBufferSVM(uint32_t size,
237                                       void* & pSystMem,
238                                       uint32_t access_flag,
239                                       CmBufferSVM* & pBufferSVM);
240 
241     CM_RT_API int32_t DestroyBufferSVM(CmBufferSVM* & pBufferSVM);
242 
243     CM_RT_API int32_t
244     CreateSamplerSurface2DUP(CmSurface2DUP* p2DUPSurface,
245                              SurfaceIndex* & pSamplerSurfaceIndex);
246 
247     CM_RT_API int32_t CloneKernel(CmKernel* &pKernelDest, CmKernel*pKernelSrc);
248 
249     CM_RT_API int32_t CreateSurface2DAlias(CmSurface2D* p2DSurface,
250                                            SurfaceIndex* &aliasSurfaceIndex);
251 
252     CM_RT_API int32_t
253     CreateHevcVmeSurfaceG10(CmSurface2D* pCurSurface,
254                             CmSurface2D** pForwardSurface,
255                             CmSurface2D** pBackwardSurface,
256                             const uint32_t surfaceCountForward,
257                             const uint32_t surfaceCountBackward,
258                             SurfaceIndex* & pVmeIndex);
259 
260     CM_RT_API int32_t
261     DestroyHevcVmeSurfaceG10(SurfaceIndex* & pVmeIndex);
262 
263     CM_RT_API int32_t CreateSamplerEx(const CM_SAMPLER_STATE_EX & sampleState,
264                                       CmSampler* & pSampler);
265 
266     CM_RT_API int32_t FlushPrintBufferIntoFile(const char *filename);
267 
268     CM_RT_API int32_t CreateThreadGroupSpaceEx(uint32_t thrdSpaceWidth,
269                                                uint32_t thrdSpaceHeight,
270                                                uint32_t thrdSpaceDepth,
271                                                uint32_t grpSpaceWidth,
272                                                uint32_t grpSpaceHeight,
273                                                uint32_t grpSpaceDepth,
274                                                CmThreadGroupSpace*& pTGS);
275 
276     CM_RT_API int32_t
277     CreateSampler8x8SurfaceEx(
278     CmSurface2D* p2DSurface,
279     SurfaceIndex* & pDIIndex,
280     CM_SAMPLER8x8_SURFACE surf_type = CM_VA_SURFACE,
281     CM_SURFACE_ADDRESS_CONTROL_MODE address_control = CM_SURFACE_CLAMP,
282     CM_FLAG* pFlag = nullptr);
283 
284     CM_RT_API int32_t
285     CreateSamplerSurface2DEx(CmSurface2D* p2DSurface,
286                              SurfaceIndex* & pSamplerSurfaceIndex,
287                              CM_FLAG* pFlag = nullptr);
288 
289     CM_RT_API int32_t CreateBufferAlias(CmBuffer *pBuffer,
290                                         SurfaceIndex* &pAliasIndex);
291 
292     CM_RT_API int32_t
293     SetVmeSurfaceStateParam(SurfaceIndex* pVmeIndex,
294                             CM_VME_SURFACE_STATE_PARAM *pSSParam);
295 
296     CM_RT_API int32_t GetVISAVersion(uint32_t& majorVersion,
297                                      uint32_t& minorVersion);
298 
299     CM_RT_API int32_t
300     CreateQueueEx(CmQueue *&pQueue,
301                   CM_QUEUE_CREATE_OPTION QueueCreateOption
302                   = CM_DEFAULT_QUEUE_CREATE_OPTION);
303 
304     CM_RT_API int32_t UpdateBuffer(PMOS_RESOURCE mosResource, CmBuffer* &surface,
305                                    MOS_HW_RESOURCE_DEF mosUsage = MOS_CM_RESOURCE_USAGE_SurfaceState);
306 
307     CM_RT_API int32_t UpdateSurface2D(PMOS_RESOURCE mosResource, CmSurface2D* &surface,
308                                       MOS_HW_RESOURCE_DEF mosUsage = MOS_CM_RESOURCE_USAGE_SurfaceState);
309 
310     CM_RT_API int32_t
311     CreateSampler8x8SurfaceFromAlias(
312         CmSurface2D *originalSurface,
313         SurfaceIndex *aliasIndex,
314         CM_SURFACE_ADDRESS_CONTROL_MODE addressControl,
315         SurfaceIndex* &sampler8x8SurfaceIndex);
316 
317     CM_RT_API int32_t CreateBufferStateless(size_t size,
318                                             uint32_t option,
319                                             void *sysMem,
320                                             CmBufferStateless *&bufferStateless);
321 
322     CM_RT_API int32_t DestroyBufferStateless(CmBufferStateless* & bufferStateless);
323 
GetAccelData()324     void* GetAccelData(){ return m_accelData; }
325 
GetUMDCtx()326     MOS_CONTEXT* GetUMDCtx(){ return m_mosContext; }
327 
GetAccelsize()328     uint32_t GetAccelsize(){ return m_accelSize; }
329 
330     int32_t GetHalMaxValues(CM_HAL_MAX_VALUES* & pHalMaxValues,
331                             CM_HAL_MAX_VALUES_EX* & pHalMaxValuesEx);
332 
333     int32_t GetGenPlatform(uint32_t &platform);
334 
335     void Sampler8x8CoefficientFormatTransform(
336          CM_AVS_INTERNEL_NONPIPLINED_STATE* dst_avs_state,
337          CM_AVS_NONPIPLINED_STATE* src_avs_state);
338 
339     int32_t GetSurfaceManager(CmSurfaceManager* &pSurfaceMgr);
340 
341     std::vector<CmQueueRT *> &GetQueue();
342 
343     CSync* GetSurfaceLock();
344 
345     CSync* GetSurfaceCreationLock();
346 
347     CSync* GetProgramKernelLock();
348 
349     CSync* GetQueueLock();
350 
351     int32_t LoadPredefinedCopyKernel(CmProgram*& pProgram);
352 
353     int32_t LoadPredefinedInitKernel(CmProgram*& pProgram);
354 
GetKernelSlot()355     int32_t GetKernelSlot()
356     {
357         return m_kernelArray.GetFirstFreeIndex();
358     }
359 
360     int32_t PrepareGPUinitSurface();
361 
362     int32_t GPUinitSurface(CmSurface2D* surf2D, const uint32_t initValue, CmEvent*& event);
363     bool CheckGTPinEnabled();
364 
365 #if USE_EXTENSION_CODE
366     int32_t EnableGTPin(CmBufferUP* pBufferUP0,
367                         CmBufferUP* pBufferUP1,
368                         CmBufferUP* pBufferUP2,
369                         char * pGTPinCom,
370                         GTPIN_INVOKE_STRUCT* pInvokeStruct,
371                         bool reserveRegisters);
372     CmGTPin *GetGTPin();
373 #endif
374 
375     int32_t GetGenStepInfo(char*& stepinfostr);
376 
377     int32_t GetCapsInternal(void *pCaps, uint32_t *puSize);
378 
379     int32_t Acquire();
380 
381     int32_t Release();
382 
383     int32_t GetPrintBufferIndex(SurfaceIndex *& pIndex) const;
384 
385     bool IsPrintEnable() const;
386 
387     bool IsVtuneLogOn() const;
388 
389     int32_t GetPrintBufferMem(unsigned char *& pPrintBufferMem) const;
390 
391     int32_t GetSurf2DLookUpEntry(uint32_t index,
392                                  PCMLOOKUP_ENTRY &pLookupEntry);
393 
394     int32_t DestroySurfaceInPool(uint32_t &freeSurfNum);
395 
396     virtual int32_t CreateSurface2D(PMOS_RESOURCE pMosResource,
397                             bool bIsCmCreated,
398                             CmSurface2D* & pSurface) = 0;
399 
400     int32_t GetSampler8x8(uint32_t index, CmSampler8x8State_RT *&pSampler8x8);
401 
402     bool IsScratchSpaceDisabled();
403 
404     int32_t SetSurfaceArraySizeForAlias();
405 
GetDriverStoreFlag()406     uint32_t GetDriverStoreFlag() { return m_isDriverStoreEnabled; }
407 
SetDriverStoreFlag(uint32_t dsEnabled)408     void SetDriverStoreFlag(uint32_t dsEnabled)
409     {
410         m_isDriverStoreEnabled = dsEnabled;
411     }
412 
413     CmDynamicArray* GetKernelArray();
414 
415     uint32_t *GetKernelCount();
416 
417 #if CM_LOG_ON
418     std::string Log();
419 #endif
420     CM_HAL_STATE* GetHalState();
421 
422     int32_t DestroyVmeSurface(SurfaceIndex *& pVmeIndex);
423 
424     int32_t CreatePrintBuffer();
425 
GetNotifiers()426     CmNotifierGroup* GetNotifiers() {return m_notifierGroup;}
427 
GetCmHalCreateOption()428     CM_HAL_CREATE_PARAM &GetCmHalCreateOption() {return m_cmHalCreateOption;}
429 
HasGpuCopyKernel()430     inline bool HasGpuCopyKernel() {return m_hasGpuCopyKernel; }
431 
HasGpuInitKernel()432     inline bool HasGpuInitKernel() {return m_hasGpuInitKernel; }
433 
434     // Num of kernels included in CmProgram Loaded by this device
KernelsLoaded()435     inline uint32_t& KernelsLoaded() {return m_kernelsLoaded; }
436 
437     virtual int32_t GetJITCompileFnt(pJITCompile &fJITCompile) = 0;
438 
439     virtual int32_t GetJITCompileFntV2(pJITCompile_v2 &fJITCompile_v2) = 0;
440 
441     virtual int32_t GetFreeBlockFnt(pFreeBlock &fFreeBlock) = 0;
442 
443     virtual int32_t GetJITVersionFnt(pJITVersion &fJITVersion) = 0;
444 
445     virtual int32_t LoadJITDll() = 0;
446 
447     virtual HANDLE QueryRegHandleInternal(PCM_HAL_STATE pCmHalState) = 0;
448 
449     CM_OBJECT_COUNT m_memObjectCount;
450 
451     int32_t CheckObjectCount();
452 
453 protected:
454     int32_t Initialize(MOS_CONTEXT *pUmdContext);
455 
456     int32_t DestroyQueue(CmQueueRT* & pQueue);
457 
458     int32_t RegisterSamplerState(const CM_SAMPLER_STATE& sampleState,
459                                  uint32_t& index);
460 
461     int32_t RegisterSamplerStateEx(const CM_SAMPLER_STATE_EX& sampleState,
462                                    uint32_t& index);
463 
464     int32_t UnregisterSamplerState(uint32_t index);
465 
466     int32_t RegisterSampler8x8State(const CM_SAMPLER_8X8_DESCR & sampler8x8State,
467                                     uint32_t& index);
468 
469     int32_t UnregisterSampler8x8State(uint32_t index);
470 
471     int32_t GetMaxValueFromCaps(CM_HAL_MAX_VALUES &MaxValues,
472         CM_HAL_MAX_VALUES_EX &MaxValuesEx);
473 
474     int32_t InitDevCreateOption(CM_HAL_CREATE_PARAM & DevCreateParam,
475                                 uint32_t DevCreateOption);
476 
477     CmDeviceRTBase(uint32_t DevCreateOption);
478 
~CmDeviceRTBase()479     ~CmDeviceRTBase() {};
480 
481     void DestructCommon();
482 
IsMediaResetNeeded(uint32_t options)483     inline bool IsMediaResetNeeded(uint32_t options)
484     {
485         return (options & CM_DEVICE_CONFIG_MEDIA_RESET_ENABLE) ? true : false;
486     }
487 
488     virtual int32_t ReadVtuneProfilingFlag() = 0;
489 
490     virtual void ConstructOSSpecific(uint32_t devCreateOption) = 0;
491 
492     virtual int32_t QuerySurface2DFormats(void *pCapValue,
493         uint32_t & capValueSize) = 0;
494 
495     virtual int32_t InitializeOSSpecific(MOS_CONTEXT *pUmdContext) = 0;
496 
497     virtual CM_RETURN_CODE QueryGPUInfoInternal(PCM_QUERY_CAPS pQueryCaps) = 0;
498 
499     virtual CM_RETURN_CODE QuerySurface2DFormatsInternal(PCM_QUERY_CAPS pQueryCaps) = 0;
500 
501     int32_t FlushPrintBufferInternal(const char *filename);
502 
503     MOS_CONTEXT    *m_mosContext;
504 
505     void* m_accelData;          // Pointer to the private data used by the acceleration service
506 
507     uint32_t m_accelSize;           // Size of the private data
508 
509     CM_HAL_MAX_VALUES m_halMaxValues;
510 
511     CM_HAL_MAX_VALUES_EX m_halMaxValuesEx;
512 
513     CmSurfaceManager* m_surfaceMgr;
514 
515     std::vector<CmQueueRT *> m_queue;
516 
517     CmDynamicArray m_programArray;
518 
519     uint32_t m_programCount;
520 
521     CmDynamicArray m_kernelArray;
522 
523     uint32_t m_kernelCount;
524 
525     CmDynamicArray m_sampler8x8Array;
526 
527     CmDynamicArray m_samplerArray;
528 
529     CmDynamicArray m_threadSpaceArray;
530 
531     uint32_t m_threadSpaceCount;
532 
533     CmDynamicArray m_veboxArray;
534 
535     uint32_t m_veboxCount;
536 
537     HMODULE m_hJITDll;
538 
539     pJITCompile m_fJITCompile;
540 
541     pJITCompile_v2 m_fJITCompile_v2;
542 
543     pFreeBlock m_fFreeBlock;
544 
545     pJITVersion m_fJITVersion;
546 
547     uint32_t m_ddiVersion;
548 
549     uint32_t m_platform;
550 
551     uint32_t m_cmDeviceRefCount;
552 
553     CmProgram* m_gpuCopyKernelProgram;
554 
555     CmProgram* m_surfInitKernelProgram;
556 
557     CmQueue* m_InitCmQueue;
558 
559     CmKernel* m_kernel0;
560 
561     CmKernel* m_kernel1;
562 
563     CmTask* m_gpuInitTask0;
564 
565     CmTask* m_gpuInitTask1;
566 
567 #if USE_EXTENSION_CODE
568     CmGTPin *m_gtpin;
569 #endif
570 
571     // synchronization objects
572     CSync m_criticalSectionProgramKernel;
573 
574     CSync m_criticalSectionSurface;
575 
576     CSync m_criticalSectionReadWriteSurface2D;
577 
578     CSync m_criticalSectionSampler;
579 
580     CSync m_criticalSectionSampler8x8;
581 
582     CSync m_criticalSectionVmeState;
583 
584     CSync m_criticalSectionThreadSpace;
585 
586     CSync m_criticalSectionDeviceRefCount;
587 
588     CSync m_criticalSectionThreadGroupSpace;
589 
590     CSync m_criticalSectionTask;
591 
592     CSync m_criticalSectionVebox;
593 
594     CSync m_criticalSectionQueue;
595 
596     std::list<uint8_t *> m_printBufferMems;
597 
598     std::list<CmBufferUP *> m_printBufferUPs;
599 
600     bool           m_isPrintEnabled;
601 
602     size_t         m_printBufferSize;
603 
604     CmDynamicArray m_threadGroupSpaceArray;
605 
606     uint32_t       m_threadGroupSpaceCount;
607 
608     CmDynamicArray m_taskArray;
609 
610     uint32_t       m_taskCount;
611 
612     CM_HAL_CREATE_PARAM   m_cmHalCreateOption;
613 
614     uint32_t       m_nGPUFreqOriginal;
615 
616     uint32_t       m_nGPUFreqMin;
617 
618     uint32_t       m_nGPUFreqMax;
619 
620     bool           m_vtuneOn;
621 
622     uint32_t       m_isDriverStoreEnabled;
623 
624     CmNotifierGroup *m_notifierGroup;
625 
626     bool           m_hasGpuCopyKernel;
627 
628     bool           m_hasGpuInitKernel;
629 
630     uint32_t       m_kernelsLoaded;
631 
632     bool           m_preloadKernelEnabled;
633 
634     static const uint32_t m_maxPrintBuffer;
635 private:
636     CmDeviceRTBase(const CmDeviceRTBase& other);
637 
638     CmDeviceRTBase& operator= (const CmDeviceRTBase& other);
639 };
640 }; //namespace
641 
642 #endif  // #ifndef MEDIADRIVER_COMMON_CM_CMDEVICERT_BASE_H_
643