Commit Graph

958 Commits

Author SHA1 Message Date
Kamil Kopryk ffac216ab2 fix: use decanonize from gmm helper in xe
Related-To: NEO-7996
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-08-07 17:45:03 +02:00
John Falkowski f652c7311d feature: Add prefetch for chunking with shared and device mem
Perform prefetching of chunks on shared and device allocations
after bind.

Related-To: NEO-8066

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
Signed-off by: John Falkowski <john.falkowski@intel.com>
2023-08-05 02:17:39 +02:00
Compute-Runtime-Validation d93789dbab Revert "fix: use decanonize from gmm helper in xe"
This reverts commit e6b0930657.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-08-04 17:20:25 +02:00
Bari, Pratik 3f083360a2 feature(sysman): Added sysfs filenames for the memory module
- The sysfs filenames have been added in the sysfsNameToFileMap of the
SysmanKmdInterface classes.
- The functions returning the sysfs filenames have been removed from the
shared directory.
- The ULTs have been added to return the sysfs filenames.

Related-To: LOCI-4699

Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
2023-08-03 22:36:17 +02:00
Kamil Kopryk e6b0930657 fix: use decanonize from gmm helper in xe
Related-To: NEO-7996

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-08-03 15:18:48 +02:00
Filip Hazubski 7ea22d0369 feature: Add pat index programming to gem create ext call
When upstream ioctl helper is created it will try to create small
allocation, adding I915_GEM_CREATE_EXT_SET_PAT extension. If it
succeeds, for all resources with valid pat index value it will then
explicitly program pat index value with gem create ext call.

PrintBOCreateDestroyResult value can be used to:
- print whether the set pat extension is supported by the kernel, when
  ioctl helper is created
- print whether set pat extension was added for a given gem create ext
  call and what pat index value was programmed

Note: introduced changes are disabled by defualt.
Toggle DisableGemCreateExtSetPat can be used to enable new functionality.

Related-To: NEO-7896

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2023-07-31 09:00:04 +02:00
Dunajski, Bartosz a241099dff feature: use WaitUserFence on zeEventHostSynchronize
Disabled by default. Debug flag is required.

Related-To: NEO-7966

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2023-07-26 19:41:09 +02:00
Mayank Raghuwanshi ea7d9fe106 feature: Xe Porting for sysman engine module
Related-To: LOCI-4243

Signed-off-by: Mayank Raghuwanshi <mayank.raghuwanshi@intel.com>
2023-07-26 10:24:05 +02:00
Filip Hazubski 6217d97bbe Revert "fix: Increase size of reported global memory available to 98%"
Temporarily reverting back to previously reported value to avoid corner-case
regression. Intent is reintroduce as soon as regressions are rootcaused.

This only affects Linux.

Related-To: GSD-5474, GSD-5412

This reverts commit e8ac22c265.

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2023-07-26 07:52:40 +02:00
Dunajski, Bartosz 31d351cd53 refactor: unify and simplify Drm CSR methods
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2023-07-20 11:42:21 +02:00
Lukasz Jobczyk f370b8f56a fix: Remove alignment condition for tlb flush
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-07-14 10:19:12 +02:00
Lu, Wenbin 4de792cee0 fix: support alignments in host and shared UnifiedMemoryAllocation
Related-To: LOCI-4334

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
2023-07-13 08:48:41 +02:00
Bari, Pratik b9837ef068 feature(sysman): Added changes for Porting Frequency API
The new classes SysmanKmdInterface, SysmanKmdInterfaceI915 and
SysmanKmdInterfaceXe have been introduced.
A map is maintained in the SysmanKmdInterfaceI915 and
SysmanKmdInterfaceXe class for the sysfs file names.
The access specifier of the function getDrmVersion has been changed from
protected to public so as to use it in the sysman code. This is required
for the SysmanKmdInterface pointer to point to the
SysmanKmdInterfaceI915 and SysmanKmdInterfaceXe accordingly.
The ULTs have been added for the new sysfs file path corresponding to
the i915 and the Xe driver.

Related-To: LOCI-4399

Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
2023-07-13 08:41:05 +02:00
Young Jin Yoon 40af0dddeb feature: disable chunking when debugger is used
Added if conditions to enable useChunking flag by checking
with ExecutionEnvironment::isDebuggingEnabled.

Related-To: NEO-8164
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2023-07-12 03:26:49 +02:00
Young Jin Yoon 81822e3716 refactor: rename pageSize2Mb to pageSize2M
The previous name "pageSize2Mb" defined in
shared/source/helpers/constant.h is inconsistent to other variable,
i.e. pageSize64k.

Furthermore, it's a bit misleading because the page size is defined in
Megabytes (MB), not in Megabits (Mb).

