2018-05-17 11:47:35 +02:00
|
|
|
/*
|
2019-12-31 11:06:29 +01:00
|
|
|
* Copyright (C) 2018-2020 Intel Corporation
|
2018-05-17 11:47:35 +02:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-05-17 11:47:35 +02:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2020-02-23 18:46:50 +01:00
|
|
|
#include "gmm_helper/gmm_interface.h"
|
2018-05-17 11:47:35 +02:00
|
|
|
|
2020-01-20 00:17:52 +01:00
|
|
|
namespace NEO {
|
2020-01-09 16:14:59 +01:00
|
|
|
GMM_INIT_IN_ARGS passedInputArgs = {};
|
|
|
|
|
SKU_FEATURE_TABLE passedFtrTable = {};
|
|
|
|
|
WA_TABLE passedWaTable = {};
|
|
|
|
|
bool copyInputArgs = false;
|
2019-10-15 15:05:47 +02:00
|
|
|
|
2020-01-20 00:17:52 +01:00
|
|
|
namespace GmmInterface {
|
|
|
|
|
GMM_STATUS initialize(GMM_INIT_IN_ARGS *pInArgs, GMM_INIT_OUT_ARGS *pOutArgs) {
|
2019-10-15 15:05:47 +02:00
|
|
|
pOutArgs->pGmmClientContext = reinterpret_cast<GMM_CLIENT_CONTEXT *>(0x01);
|
2020-01-16 12:21:49 +01: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 11:06:29 +01:00
|
|
|
}
|
2020-01-16 12:21:49 +01:00
|
|
|
return GMM_INVALIDPARAM;
|
2018-06-21 16:14:12 +02:00
|
|
|
}
|
2019-10-15 15:05:47 +02:00
|
|
|
|
2020-01-20 00:17:52 +01:00
|
|
|
void destroy(GMM_INIT_OUT_ARGS *pInArgs) {
|
2018-06-21 16:14:12 +02:00
|
|
|
}
|
2020-01-20 00:17:52 +01:00
|
|
|
} // namespace GmmInterface
|
|
|
|
|
} // namespace NEO
|