1 /*
2 * Copyright (c) 2009-2018, 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 //! \file renderhal_linux.cpp
24 //! \brief Linux-specific functions in Render Engine state heap manager for VP and CM
25 //! \details Linux-specific Render Engine state heap management interfaces
26 //!
27 #include "mos_os.h"
28 #include "renderhal_legacy.h"
29
RenderHal_SetupPrologParams(PRENDERHAL_INTERFACE renderHal,RENDERHAL_GENERIC_PROLOG_PARAMS * prologParams,PMOS_RESOURCE osResource,uint32_t offset,uint32_t tag)30 void RenderHal_SetupPrologParams(
31 PRENDERHAL_INTERFACE renderHal,
32 RENDERHAL_GENERIC_PROLOG_PARAMS *prologParams,
33 PMOS_RESOURCE osResource,
34 uint32_t offset,
35 uint32_t tag)
36 {
37 return;
38 }
39
40 //!
41 //! \brief Get Surface Info from OsResource
42 //! \details Update surface info in PRENDERHAL_SURFACE based on allocated OsResource
43 //! \param PMOS_INTERFACE pOsInterface
44 //! [in] Pointer to MOS_INTERFACE
45 //! \param PRENDERHAL_GET_SURFACE_INFO pInfo
46 //! [in] Pointer to RENDERHAL_GET_SURFACE_INFO
47 //! \param PMOS_SURFACE pSurface
48 //! [in/out] Pointer to PMOS_SURFACE
49 //! \return MOS_STATUS
50 //! Return MOS_STATUS_SUCCESS if successful, otherwise failed
51 //!
RenderHal_GetSurfaceInfo(PMOS_INTERFACE pOsInterface,PRENDERHAL_GET_SURFACE_INFO pInfo,PMOS_SURFACE pSurface)52 MOS_STATUS RenderHal_GetSurfaceInfo(
53 PMOS_INTERFACE pOsInterface,
54 PRENDERHAL_GET_SURFACE_INFO pInfo,
55 PMOS_SURFACE pSurface)
56 {
57
58 MOS_STATUS eStatus = MOS_STATUS_UNKNOWN;
59
60 MHW_RENDERHAL_ASSERT(pOsInterface);
61 MHW_RENDERHAL_ASSERT(pSurface);
62
63 PMOS_RESOURCE pResource = &pSurface->OsResource;
64 MOS_SURFACE ResDetails;
65
66 MHW_RENDERHAL_ASSERT(!Mos_ResourceIsNull(&pSurface->OsResource));
67 MOS_ZeroMemory(&ResDetails, sizeof(MOS_SURFACE));
68 ResDetails.dwArraySlice = pInfo->ArraySlice;
69 ResDetails.dwMipSlice = pInfo->MipSlice;
70 ResDetails.S3dChannel = pInfo->S3dChannel;
71 ResDetails.Format = pSurface->Format;
72 MHW_RENDERHAL_CHK_STATUS(pOsInterface->pfnGetResourceInfo(pOsInterface, &pSurface->OsResource, &ResDetails));
73
74 if (ResDetails.Format == Format_420O)
75 {
76 ResDetails.Format = Format_NV12;
77 }
78
79 // Get resource information
80 pSurface->dwWidth = ResDetails.dwWidth;
81 pSurface->dwHeight = ResDetails.dwHeight;
82 pSurface->dwPitch = ResDetails.dwPitch;
83 pSurface->dwSlicePitch = ResDetails.dwSlicePitch;
84 pSurface->dwQPitch = ResDetails.dwQPitch;
85 pSurface->dwDepth = ResDetails.dwDepth;
86 pSurface->TileType = ResDetails.TileType;
87 pSurface->TileModeGMM = ResDetails.TileModeGMM;
88 pSurface->bGMMTileEnabled = ResDetails.bGMMTileEnabled;
89 pSurface->bOverlay = ResDetails.bOverlay;
90 pSurface->bFlipChain = ResDetails.bFlipChain;
91 pSurface->Format = ResDetails.Format;
92 pSurface->bCompressible = ResDetails.bCompressible;
93 pSurface->bIsCompressed = ResDetails.bIsCompressed;
94 pSurface->CompressionMode = ResDetails.CompressionMode;
95
96 MHW_RENDERHAL_CHK_STATUS(pOsInterface->pfnGetMemoryCompressionMode(pOsInterface,
97 &pSurface->OsResource, &pSurface->MmcState));
98
99 MHW_RENDERHAL_CHK_STATUS(pOsInterface->pfnGetMemoryCompressionFormat(pOsInterface,
100 &pSurface->OsResource, &pSurface->CompressionFormat));
101
102 if (IS_RGB32_FORMAT(pSurface->Format) ||
103 IS_RGB16_FORMAT(pSurface->Format) ||
104 IS_RGB128_FORMAT(pSurface->Format)||
105 pSurface->Format == Format_RGB ||
106 pSurface->Format == Format_Y410)
107 {
108 pSurface->dwOffset = ResDetails.RenderOffset.RGB.BaseOffset;
109 pSurface->YPlaneOffset.iSurfaceOffset = ResDetails.RenderOffset.RGB.BaseOffset;
110 pSurface->YPlaneOffset.iXOffset = ResDetails.RenderOffset.RGB.XOffset;
111 pSurface->YPlaneOffset.iYOffset = ResDetails.RenderOffset.RGB.YOffset;
112 }
113 else // YUV or PL3_RGB
114 {
115 // Get Y plane information (plane offset, X/Y offset)
116 pSurface->dwOffset = ResDetails.RenderOffset.YUV.Y.BaseOffset;
117 pSurface->YPlaneOffset.iSurfaceOffset = ResDetails.RenderOffset.YUV.Y.BaseOffset;
118 pSurface->YPlaneOffset.iXOffset = ResDetails.RenderOffset.YUV.Y.XOffset;
119 pSurface->YPlaneOffset.iYOffset = ResDetails.RenderOffset.YUV.Y.YOffset;
120 pSurface->YPlaneOffset.iLockSurfaceOffset = ResDetails.LockOffset.YUV.Y;
121
122 // Get U/UV plane information (plane offset, X/Y offset)
123 pSurface->UPlaneOffset.iSurfaceOffset = ResDetails.RenderOffset.YUV.U.BaseOffset;
124 pSurface->UPlaneOffset.iXOffset = ResDetails.RenderOffset.YUV.U.XOffset;
125 pSurface->UPlaneOffset.iYOffset = ResDetails.RenderOffset.YUV.U.YOffset;
126 pSurface->UPlaneOffset.iLockSurfaceOffset = ResDetails.LockOffset.YUV.U;
127
128 // Get V plane information (plane offset, X/Y offset)
129 pSurface->VPlaneOffset.iSurfaceOffset = ResDetails.RenderOffset.YUV.V.BaseOffset;
130 pSurface->VPlaneOffset.iXOffset = ResDetails.RenderOffset.YUV.V.XOffset;
131 pSurface->VPlaneOffset.iYOffset = ResDetails.RenderOffset.YUV.V.YOffset;
132 pSurface->VPlaneOffset.iLockSurfaceOffset = ResDetails.LockOffset.YUV.V;
133 }
134
135 eStatus = MOS_STATUS_SUCCESS;
136 goto finish;
137
138 finish:
139 return eStatus;
140 }
141
142 //!
143 //! \brief Send Surfaces PatchList
144 //! \details Send Surface State commands
145 //! \param PRENDERHAL_INTERFACE pRenderHal
146 //! [in] Pointer to Hardware Interface Structure
147 //! \param PMOS_COMMAND_BUFFER pCmdBuffer
148 //! [in] Pointer to Command Buffer
149 //! \return MOS_STATUS
150 //!
RenderHal_SendSurfaces_PatchList(PRENDERHAL_INTERFACE pRenderHal,PMOS_COMMAND_BUFFER pCmdBuffer)151 MOS_STATUS RenderHal_SendSurfaces_PatchList(
152 PRENDERHAL_INTERFACE pRenderHal,
153 PMOS_COMMAND_BUFFER pCmdBuffer)
154 {
155 PMOS_INTERFACE pOsInterface;
156 PRENDERHAL_STATE_HEAP pStateHeap;
157 uint8_t *pIndirectState;
158 uint32_t IndirectStateBase;
159 uint32_t IndirectStateSize;
160 int32_t iBindingTableOffs;
161 MHW_BINDING_TABLE_SEND_PARAMS SendBtParams;
162 MHW_SURFACE_STATE_SEND_PARAMS SendSurfaceParams;
163 int32_t iSurfacesPerBT;
164 int32_t i;
165 int32_t j;
166 MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
167
168 //----------------------------------------------
169 MHW_RENDERHAL_CHK_NULL(pRenderHal);
170 MHW_RENDERHAL_CHK_NULL(pRenderHal->pStateHeap);
171 MHW_RENDERHAL_CHK_NULL(pRenderHal->pMhwStateHeap);
172 MHW_RENDERHAL_CHK_NULL(pRenderHal->pOsInterface);
173 //----------------------------------------------
174
175 pStateHeap = pRenderHal->pStateHeap;
176 pOsInterface = pRenderHal->pOsInterface;
177 iSurfacesPerBT = pRenderHal->StateHeapSettings.iSurfacesPerBT;
178
179 if (pRenderHal->isBindlessHeapInUse)
180 {
181 bool bNeedNullPatch = MEDIA_IS_SKU(pOsInterface->pfnGetSkuTable(pOsInterface), FtrMediaPatchless);
182 MHW_RENDERHAL_CHK_STATUS_RETURN(pRenderHal->pfnSendBindlessSurfaceStates(pRenderHal, bNeedNullPatch));
183 return MOS_STATUS_SUCCESS;
184 }
185
186 // Get offset and size of indirect state in command buffer
187 MHW_RENDERHAL_CHK_STATUS(pOsInterface->pfnGetIndirectState(pOsInterface, &IndirectStateBase, &IndirectStateSize));
188 pIndirectState = (uint8_t*)pCmdBuffer->pCmdBase + IndirectStateBase;
189
190 // Null Patch is only enabled for Media Patchless
191 SendSurfaceParams.bNeedNullPatch = MEDIA_IS_SKU(pOsInterface->pfnGetSkuTable(pOsInterface), FtrMediaPatchless);
192 SendSurfaceParams.pIndirectStateBase = pIndirectState;
193 SendSurfaceParams.iIndirectStateBase = IndirectStateBase;
194
195 // Send binding tables and surface states for all phases
196 SendBtParams.iSurfaceStateBase = pStateHeap->iSurfaceStateOffset;
197 iBindingTableOffs = pStateHeap->iBindingTableOffset;
198 for (i = pStateHeap->iCurrentBindingTable; i > 0; i--,
199 iBindingTableOffs += pStateHeap->iBindingTableSize)
200 {
201 // Binding tables entries (input/output)
202 SendBtParams.pBindingTableSource = pStateHeap->pSshBuffer + iBindingTableOffs;
203 SendBtParams.pBindingTableTarget = pIndirectState + iBindingTableOffs;
204 for (j = iSurfacesPerBT; j > 0; j--)
205 {
206 // Send BT to indirect heap, retrieve surface state associated with BT entry
207 pRenderHal->pMhwStateHeap->SendBindingTableEntry(&SendBtParams);
208
209 // Function returns Params.iSurfaceState for BT entry (-1 if "Copy=0") and iSurfaceStateOffset
210 if (SendBtParams.iSurfaceState < 0) continue;
211
212 SendSurfaceParams.pSurfaceToken = (uint8_t*) &pStateHeap->pSurfaceEntry[SendBtParams.iSurfaceState].SurfaceToken;
213 SendSurfaceParams.pSurfaceStateSource = (uint8_t*) pStateHeap->pSurfaceEntry[SendBtParams.iSurfaceState].pSurfaceState;
214 SendSurfaceParams.iSurfaceStateOffset = SendBtParams.iSurfaceStateOffset;
215
216 // It should consider MHW instead of VPHAL type, but currently the function only supports VPHAL type.
217
218 pRenderHal->pfnSendSurfaceStateEntry(pRenderHal, pCmdBuffer, &SendSurfaceParams);
219 }
220 }
221
222 finish:
223 MHW_RENDERHAL_ASSERT(eStatus == MOS_STATUS_SUCCESS);
224 return eStatus;
225 }
226
227 //!
228 //! \brief Set surface state token
229 //! \details Set surface state token
230 //! \param [in] pRenderHal
231 //! pointer to render hal
232 //! \param [in] Surface token parameters
233 //! Surface token parameters
234 //! \param void *pSurfaceStateToken
235 //! [in/out] pointer to surface state token
236 //! \return MOS_STATUS
237 //! MOS_STATUS_SUCCESS if success, else fail reason
238 //!
RenderHal_SetSurfaceStateToken(PRENDERHAL_INTERFACE pRenderHal,PMHW_SURFACE_TOKEN_PARAMS pParams,void * pSurfaceStateToken)239 MOS_STATUS RenderHal_SetSurfaceStateToken(
240 PRENDERHAL_INTERFACE pRenderHal,
241 PMHW_SURFACE_TOKEN_PARAMS pParams,
242 void *pSurfaceStateToken)
243 {
244 MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
245
246 MHW_MI_CHK_NULL(pSurfaceStateToken);
247 MHW_MI_CHK_NULL(pParams);
248 MHW_MI_CHK_NULL(pParams->pOsSurface);
249
250 SURFACE_STATE_TOKEN_COMMON *pTokenState = (SURFACE_STATE_TOKEN_COMMON*)pSurfaceStateToken;
251 PMOS_INTERFACE pOsInterface = pRenderHal->pOsInterface;
252 MHW_MI_CHK_NULL(pOsInterface);
253 PMOS_RESOURCE pOsResource = &(pParams->pOsSurface->OsResource);
254
255 int32_t iAllocationIndex = pOsInterface->pfnGetResourceAllocationIndex(pOsInterface, pOsResource);
256
257 // Initialize Token State
258 *pTokenState = g_cInit_SURFACE_STATE_TOKEN_COMMON;
259
260 pTokenState->DW1.SurfaceAllocationIndex = iAllocationIndex;
261 MHW_ASSERT(pTokenState->DW1.SurfaceAllocationIndex != MOS_INVALID_ALLOC_INDEX);
262 pTokenState->DW3.RenderTargetEnable = pParams->bRenderTarget;
263 pTokenState->DW3.YUVPlane = pParams->YUVPlane;
264
265 MOS_HW_COMMAND HwCommandType;
266 if (pParams->bSurfaceTypeAvs)
267 {
268 pTokenState->DW3.SurfaceStateType = MEDIASTATE_BTS_DI_SAMPLE8x8_VME_TYPE;
269 HwCommandType = MOS_SURFACE_STATE_ADV;
270 }
271 else
272 {
273 pTokenState->DW3.SurfaceStateType = MEDIASTATE_BTS_DEFAULT_TYPE;
274 HwCommandType = MOS_SURFACE_STATE;
275 }
276
277 pTokenState->DW0.DriverID = HwCommandType;
278
279 pTokenState->DW2.SurfaceOffset = pParams->dwSurfaceOffset;
280
281 if (pOsInterface->bUsesGfxAddress)
282 {
283 uint64_t ui64GfxAddress = 0;
284 if ( pOsResource->user_provided_va != 0 )
285 {
286 ui64GfxAddress = pOsResource->user_provided_va;
287 }
288 else
289 {
290 ui64GfxAddress = pOsInterface->pfnGetResourceGfxAddress( pOsInterface, pOsResource ) + pTokenState->DW2.SurfaceOffset;
291 }
292 pTokenState->DW4.SurfaceBaseAddress = ( uint32_t )( ui64GfxAddress & 0x00000000FFFFFFFF );
293 pTokenState->DW5.SurfaceBaseAddress64 = ( uint32_t )( ( ui64GfxAddress & 0x0000FFFF00000000 ) >> 32 );
294 }
295
296 pTokenState->pResourceInfo = (void *)pOsResource;
297
298 return eStatus;
299 }
300
301 //!
302 //! \brief Get Y Offset according to the planeOffset struct and surface pitch
303 //! \details Get Y Offset according to the planeOffset struct and surface pitch
304 //! \param pOsInterface
305 //! [in] pointer to OS Interface
306 //! \param pSurface
307 //! [in] Pointers to Surface
308 //! \return uint16_t
309 //! [out] the Y offset
310 //!
RenderHal_CalculateYOffset(PMOS_INTERFACE pOsInterface,PMOS_RESOURCE pOsResource)311 uint16_t RenderHal_CalculateYOffset(PMOS_INTERFACE pOsInterface, PMOS_RESOURCE pOsResource)
312 {
313 // This is for MMCD/Non-MMCD, GMM will allocate the surface 32 height align surface, the the UV offset will not equal to the surface height.
314 MOS_SURFACE ResDetails;
315 uint16_t UYoffset = 0;
316
317 MHW_RENDERHAL_ASSERT(!Mos_ResourceIsNull(pOsResource));
318 MHW_RENDERHAL_ASSERT(pOsInterface);
319 MOS_ZeroMemory(&ResDetails, sizeof(MOS_SURFACE));
320
321 pOsInterface->pfnGetResourceInfo(pOsInterface, pOsResource, &ResDetails);
322
323 if (ResDetails.dwPitch)
324 {
325 UYoffset = (uint16_t)((ResDetails.RenderOffset.YUV.U.BaseOffset - ResDetails.RenderOffset.YUV.Y.BaseOffset) / ResDetails.dwPitch + ResDetails.RenderOffset.YUV.U.YOffset);
326 return MOS_MAX(UYoffset, (uint16_t)ResDetails.dwHeight);
327 }
328 else
329 {
330 return (uint16_t)ResDetails.dwHeight;
331 }
332 }
333
334 //!
335 //! \brief Allocate Debug Surface
336 //! \details Allocate surface for ISA ASM debugging
337 //! \param PRENDERHAL_INTERFACE pRenderHal
338 //! [in] Pointer to Hardware Interface Structure
339 //! \return MOS_STATUS
340 //! MOS_STATUS_SUCCESS if success
341 //! Error code otherwise
342 //!
RenderHal_AllocateDebugSurface(PRENDERHAL_INTERFACE pRenderHal)343 MOS_STATUS RenderHal_AllocateDebugSurface(
344 PRENDERHAL_INTERFACE pRenderHal)
345 {
346 MHW_RENDERHAL_UNUSED(pRenderHal);
347 return MOS_STATUS_SUCCESS;
348 }
349
350 //!
351 //! \brief Setup Debug Surface State
352 //! \details Setup surface state for ISA ASM Debug surface
353 //! \param PRENDERHAL_INTERFACE pRenderHal
354 //! [in] Pointer to Hardware Interface Structure
355 //! \return MOS_STATUS
356 //! MOS_STATUS_SUCCESS if success
357 //! Error code otherwise
358 //!
RenderHal_SetupDebugSurfaceState(PRENDERHAL_INTERFACE pRenderHal)359 MOS_STATUS RenderHal_SetupDebugSurfaceState(
360 PRENDERHAL_INTERFACE pRenderHal)
361 {
362 MHW_RENDERHAL_UNUSED(pRenderHal);
363 return MOS_STATUS_SUCCESS;
364 }
365
366 //!
367 //! \brief Free Debug Surface
368 //! \param PRENDERHAL_INTERFACE pRenderHal
369 //! [in] Pointer to Hardware Interface Structure
370 //! \return void
371 //!
RenderHal_FreeDebugSurface(PRENDERHAL_INTERFACE pRenderHal)372 void RenderHal_FreeDebugSurface(
373 PRENDERHAL_INTERFACE pRenderHal)
374 {
375 MHW_RENDERHAL_UNUSED(pRenderHal);
376 return;
377 }
378
379 //!
380 //! \brief Load Debug Kernel
381 //! \param PRENDERHAL_INTERFACE pRenderHal
382 //! [in] Pointer to Hardware Interface Structure
383 //! \param PMHW_KERNEL_PARAM pSipKernel
384 //! [in] Pointer to Debug (Sip) Kernel Parameters
385 //! \return int32_t
386 //! 0
387 //!
RenderHal_LoadDebugKernel(PRENDERHAL_INTERFACE pRenderHal,PMHW_KERNEL_PARAM pSipKernel)388 int32_t RenderHal_LoadDebugKernel(
389 PRENDERHAL_INTERFACE pRenderHal,
390 PMHW_KERNEL_PARAM pSipKernel)
391 {
392 MHW_RENDERHAL_UNUSED(pRenderHal);
393 MHW_RENDERHAL_UNUSED(pSipKernel);
394 return 0;
395 }
396
397 //!
398 //! \brief Load Debug Kernel
399 //! \param PRENDERHAL_INTERFACE pRenderHal
400 //! [in] Pointer to Hardware Interface Structure
401 //! \param void *pSipKernel
402 //! [in] Pointer to Debug (Sip) Kernel binary
403 //! \param uint32_t dwSipSize
404 //! [in] Debug (Sip) Kernel size
405 //! \return MOS_STATUS
406 //!
RenderHal_LoadSipKernel(PRENDERHAL_INTERFACE pRenderHal,void * pSipKernel,uint32_t dwSipSize)407 MOS_STATUS RenderHal_LoadSipKernel(
408 PRENDERHAL_INTERFACE pRenderHal,
409 void *pSipKernel,
410 uint32_t dwSipSize)
411 {
412 MHW_RENDERHAL_UNUSED(pRenderHal);
413 MHW_RENDERHAL_UNUSED(pSipKernel);
414 MHW_RENDERHAL_UNUSED(dwSipSize);
415 return MOS_STATUS_SUCCESS;
416 }
417
418 //!
419 //! \brief Send SIP state command
420 //! \param PRENDERHAL_INTERFACE pRenderHal
421 //! [in] Pointer to Hardware Interface Structure
422 //! \param PMOS_COMMAND_BUFFER pCmdBuffer
423 //! [in] Pointer to Command Buffer
424 //! \return MOS_STATUS
425 //!
RenderHal_SendSipStateCmd(PRENDERHAL_INTERFACE pRenderHal,PMOS_COMMAND_BUFFER pCmdBuffer)426 MOS_STATUS RenderHal_SendSipStateCmd(
427 PRENDERHAL_INTERFACE pRenderHal,
428 PMOS_COMMAND_BUFFER pCmdBuffer)
429 {
430 MHW_RENDERHAL_UNUSED(pRenderHal);
431 MHW_RENDERHAL_UNUSED(pCmdBuffer);
432 return MOS_STATUS_SUCCESS;
433 }
434
435 //!
436 //! \brief Add debug control commands
437 //! \param PRENDERHAL_INTERFACE pRenderHal
438 //! [in] Pointer to Hardware Interface Structure
439 //! \param PMOS_COMMAND_BUFFER pCmdBuffer
440 //! [in] Pointer to Command Buffer
441 //! \return MOS_STATUS
442 //!
RenderHal_AddDebugControl(PRENDERHAL_INTERFACE pRenderHal,PMOS_COMMAND_BUFFER pCmdBuffer)443 MOS_STATUS RenderHal_AddDebugControl(
444 PRENDERHAL_INTERFACE pRenderHal,
445 PMOS_COMMAND_BUFFER pCmdBuffer)
446 {
447 MHW_RENDERHAL_UNUSED(pRenderHal);
448 MHW_RENDERHAL_UNUSED(pCmdBuffer);
449 return MOS_STATUS_SUCCESS;
450 }
451
452 //!
453 //! \brief Init Special Interface
454 //! \details Initializes RenderHal Interface structure, responsible for HW
455 //! abstraction of HW Rendering Engine for CM(MDF) and VP.
456 //! \param PRENDERHAL_INTERFACE pRenderHal
457 //! [in] Pointer to RenderHal Interface Structure
458 //!
RenderHal_InitInterfaceEx_Legacy(PRENDERHAL_INTERFACE_LEGACY pRenderHal)459 void RenderHal_InitInterfaceEx_Legacy(PRENDERHAL_INTERFACE_LEGACY pRenderHal)
460 {
461 RenderHal_InitInterfaceEx(pRenderHal);
462 return;
463 }
464
465 //!
466 //! \brief Init Special Interface
467 //! \details Initializes RenderHal Interface structure, responsible for HW
468 //! abstraction of HW Rendering Engine for CM(MDF) and VP.
469 //! \param PRENDERHAL_INTERFACE pRenderHal
470 //! [in] Pointer to RenderHal Interface Structure
471 //!
RenderHal_InitInterfaceEx(PRENDERHAL_INTERFACE pRenderHal)472 void RenderHal_InitInterfaceEx(PRENDERHAL_INTERFACE pRenderHal)
473 {
474 // No special APIs
475 MHW_RENDERHAL_UNUSED(pRenderHal);
476 return;
477 }
478
479 //!
480 //! \brief Issue command to write timestamp
481 //! \param [in] pRenderHal
482 //! \param [in] pCmdBuffer
483 //! \param [in] bStartTime
484 //! \return MOS_STATUS
485 //!
RenderHal_SendTimingData(PRENDERHAL_INTERFACE pRenderHal,PMOS_COMMAND_BUFFER pCmdBuffer,bool bStartTime)486 MOS_STATUS RenderHal_SendTimingData(
487 PRENDERHAL_INTERFACE pRenderHal,
488 PMOS_COMMAND_BUFFER pCmdBuffer,
489 bool bStartTime)
490 {
491 return MOS_STATUS_SUCCESS;
492 }
493