2018-05-17 17:47:35 +08:00
|
|
|
/*
|
2019-12-31 18:06:29 +08:00
|
|
|
* Copyright (C) 2018-2020 Intel Corporation
|
2018-05-17 17:47:35 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-05-17 17:47:35 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/gmm_helper/gmm_interface.h"
|
2018-05-17 17:47:35 +08:00
|
|
|
|
2020-01-20 07:17:52 +08:00
|
|
|
namespace NEO {
|
2020-01-09 23:14:59 +08:00
|
|
|
GMM_INIT_IN_ARGS passedInputArgs = {};
|
|
|
|
SKU_FEATURE_TABLE passedFtrTable = {};
|
|
|
|
WA_TABLE passedWaTable = {};
|
|
|
|
bool copyInputArgs = false;
|
2019-10-15 21:05:47 +08:00
|
|
|
|
2020-01-20 07:17:52 +08:00
|
|
|
namespace GmmInterface {
|
|
|
|
GMM_STATUS initialize(GMM_INIT_IN_ARGS *pInArgs, GMM_INIT_OUT_ARGS *pOutArgs) {
|
2019-10-15 21:05:47 +08:00
|
|
|
pOutArgs->pGmmClientContext = reinterpret_cast<GMM_CLIENT_CONTEXT *>(0x01);
|
2020-01-16 19:21:49 +08:00
|
|
|
if (pInArgs) {
|
|
|
|
if (pInArgs->Platform.eProductFamily == PRODUCT_FAMILY::IGFX_UNKNOWN &&
|
|
|
|
pInArgs->Platform.ePCHProductFamily == PCH_PRODUCT_FAMILY::PCH_UNKNOWN) {
|
|
|
|
return GMM_ERROR;
|
|
|
|
}
|
|
|
|
if (copyInputArgs) {
|
|
|
|
passedInputArgs = *pInArgs;
|
|
|
|
passedFtrTable = *reinterpret_cast<SKU_FEATURE_TABLE *>(pInArgs->pSkuTable);
|
|
|
|
passedWaTable = *reinterpret_cast<WA_TABLE *>(pInArgs->pWaTable);
|
|
|
|
}
|
|
|
|
return GMM_SUCCESS;
|
2019-12-31 18:06:29 +08:00
|
|
|
}
|
2020-01-16 19:21:49 +08:00
|
|
|
return GMM_INVALIDPARAM;
|
2018-06-21 22:14:12 +08:00
|
|
|
}
|
2019-10-15 21:05:47 +08:00
|
|
|
|
2020-01-20 07:17:52 +08:00
|
|
|
void destroy(GMM_INIT_OUT_ARGS *pInArgs) {
|
2018-06-21 22:14:12 +08:00
|
|
|
}
|
2020-01-20 07:17:52 +08:00
|
|
|
} // namespace GmmInterface
|
|
|
|
} // namespace NEO
|