mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Remove duplicated code in drm_query files
This commit moves duplicated code in drm_query.cpp and drm_query_dg1.cpp to shared drm_query_extended.cpp Related-To: NEO-6149 Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
2e9e6f7dcb
commit
ae6d58bcb0
@ -5,7 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/linux/cache_info_impl.h"
|
||||
#include "shared/source/os_interface/linux/drm_engine_mapper.h"
|
||||
#include "shared/source/os_interface/linux/engine_info_impl.h"
|
||||
#include "shared/source/os_interface/linux/sys_calls.h"
|
||||
@ -33,12 +32,6 @@ std::string getIoctlParamStringRemaining(int param) {
|
||||
}
|
||||
} // namespace IoctlHelper
|
||||
|
||||
bool Drm::querySystemInfo() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void Drm::setupSystemInfo(HardwareInfo *hwInfo, SystemInfo *sysInfo) {}
|
||||
|
||||
bool Drm::queryEngineInfo(bool isSysmanEnabled) {
|
||||
auto length = 0;
|
||||
auto dataQuery = this->query(DRM_I915_QUERY_ENGINE_INFO, DrmQueryItemFlags::empty, length);
|
||||
@ -58,32 +51,6 @@ unsigned int Drm::bindDrmContext(uint32_t drmContextId, uint32_t deviceIndex, au
|
||||
return DrmEngineMapper::engineNodeMap(engineType);
|
||||
}
|
||||
|
||||
int Drm::bindBufferObject(OsContext *osContext, uint32_t vmHandleId, BufferObject *bo) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Drm::unbindBufferObject(OsContext *osContext, uint32_t vmHandleId, BufferObject *bo) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Drm::waitForBind(uint32_t vmHandleId) {
|
||||
}
|
||||
|
||||
int Drm::waitUserFence(uint32_t ctx, uint64_t address, uint64_t value, ValueWidth dataWidth, int64_t timeout, uint16_t flags) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool Drm::isVmBindAvailable() {
|
||||
return this->bindAvailable;
|
||||
}
|
||||
|
||||
void Drm::appendDrmContextFlags(drm_i915_gem_context_create_ext &gcc, bool isSpecialContextRequested) {
|
||||
}
|
||||
|
||||
void Drm::setupCacheInfo(const HardwareInfo &hwInfo) {
|
||||
this->cacheInfo.reset(new CacheInfoImpl());
|
||||
}
|
||||
|
||||
int Drm::createDrmVirtualMemory(uint32_t &drmVmId) {
|
||||
drm_i915_gem_vm_control ctl = {};
|
||||
auto ret = SysCalls::ioctl(getFileDescriptor(), DRM_IOCTL_I915_GEM_VM_CREATE, &ctl);
|
||||
|
@ -5,7 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/linux/cache_info_impl.h"
|
||||
#include "shared/source/os_interface/linux/drm_engine_mapper.h"
|
||||
#include "shared/source/os_interface/linux/engine_info_impl.h"
|
||||
#include "shared/source/os_interface/linux/memory_info_impl.h"
|
||||
@ -35,12 +34,6 @@ std::string getIoctlParamStringRemaining(int param) {
|
||||
}
|
||||
} // namespace IoctlHelper
|
||||
|
||||
bool Drm::querySystemInfo() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void Drm::setupSystemInfo(HardwareInfo *hwInfo, SystemInfo *sysInfo) {}
|
||||
|
||||
bool Drm::queryEngineInfo(bool isSysmanEnabled) {
|
||||
auto length = 0;
|
||||
auto dataQuery = this->query(DRM_I915_QUERY_ENGINE_INFO, DrmQueryItemFlags::empty, length);
|
||||
@ -67,32 +60,6 @@ unsigned int Drm::bindDrmContext(uint32_t drmContextId, uint32_t deviceIndex, au
|
||||
return DrmEngineMapper::engineNodeMap(engineType);
|
||||
}
|
||||
|
||||
int Drm::bindBufferObject(OsContext *osContext, uint32_t vmHandleId, BufferObject *bo) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Drm::unbindBufferObject(OsContext *osContext, uint32_t vmHandleId, BufferObject *bo) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Drm::waitForBind(uint32_t vmHandleId) {
|
||||
}
|
||||
|
||||
int Drm::waitUserFence(uint32_t ctx, uint64_t address, uint64_t value, ValueWidth dataWidth, int64_t timeout, uint16_t flags) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool Drm::isVmBindAvailable() {
|
||||
return this->bindAvailable;
|
||||
}
|
||||
|
||||
void Drm::appendDrmContextFlags(drm_i915_gem_context_create_ext &gcc, bool isSpecialContextRequested) {
|
||||
}
|
||||
|
||||
void Drm::setupCacheInfo(const HardwareInfo &hwInfo) {
|
||||
this->cacheInfo.reset(new CacheInfoImpl());
|
||||
}
|
||||
|
||||
int Drm::createDrmVirtualMemory(uint32_t &drmVmId) {
|
||||
drm_i915_gem_vm_control ctl = {};
|
||||
auto ret = SysCalls::ioctl(getFileDescriptor(), DRM_IOCTL_I915_GEM_VM_CREATE, &ctl);
|
||||
|
@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/linux/cache_info_impl.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
|
||||
#include "drm_query_flags.h"
|
||||
@ -34,4 +35,36 @@ bool Drm::isDebugAttachAvailable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Drm::querySystemInfo() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void Drm::setupSystemInfo(HardwareInfo *hwInfo, SystemInfo *sysInfo) {}
|
||||
|
||||
void Drm::setupCacheInfo(const HardwareInfo &hwInfo) {
|
||||
this->cacheInfo.reset(new CacheInfoImpl());
|
||||
}
|
||||
|
||||
int Drm::bindBufferObject(OsContext *osContext, uint32_t vmHandleId, BufferObject *bo) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Drm::unbindBufferObject(OsContext *osContext, uint32_t vmHandleId, BufferObject *bo) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Drm::waitForBind(uint32_t vmHandleId) {
|
||||
}
|
||||
|
||||
int Drm::waitUserFence(uint32_t ctx, uint64_t address, uint64_t value, ValueWidth dataWidth, int64_t timeout, uint16_t flags) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool Drm::isVmBindAvailable() {
|
||||
return this->bindAvailable;
|
||||
}
|
||||
|
||||
void Drm::appendDrmContextFlags(drm_i915_gem_context_create_ext &gcc, bool isSpecialContextRequested) {
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
Reference in New Issue
Block a user