Skip to content

Commit 1598c1b

Browse files
johnbashgfxbot
authored andcommitted
Gmmlib uAPI Implemenetation to accept full comprehensive memory layout description
for the import path for both dmabuf and userptr. Change-Id: Ie8dbcc740f942511ed8e9441fd453acc84924f78
1 parent b085096 commit 1598c1b

File tree

9 files changed

+510
-5
lines changed

9 files changed

+510
-5
lines changed

Source/GmmLib/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ project(igfx_gmmumd)
2525

2626
# GmmLib Api Version used for so naming
2727
set(GMMLIB_API_MAJOR_VERSION 11)
28-
set(GMMLIB_API_MINOR_VERSION 1)
28+
set(GMMLIB_API_MINOR_VERSION 2)
2929

3030
if(NOT DEFINED MAJOR_VERSION)
3131
set(MAJOR_VERSION 11)
3232
endif()
3333

3434
if(NOT DEFINED MINOR_VERSION)
35-
set(MINOR_VERSION 1)
35+
set(MINOR_VERSION 2)
3636
endif()
3737

3838
if(NOT DEFINED PATCH_VERSION)

Source/GmmLib/GlobalInfo/GmmClientContext.cpp

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,41 @@ uint64_t GMM_STDCALL GmmLib::GmmClientContext::GetInternalGpuVaRangeLimit()
336336
return pGmmGlobalContext->GetInternalGpuVaRangeLimit();
337337
}
338338

339+
/////////////////////////////////////////////////////////////////////////////////////
340+
/// Member function of ClientContext class for creation of Custiom ResourceInfo Object .
341+
/// @see GmmLib::GmmResourceInfoCommon::Create()
342+
///
343+
/// @param[in] pCreateParams: Flags which specify what sort of resource to create
344+
/// @return Pointer to GmmResourceInfo class.
345+
/////////////////////////////////////////////////////////////////////////////////////
346+
GMM_RESOURCE_INFO *GMM_STDCALL GmmLib::GmmClientContext::CreateCustomResInfoObject(GMM_RESCREATE_CUSTOM_PARAMS *pCreateParams)
347+
{
348+
GMM_RESOURCE_INFO *pRes = NULL;
349+
GmmClientContext * pClientContextIn = NULL;
350+
351+
pClientContextIn = this;
352+
353+
if((pRes = new GMM_RESOURCE_INFO(pClientContextIn)) == NULL)
354+
{
355+
GMM_ASSERTDPF(0, "Allocation failed!");
356+
goto ERROR_CASE;
357+
}
358+
359+
if(pRes->CreateCustomRes(*pGmmGlobalContext, *pCreateParams) != GMM_SUCCESS)
360+
{
361+
goto ERROR_CASE;
362+
}
363+
364+
return (pRes);
365+
366+
ERROR_CASE:
367+
if(pRes)
368+
{
369+
DestroyResInfoObject(pRes);
370+
}
371+
372+
return (NULL);
373+
}
339374
/////////////////////////////////////////////////////////////////////////////////////
340375
/// Member function of ClientContext class for creation of ResourceInfo Object .
341376
/// @see GmmLib::GmmResourceInfoCommon::Create()

0 commit comments

Comments
 (0)