Revert "Propagate exec buffer error to L0 API level"

This reverts commit 9a95f3c62d.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2022-10-13 05:40:59 +02:00
committed by Compute-Runtime-Automation
parent 945897cf55
commit 71149b29c5
24 changed files with 18 additions and 244 deletions

View File

@ -20,9 +20,6 @@ SubmissionStatus DrmCommandStreamReceiver<GfxFamily>::flushInternal(const BatchB
int ret = this->exec(batchBuffer, 0u, static_cast<const OsContextLinux *>(osContext)->getDrmContextIds()[0], 0);
if (ret) {
if (ret == EWOULDBLOCK) {
return SubmissionStatus::OUT_OF_HOST_MEMORY;
}
return SubmissionStatus::FAILED;
}
return SubmissionStatus::SUCCESS;

View File

@ -39,9 +39,6 @@ SubmissionStatus DrmCommandStreamReceiver<GfxFamily>::flushInternal(const BatchB
int ret = this->exec(batchBuffer, tileIterator, drmContextIds[contextIndex], contextIndex);
if (ret) {
if (ret == EWOULDBLOCK) {
return SubmissionStatus::OUT_OF_HOST_MEMORY;
}
return SubmissionStatus::FAILED;
}

View File

@ -58,10 +58,6 @@ void Drm::queryAndSetVmBindPatIndexProgrammingSupport() {
}
int Drm::ioctl(DrmIoctl request, void *arg) {
auto shouldBreakIoctlLoopOnWouldBlock = false;
if (ioctlHelper) {
shouldBreakIoctlLoopOnWouldBlock = ioctlHelper->shouldBreakIoctlLoopOnWouldBlock(request);
}
auto requestValue = getIoctlRequestValue(request, ioctlHelper.get());
int ret;
int returnedErrno;
@ -112,10 +108,6 @@ int Drm::ioctl(DrmIoctl request, void *arg) {
}
}
if (ret == -1 && returnedErrno == EWOULDBLOCK && shouldBreakIoctlLoopOnWouldBlock) {
break;
}
} while (ret == -1 && (returnedErrno == EINTR || returnedErrno == EAGAIN || returnedErrno == EBUSY || returnedErrno == -EBUSY));
SYSTEM_LEAVE(request);
return ret;

View File

@ -369,5 +369,4 @@ std::string IoctlHelper::getFileForMaxMemoryFrequencyOfSubDevice(int subDeviceId
return "/gt/gt" + std::to_string(subDeviceId) + "/mem_RP0_freq_mhz";
}
bool IoctlHelper::shouldBreakIoctlLoopOnWouldBlock(DrmIoctl ioctlRequest) const { return false; }
} // namespace NEO

View File

@ -136,8 +136,6 @@ class IoctlHelper {
uint32_t getFlagsForPrimeHandleToFd() const;
virtual bool shouldBreakIoctlLoopOnWouldBlock(DrmIoctl ioctlRequest) const;
protected:
Drm &drm;
};
@ -209,7 +207,7 @@ class IoctlHelperImpl : public IoctlHelperUpstream {
class IoctlHelperPrelim20 : public IoctlHelper {
public:
IoctlHelperPrelim20(Drm &drmArg);
using IoctlHelper::IoctlHelper;
bool initialize() override;
bool isSetPairAvailable() override;
@ -256,7 +254,6 @@ class IoctlHelperPrelim20 : public IoctlHelper {
int getDrmParamValue(DrmParam drmParam) const override;
std::string getDrmParamString(DrmParam param) const override;
std::string getIoctlString(DrmIoctl ioctlRequest) const override;
bool shouldBreakIoctlLoopOnWouldBlock(DrmIoctl ioctlRequest) const override;
};
} // namespace NEO

View File

@ -12,11 +12,9 @@
#include "shared/source/helpers/ptr_math.h"
#include "shared/source/helpers/string.h"
#include "shared/source/os_interface/linux/cache_info.h"
#include "shared/source/os_interface/linux/drm_neo.h"
#include "shared/source/os_interface/linux/drm_wrappers.h"
#include "shared/source/os_interface/linux/i915_prelim.h"
#include "shared/source/os_interface/linux/ioctl_helper.h"
#include "shared/source/os_interface/linux/sys_calls.h"
#include <algorithm>
#include <cerrno>
@ -27,11 +25,6 @@
namespace NEO {
IoctlHelperPrelim20::IoctlHelperPrelim20(Drm &drmArg) : IoctlHelper(drmArg) {
auto fileDescriptor = this->drm.getFileDescriptor();
SysCalls::fcntl(fileDescriptor, F_SETFL, SysCalls::fcntl(fileDescriptor, F_GETFL) | O_NONBLOCK);
};
bool IoctlHelperPrelim20::isSetPairAvailable() {
int setPairSupported = 0;
GetParam getParam{};
@ -652,8 +645,6 @@ std::string IoctlHelperPrelim20::getIoctlString(DrmIoctl ioctlRequest) const {
}
}
bool IoctlHelperPrelim20::shouldBreakIoctlLoopOnWouldBlock(DrmIoctl ioctlRequest) const { return ioctlRequest == DrmIoctl::GemExecbuffer2; }
static_assert(sizeof(MemoryClassInstance) == sizeof(prelim_drm_i915_gem_memory_class_instance));
static_assert(offsetof(MemoryClassInstance, memoryClass) == offsetof(prelim_drm_i915_gem_memory_class_instance, memory_class));
static_assert(offsetof(MemoryClassInstance, memoryInstance) == offsetof(prelim_drm_i915_gem_memory_class_instance, memory_instance));

View File

@ -29,7 +29,5 @@ ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
void *mmap(void *addr, size_t size, int prot, int flags, int fd, off_t off);
int munmap(void *addr, size_t size);
ssize_t read(int fd, void *buf, size_t count);
int fcntl(int fd, int cmd);
int fcntl(int fd, int cmd, int arg);
} // namespace SysCalls
} // namespace NEO

View File

@ -93,12 +93,5 @@ ssize_t read(int fd, void *buf, size_t count) {
return ::read(fd, buf, count);
}
int fcntl(int fd, int cmd) {
return ::fcntl(fd, cmd);
}
int fcntl(int fd, int cmd, int arg) {
return ::fcntl(fd, cmd, arg);
}
} // namespace SysCalls
} // namespace NEO