devices.m separation for Linux

Change-Id: Ia8e430db4dfcefc1b19e23e9cd7113bf87f0a7af
This commit is contained in:
Dunajski, Bartosz
2018-02-05 08:54:46 +01:00
committed by sys_ocldev
parent 6ef0581a02
commit bdee42ca16
13 changed files with 419 additions and 8 deletions

View File

@@ -542,6 +542,7 @@ if(${GENERATE_EXECUTABLE})
${GMM_INCLUDE_PATHS}
${UMKM_SHAREDDATA_INCLUDE_PATHS}
${INSTRUMENTATION_INCLUDE_PATH}
${CMAKE_CURRENT_SOURCE_DIR}/dll/linux/devices${BRANCH_DIR_SUFFIX}
)
endif (WIN32)

View File

@@ -0,0 +1,23 @@
/*
* Copyright (c) 2018, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "runtime/dll/linux/devices/devices_base.m"

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Intel Corporation
* Copyright (c) 2018, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -81,6 +81,20 @@ DEVICE( IKBL_GT3_SERV_DEVICE_F0_ID, KBL_2x3x8, GTTYPE_GT3 )
DEVICE( IKBL_GT4_SERV_DEVICE_F0_ID, KBL_3x3x8, GTTYPE_GT4 )
DEVICE( IKBL_GT4_WRK_DEVICE_F0_ID, KBL_3x3x8, GTTYPE_GT4 )
#endif
#ifdef SUPPORT_CFL
DEVICE( ICFL_GT1_DT_DEVICE_F0_ID, CFL_1x2x6, GTTYPE_GT1 )
DEVICE( ICFL_GT1_S61_DT_DEVICE_F0_ID, CFL_1x2x6, GTTYPE_GT1 )
DEVICE( ICFL_GT1_S41_DT_DEVICE_F0_ID, CFL_1x2x6, GTTYPE_GT1 )
DEVICE( ICFL_GT2_DT_DEVICE_F0_ID, CFL_1x3x6, GTTYPE_GT2 )
DEVICE( ICFL_GT2_S62_DT_DEVICE_F0_ID, CFL_1x3x6, GTTYPE_GT2 )
DEVICE( ICFL_GT2_HALO_DEVICE_F0_ID, CFL_1x3x6, GTTYPE_GT2 )
DEVICE( ICFL_GT2_SERV_DEVICE_F0_ID, CFL_1x3x6, GTTYPE_GT2 )
DEVICE( ICFL_GT2_HALO_WS_DEVICE_F0_ID, CFL_1x3x6, GTTYPE_GT2 )
DEVICE( ICFL_GT2_S42_DT_DEVICE_F0_ID, CFL_1x3x6, GTTYPE_GT2 )
DEVICE( ICFL_GT3_ULT_15W_DEVICE_F0_ID, CFL_2x3x8, GTTYPE_GT3 )
DEVICE( ICFL_GT3_ULT_15W_42EU_DEVICE_F0_ID, CFL_2x3x8, GTTYPE_GT3 )
DEVICE( ICFL_GT3_ULT_DEVICE_F0_ID, CFL_2x3x8, GTTYPE_GT3 )
#endif
#ifdef SUPPORT_BXT
DEVICE(IBXT_P_3x6_DEVICE_ID, BXT_1x3x6, GTTYPE_GTA) //18EU APL
DEVICE(IBXT_P_12EU_3x6_DEVICE_ID, BXT_1x2x6, GTTYPE_GTA) //12EU APL

View File

@@ -34,12 +34,7 @@
namespace OCLRT {
static struct DeviceDescriptor {
unsigned short deviceId;
const HardwareInfo *pHwInfo;
void (*setupGtSystemInfo)(GT_SYSTEM_INFO *);
GTTYPE eGtType;
} const DeviceDescriptorTable[] = {
const DeviceDescriptor deviceDescriptorTable[] = {
#define DEVICE(devId, gt, gtType) {devId, &gt::hwInfo, &gt::setupGtSystemInfo, gtType},
#include "devices.m"
#undef DEVICE
@@ -177,7 +172,7 @@ Drm *Drm::create(int32_t deviceOrdinal) {
const DeviceDescriptor *device = nullptr;
GTTYPE eGtType = GTTYPE_UNDEFINED;
for (auto &d : DeviceDescriptorTable) {
for (auto &d : deviceDescriptorTable) {
if (drmObject->deviceId == d.deviceId) {
device = &d;
eGtType = d.eGtType;

View File

@@ -30,6 +30,8 @@
#include <cerrno>
#include <string>
struct GT_SYSTEM_INFO;
namespace OCLRT {
#define I915_PRIVATE_PARAM_HAS_EXEC_FORCE_NON_COHERENT (-1)
@@ -38,6 +40,16 @@ namespace OCLRT {
#define I915_CONTEXT_PRIVATE_PARAM_BOOST 0x80000000
class DeviceFactory;
struct HardwareInfo;
struct DeviceDescriptor {
unsigned short deviceId;
const HardwareInfo *pHwInfo;
void (*setupGtSystemInfo)(GT_SYSTEM_INFO *);
GTTYPE eGtType;
};
extern const DeviceDescriptor deviceDescriptorTable[];
class Drm {
friend DeviceFactory;