Related-to: NEO-7695
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2023-07-10 20:12:09 +02:00
Jaime Arteaga 23eeaf816d feature: Add debug keys for chunking allocation and size
Related-to: NEO-7695

New debug keys added:

EnableBOChunking is now a mask
0 = no chunking (default).
1 = shared allocations only
2 = device allocations only
3 = shared and device allocations

MinimalAllocationSizeForChunking sets the minimum allocation
size to apply chunking. Default is 2MB.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2023-07-07 23:39:43 +02:00
Mateusz Hoppe 6205cca038 fix(debugger): require immediate binding for Module's allocations
- all bos from Module must have requireImmediateBinding
flag set
- this change fixes hang in debugger - where MODULE LOAD event
was not sent

Resolves: NEO-8121

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-07-06 17:34:22 +02:00
Dominik Dabek f1f0f2410c refactor: remove unused getBaseTimeout
Related-To: GSD-3612

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2023-07-05 16:12:15 +02:00
Kamil Kopryk 3f27b5225c performance: Check if print xe logs is needed before locking
Related-To: NEO-7996
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-07-03 14:01:31 +02:00
Compute-Runtime-Validation 2d7505c01c Revert "feature: Add pat index programming to gem create ext call"
This reverts commit 6489379508.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-07-02 05:06:58 +02:00
Lukasz Jobczyk c294ef48ce fix: Make tlb flush os agnostic
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-06-30 14:12:59 +02:00
Dominik Dabek 10ac167bdc fix(ocl): do not multiply kmdNotify waitTimeout
With direct submission disabled this resulted in waitTimeout long enough
that kmdWait fallback was rarely used.
This caused more CPU spin time.

Related-To: GSD-3612

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2023-06-29 16:06:28 +02:00
Filip Hazubski 6489379508 feature: Add pat index programming to gem create ext call
When upstream ioctl helper is created it will try to create small
allocation, adding I915_GEM_CREATE_EXT_SET_PAT extension. If it
succeeds, for all resources with valid pat index value it will then
explicitly program pat index value with gem create ext call.

PrintBOCreateDestroyResult value can be used to:
- print whether the set pat extension is supported by the kernel, when
  ioctl helper is created
- print whether set pat extension was added for a given gem create ext
  call and what pat index value was programmed

Resolves: NEO-7896

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2023-06-29 08:51:00 +02:00
Aravind Gopalakrishnan ba4c4a5af0 feature(sysman): Retrieve uuid for Sysman device properties
- Abstracts product helpers logic for uuid
- Add UUID retrieval for Linux for Sysman via zesInit path

Related-To: LOCI-4137

Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
2023-06-26 19:17:21 +02:00
Joshua Santosh Ranjan 97b4d8bab5 feature: add initial support for host mapped timestamps
Related-To: LOCI-4171

Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
2023-06-26 08:29:58 +02:00
Kamil Kopryk 1007013dfd fix: return correct value in xe helper initialize
Related-To: NEO-7996
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-06-22 20:59:12 +02:00
Kamil Kopryk 082d33bb7c fix: correct query topology on xe
Related-To: NEO-7996
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-06-22 13:24:52 +02:00
Matias Cabral 96517a08aa feature: Implement zetMetricGroupGetGlobalTimestampsExp()
Resolves: LOCI-3072

Signed-off-by: Matias Cabral <matias.a.cabral@intel.com>
2023-06-21 09:48:41 +02:00
Bari, Pratik a15e8a9679 feature: Added changes for Porting Memory API with XE driver
The Memory Info object is used in the getState function for memory.
Some of the ULTS in the memory modules has been modified.
A function to return the sysfs nodes for the Memory address range has
been added in the IoctlHelper class corresponding to the XE and i915
driver.

Related-To: LOCI-4397

Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
2023-06-20 21:38:17 +02:00
Milczarek, Slawomir f189f425ce feature: KMD migration on access counters with no preferred location
Set no preference for KMD migrated shared allocation and rely on ACC to migrate.

Related-To: NEO-6839

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-06-20 08:14:34 +02:00
Mateusz Jablonski 5ab592994c refactor: remove not used parameter in ioctl helper xe method
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-06-19 14:15:43 +02:00
Matias Cabral cfa187aec6 feature: Support for metrics group exp extension
Support zet_metric_global_timestamps_resolution_exp_t

Resolves: LOCI-4350

Signed-off-by: Matias Cabral <matias.a.cabral@intel.com>
2023-06-16 07:48:32 +02:00
Mateusz Jablonski 3b981331c9 fix: correct handling ZE_ENABLE_PCI_ID_DEVICE_ORDER flag
- by default ZE_ENABLE_PCI_ID_DEVICE_ORDER is disabled
- by default devices are sorted by type (discrete first), then by pci order
- when ZE_ENABLE_PCI_ID_DEVICE_ORDER is enabled, devices are sorted by pci id

