Get drm specific string from ioctl helper when available

Related-To: NEO-6999
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-07-14 15:32:26 +00:00
committed by Compute-Runtime-Automation
parent 01af53b63c
commit 02e4ddbdfa
12 changed files with 273 additions and 87 deletions

View File

@@ -109,6 +109,8 @@ class IoctlHelper {
virtual bool isDebugAttachAvailable() = 0;
virtual unsigned int getIoctlRequestValue(DrmIoctl ioctlRequest) const = 0;
virtual int getDrmParamValue(DrmParam drmParam) const = 0;
virtual std::string getDrmParamString(DrmParam param) const = 0;
virtual std::string getIoctlString(DrmIoctl ioctlRequest) const = 0;
virtual std::vector<MemoryRegion> translateToMemoryRegions(const std::vector<uint8_t> &regionInfo);
@@ -123,6 +125,9 @@ class IoctlHelper {
int getDrmParamValueBase(DrmParam drmParam) const;
unsigned int getIoctlRequestValueBase(DrmIoctl ioctlRequest) const;
std::string getDrmParamStringBase(DrmParam param) const;
std::string getIoctlStringBase(DrmIoctl ioctlRequest) const;
protected:
Drm &drm;
};
@@ -172,6 +177,8 @@ class IoctlHelperUpstream : public IoctlHelper {
bool isDebugAttachAvailable() override;
unsigned int getIoctlRequestValue(DrmIoctl ioctlRequest) const override;
int getDrmParamValue(DrmParam drmParam) const override;
std::string getDrmParamString(DrmParam param) const override;
std::string getIoctlString(DrmIoctl ioctlRequest) const override;
};
template <PRODUCT_FAMILY gfxProduct>
@@ -185,6 +192,7 @@ class IoctlHelperImpl : public IoctlHelperUpstream {
uint32_t createGemExt(const MemRegionsVec &memClassInstances, size_t allocSize, uint32_t &handle, std::optional<uint32_t> vmId) override;
std::vector<MemoryRegion> translateToMemoryRegions(const std::vector<uint8_t> &regionInfo) override;
unsigned int getIoctlRequestValue(DrmIoctl ioctlRequest) const override;
std::string getIoctlString(DrmIoctl ioctlRequest) const override;
};
class IoctlHelperPrelim20 : public IoctlHelper {
@@ -232,6 +240,8 @@ class IoctlHelperPrelim20 : public IoctlHelper {
bool isDebugAttachAvailable() override;
unsigned int getIoctlRequestValue(DrmIoctl ioctlRequest) const override;
int getDrmParamValue(DrmParam drmParam) const override;
std::string getDrmParamString(DrmParam param) const override;
std::string getIoctlString(DrmIoctl ioctlRequest) const override;
};
} // namespace NEO