Related-To: LOCI-4520

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-06-14 16:27:55 +02:00
Dominik Dabek 60d5e22f3b fix(ocl): reduce busy waiting in clFinish
Use flushStamp=taskCount when passed flushStamp==0.
This will cause driver to busy wait for a short while before falling
back to use kmd notify.

Related-To: GSD-3612

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2023-06-14 13:56:40 +02:00
Compute-Runtime-Validation 02436b8877 Revert "fix: support alignments in host and shared UnifiedMemoryAllocation"
This reverts commit c11809e002.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-06-14 06:32:40 +02:00
Lu, Wenbin c11809e002 fix: support alignments in host and shared UnifiedMemoryAllocation
Related-To: LOCI-4334

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
2023-06-13 10:01:11 +02:00
Kamil Kopryk 0605716499 fix: don't query ipVersion if not supported
Related-To: NEO-7786
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-06-12 16:12:24 +02:00
Dunajski, Bartosz 5fe9d70066 feature: new multitile post sync layout for immediate write [1/n]
No functional changes in this commit. This is prework.

Related-To: NEO-7966

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2023-06-07 13:11:10 +02:00
Kamil Kopryk dadd19e17b fix: init releaseHelper after ipVersion setup
Related-To: NEO-7786
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-06-06 14:22:42 +02:00
Jaime Arteaga 2efd6e547a feature: Add support for chunking in the UMD (1/N)
Read if support for chunking is available in the KMD.
If available, KMD will create a BO with 1 or more chunks,
depending on the chunk size selected.

Related-To: NEO-7695

Sync to
https://github.com/intel-gpu/drm-uapi-helper/releases/tag/v2.0-rc18

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
Signed-off-by: John Falkowski <john.falkowski@intel.com>
2023-06-02 23:27:40 +02:00
Mateusz Jablonski 6f21d133cf fix: extend MemoryInfo class interface to expose single memory region
unify logic of OverrideDrmRegion debug flag

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-05-30 16:27:42 +02:00
Mateusz Jablonski c544004b8e fix: move getProductConfigFromHwInfo to CompilerProductHelper
add tests for default PVC configs

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-05-29 14:08:52 +02:00
Spruit, Neil R b589e32c4b fix: Force Close of IPC handles at memFree
Related-To: LOCI-4455

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2023-05-26 17:09:47 +02:00
Jaime Arteaga 37ed03a15c feature: Propagate error from makeResident to caller
Have makeResident return error to the caller, instead of always
SUCCESS. This will allow interfaces like zeContextMakeMemoryResident
to fail properly.

Additionally, change the parsing of MemoryOperationsStatus from
ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY to
ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY, since when making resources
resident, it is the device running out of memory, instead of the
host.

Related-To: LOCI-4443

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2023-05-24 21:08:27 +02:00
Neil R Spruit ded9d7bff2 feature: Get Peer Allocation with specified base Pointer
Related-To: LOCI-4176

- Given a Base Pointer passed into Get Peer Allocation, then the base
pointer is used in the map of the new allocation to the virtual memory.
- Enables users to use the same pointer for all devices in Peer To Peer.
- Currently unsupported on reserved memory due to mapped and exec
resiedency of Virtual addresses.

Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
2023-05-24 20:41:20 +02:00
Mateusz Hoppe 7d82b690e4 fix(debugger): use per-context fences for vm_bind operations
- vm_bind with user fence updates fence value independently for every
VM hence with per-context VMs, every context needs its unique fence
address. This prevents 2 contexts from updating value possibly
writing lower value than the one that was already stored

Resolves: NEO-8004

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-05-24 15:17:31 +02:00
Kamil Kopryk 915495ce28 refactor: remove not needed forward declaration
Related-To: NEO-7786
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-05-23 16:06:16 +02:00
Daria Hinz 331f167cfe feature: Add debug flag for setting hw ip version
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Related-To: NEO-7954
2023-05-23 15:32:46 +02:00
Kamil Kopryk 4be9b7e609 fix: setup ipVersion in linux paths
Get ipVersion from productHelper function on xe and upstream.
On prelim first try to query ipVersion from kmd,
if it fails, get ipVersion from productHelper function.

Related-To: NEO-7786
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-05-23 09:27:15 +02:00
Matias Cabral 38bc7ae403 build: update i915 headers
third_party/uapi/drm - from c7c12de893f808bd7c1215fe9056262295e5203b
https://cgit.freedesktop.org/drm-tip

third_party/uapi/prelim/drm from prelim v2.0-rc17
https://github.com/intel-gpu/drm-uapi-helper

Signed-off-by:  Matias Cabral <matias.a.cabral@intel.com>
2023-05-22 10:25:00 +02:00