Commit Graph

439 Commits

Author SHA1 Message Date
Dunajski, Bartosz b728526c4e Allow Device creating multiple CSRs [8/n]
Use OsContextId instead of DeviceIndex for residency

Change-Id: Ib2367b32b5b3e320252d8254f1042f1c3d497068
2018-12-04 15:36:59 +01:00
Mateusz Jablonski 7747db13e1 Deferred deleter: move to next deletion if current deletion cannot be applied
Change-Id: I7067bc2bc74f92518a33ccb9f9dce9b57cc28637
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-12-03 15:24:35 +01:00
Mrozek, Michal 09f3f4e856 Move heap32[0] to heap32[3].
Change-Id: Icea6eef5646894283725e29ce7ee930284af2673
2018-12-03 09:32:36 +01:00
Dunajski, Bartosz 0131e66a70 Allow Device creating multiple CSRs [6/n]
- Introduce default Engine query
- Improve Deferred Deleter usage
- Remove Tag Allocation from Device

Change-Id: Iaa88d8dc0166325acf9a157dcd2217ea408ee285
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-29 16:20:13 +01:00
Katarzyna Cencelewska 3e800d55e6 Add support for dumping cl_cache to specified directory
Change-Id: I782ff17d0d4b17d3d26db543eb7ae222f75ff8a1
2018-11-29 13:59:26 +01:00
Maciej Dziuban 1cd59e927a Store residency status for each osContext separately
Change-Id: I2f17f68dcef6db7b596a69579a435b7ccd24e44b
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-11-29 08:08:25 +01:00
Dunajski, Bartosz b0de2a11d2 Set OsContext as reference
Change-Id: I3b682fabde9c2ddb2c33a95aef77bf6ce400a21f
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-27 15:32:14 +01:00
Dunajski, Bartosz 2d77b86e70 Allow Device creating multiple CSRs [5/n]
- Move Engine type to OsContext
- Move OsContext to CSR
- Improve EngineMapper logic
- CompletionStamp cleanup

Change-Id: I935cb7169c8c48cd09837e20e3da06f6dd3437b9
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-27 14:25:04 +01:00
Pawel Wilma 86ecd1a4b8 Memory leak reported for long string debug variables in ULTs
This commit eliminates ULTs memory leaks reported for string debug variables
exceeding small string optimization size by calling shrink_to_fit() method
on string debug variables in DebugManagerStateRestore destructor.

Change-Id: I304c5c5c23c80f01fdf13f38cea5b4eceb18a94f
Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
2018-11-27 10:07:42 +01:00
Mateusz Jablonski 352450adaa Pass number of os contexts to Graphics Allocation constructor
Mark unshareable allocations

Change-Id: Ie745dc639d8c6b01e2275d29ee1fb4c6343df2bc
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-21 17:38:02 +01:00
Pawel Wilma 2f15ca0508 Add AUB registry key for additional MMIO registers list
Change-Id: Ib478e91d8df21c48f83bfa97a4ea72c41c2f065d
Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
2018-11-21 16:41:44 +01:00
Maciej Dziuban c4239dcd3d Refactor WddmResidencyController methods implementations
- trimResidency
- trimResidencyToBudget
- makeResidentResidencyAllocations

Change-Id: Ibf81e31966c8d8347fd5caf2f6a4bf8fe75fab5f
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-11-21 12:05:37 +01:00
Stefanowski, Adam 96d07db545 Move wddm->init from wddmCSR to getDevices
Change-Id: If88f526792596108e038ec05c1d305e9452506f2
2018-11-20 09:40:57 +01:00
Mrozek, Michal c0f6af1df3 Use maxOsContextCount to initialize trimCandidateList for WDDM allocations.
Change-Id: Icc65d19ed45bb1aa1a3dba4de536cf85ab9b906b
2018-11-19 11:24:16 +01:00
Kai Chen 85b60dff0f Linux GPU address allocator for devices with reduced address space
Code implementation of GPU address allocator for devices with reduced
address space.

Change-Id: Ieb0412c5930fdd71f90741055cf89c0338b01133
Signed-off-by: Kai Chen <kai.chen@intel.com>
2018-11-19 10:20:25 +01:00
Mateusz Jablonski 66492a53a4 Change type of residency task count to uint32_t
Move definitions of objectNotUsed and objectNotResident to GraphicsAllocation

Change-Id: I2aec604a865cc6c975e9d1121028cbdd35c0b18a
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-16 16:04:48 +01:00
Maciej Dziuban 969d4da811 Cleanup WddmResidencyController related code
- Move trimCallback from WddmMemoryManager
- Refactor lastFenceValue accessors to be less generic

Change-Id: I01b31ccb81a5ecc04d07912061326428b07a59bf
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-11-16 08:34:18 +01:00
Mateusz Jablonski 0e0a280803 Create structure UsageInfo for task count and residency task count
Change-Id: I0899c88d9e567a09ba46461ae69cf6c80f713e67
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-15 14:07:05 +01:00
Mateusz Jablonski 1a89a0103a Register trim callback after creating monitored fence
Change-Id: Ib0510a0aed180c7bfe883a60632fd642664e1085
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-15 12:47:01 +01:00
Dunajski, Bartosz 728932ed44 Pass Drm object to OsContext on Linux
Change-Id: I341925eef9bc892f5c321c668736bb6a3aff38f5
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-15 12:04:03 +01:00
Maciej Dziuban 9bdedc62dd Move residency functions to WddmResidencyController
Change-Id: Ic73a51546b3325515f293808550376fa6b57dec3
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-11-15 11:17:27 +01:00
Mrozek, Michal 4341ad0323 Add PowerSaving debug variable.
- It allows to easily turn ON the power saving mode for the driver.
- In that mode, whenever GPU is not ready it will put current thread to sleep,
thread is resumed when GPU completes.
- PowerSaving mode reduces CPU utilization on blocking calls, while increasing
completion latencies.

Change-Id: I3de83713687952ac31a1ec8c397f48aa4212781d
2018-11-15 11:14:08 +01:00
Mrozek, Michal 3c0a6bd24d Remove residency control from Buffer Object.
- Residency is being controlled by Graphics Allocation.
- Duplicates are now eliminated only for shared resources.

Change-Id: Ib51e2739a07728ae0b94abf6cce2e9981b017111
2018-11-14 08:32:04 +01:00
Maciej Dziuban b0acc5ecde Move isMemoryBudgetExhausted to WddmResidencyController
Change-Id: Ic9da29ab954835e93cfbcd6690c1764d99939613
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-11-06 23:09:20 +01:00
Mateusz Jablonski 815ae851b7 Graphics Allocation: store task count per context id
Move definition of allocations list method to internal_allocation_storage.cpp

Change-Id: I4c6038df8fd1b9335e8a74edbab33b78f9293d8f
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-06 12:43:47 +01:00
Maciej Dziuban 42b2ed6a90 Register trimCallback with WddmResidencyController as Context
Change-Id: Ibc34aac17e79df3a3096c29c34506039e2c5bdcc
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-11-05 17:43:20 +01:00
Maciej Dziuban ef02827cd9 Add tests for locking in trimResidency()
Change-Id: Iddbecedae9cf21a4e5232dcac5d145962623e7d6
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-11-05 15:58:06 +01:00
Zdanowicz, Zbigniew ce75767ca3 Add AUB registry key to override MMIO offset value
Change-Id: Iac3bf9074e544a03e38fc437d7b21ea478d9cc5d
2018-11-03 00:33:50 +01:00
Hoppe, Mateusz e6b93941ee Add aub_stream headers
Change-Id: I4d9420210e2a06d8a36abc0cf272901514ff3547
2018-11-02 14:29:45 +01:00
Stefanowski, Adam c202c95634 Stop creating osInterface in WddmCSR and DrmCSR constructors
Change-Id: Ic8ca21824882dfae5df3fe05c7ec1ff96311f286
2018-10-31 15:01:50 +01:00
Mrozek, Michal 8bec1906ec Remove alignedCpuPtr from WddmAllocation
- also switch to make_unique in wddm memory manager functions.

Change-Id: I2f7cf412a993040439466f1971d935fb8429ce7c
2018-10-31 14:07:39 +01:00
Kowalczuk, Jakub 1822fb0747 Control enabling of local memory based on OS and HW Capabilities part 2
- add EnableLocalMemory debug variable
- separate OSInterface::osEnableLocalMemory for dll and unit tests

Change-Id: I78a1f60364eece28b30ce3e91418e7d72ba3e0d9
2018-10-31 13:59:42 +01:00
Mrozek, Michal 200228b506 Replace cpuPtrAllocated flag with driverAllocatedCpuPointer.
Change-Id: Ic0ce165d0e583701e1128595a3d9dabd0a61a84b
2018-10-31 12:37:20 +01:00
Mrozek, Michal 7ece16ee7a Graphics Allocation cleanup.
- remove one constructor
- start using mock graphics allocation in tests

Change-Id: Idb8f4a35dbc2cae8d6bf667bab5542d8e91d6e0d
2018-10-31 11:54:24 +01:00
Maciej Godek f9ba697587 Sharing queries for DX10/DX11
Change-Id: Ia4f176a38bb2dbfe215efe17b13a533ee83510d3
2018-10-31 11:52:46 +01:00
Maciej Dziuban 9c696f1d29 Create STL-friendly SpinLock implementation
Change-Id: Ic04d34d2962ad6953fe3282a10f6cba16c0e07b3
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-31 08:38:32 +01:00
Mrozek, Michal 5b2e16651f Remove alignedSize from WddmAllocation.
Change-Id: I3b610515e4d5db16ce6a604e7e2f4b85b657bef2
2018-10-31 08:30:50 +01:00
Mrozek, Michal 1dc3a94ac8 Remove not needed code.
Change-Id: I5b0fd2960ed7777bc7603013071a431af6d435c5
2018-10-30 15:40:08 +01:00
Maciej Dziuban dc4de3c31b Move trimResidency functions to WddmResidencyController
Change-Id: I046fd34d5336b767ed38eda31e58e4a35ceee5f8
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-29 12:19:50 +01:00
Milczarek, Slawomir 7b1d19eaec Moved header with engine node definitions
Change-Id: Iaa78bb0584589e354b1bb469b729844121decb8f
2018-10-27 14:51:02 -07:00
Artur Harasimiuk 6aa9b36a7b DebugVariables cleanup
- small cleanup
- files renaming to match convention

Change-Id: Iff9ed3a509001bcf6f154fc35f6d241ee9a968ae
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-10-26 17:55:25 +02:00
Mateusz Jablonski d5c9816428 Remove store allocation methods from memory manager
Move setGPUAddress method to WddmAllocation

Change-Id: I91d877c3791e9eff69276e4258e3ce9c3111ca45
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-26 10:53:43 +02:00
Mateusz Jablonski 129380c1a6 Cleanup host ptr manager
Change-Id: I0fc9df41a08255eef8072666c1c5c16806e0f7cf
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-26 08:26:38 +02:00
Maciej Dziuban bd431edb46 Return trimCallbackHandle from register method instead of storing in Wddm
Change-Id: Iddfb6a926311480e355d52e5bf3e6379ec96f7a9
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-25 17:17:52 +02:00
Maciej Dziuban 4aae1a817b Pass Wddm to WddmResidencyController
Change-Id: I2379ffdfb740a869f6d157ed22f40ce509d6bebe
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-25 17:16:41 +02:00
Kowalczuk, Jakub 8ead8f727f Control enabling of local memory based on OS and HW Capabilities
Change-Id: Ia26c856aeef27fe638b7a6e895cc289859f3c579
2018-10-25 16:36:47 +02:00
Mrozek, Michal 7319023b0f Add capability to use malloc for Heap32 base.
- shift page tables to lower bits

Change-Id: I54dcba72255215cf5be75ba425fc27727b0bfd98
2018-10-25 16:20:00 +02:00
Maciej Dziuban f374696f1d Move MonitoredFence to WddmResidencyController
Change-Id: Iac99e7d730fda26d13feed56d5e4c50adf115e51
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-24 09:35:42 +02:00
Maciej Dziuban 7fe0a0df06 Delete OsContext from FenceData
This decoupling is needed to move makeResidentResidencyAllocations into
WddmResidencyController, where we have only contextId, not the context itself

Change-Id: I0d79f1dc7a51fa6b1d713deb6e9003aa2b7be1d4
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-23 09:17:09 +02:00
Mrozek, Michal 77b00fa749 Do not execute trim callback if there are no registered contexts.
Change-Id: I9a274281a085cdbeb98a1d495ce9ef9ab897d08a
2018-10-22 18:53:13 +02:00
Mateusz Jablonski 7ec8e6a3f2 Fix naming convention in host ptr defines
Change-Id: I9f0d5790031b5067b92159b078768e560990b9c6
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-22 16:29:04 +02:00
Maciej Dziuban 44dd4c9145 Store vector of trim candidate list positions in WddmAllocation
Change-Id: I2fb247238802fc1ccd98e42d7714063f5231249f
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-22 11:50:09 +02:00
Mateusz Jablonski 3bd8d71f0a Don't call command stream receiver's cleanupResources twice
Change-Id: I9cce3eacbb805770658be91c55e1fa69dc4bae5d
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-19 15:31:01 +02:00
Mateusz Jablonski 36c8c6fd97 Correct casting GraphicsAllocation to DrmAllocation
Change-Id: I29d2e3989bc409e014888505a96119bdd7c322f5
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-19 14:49:38 +02:00
Maciej Dziuban ac2c2763ab Add osContextsCount argument to WddmAllocation's constructors
The argument is not anywhere yet, this is just a preparation
step for future change.

Change-Id: I5a441352cb5cf10d1a0ff31933041ff9521d0307
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-18 17:19:50 +02:00
Dunajski, Bartosz ef65e6433e Improve EnableTimestampPacket debug variable usage
Change-Id: I864f0dc756a7fe17a08d1bcca2d91e9b78fb730a
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-10-18 14:25:46 +02:00
Maciej Dziuban de5ed6509f Move WddmResidencyController to OsContext
Change-Id: If27d52617dec9b290b7eccc7cb4a6ae5037d7112
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-18 10:59:52 +02:00
Maciej Dziuban 9399215931 Unregister trim callback
Change-Id: Ia6592d259a573cbc7161443945d03f6a83e88181
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-16 16:55:15 +02:00
Mateusz Jablonski 4f028d13a1 Command stream receiver: use memory manager from execution environment
Change-Id: I236218a73bd7dac6e5744e3596f146b77b5ca1c8
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-16 12:14:55 +02:00
Napiatek, Henryk J 6d828e6653 Allow override of default platform Hardware Info Config
New string debug variable HardwareInfoOverride is used to
specify new Hardware Info Config to be selected, for example 1x4x8.

Change-Id: I6d939608e6551e4a9102e5ab2e08255ee4982933
2018-10-10 10:34:23 +02:00
Dunajski, Bartosz 66427f60c6 Handle TimestampPackets for non-kernel enqueues
Change-Id: I52ec4f43b10bf6e2a10b2455d32a90a606645d29
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-10-10 04:21:30 +02:00
Maciej Dziuban 07e03af67e Extract trimCandidatesList to WddmResidencyController
Change-Id: I8938ee79975caf9cb09f7183c87452dc94a6b3e6
2018-10-09 00:55:10 +02:00
Mrozek, Michal 12b4d44375 Add new debug flag to limit the number of returned devices.
Change-Id: I01e1b6804291956fb62b84ff5df68c57b51bd17d
2018-10-09 00:35:51 +02:00
Maciej Dziuban b2dd8a9a1d Create WddmResidencyController to encapsulate basic residency data
Change-Id: I6dd94405ca5ea3a13b137c1e0ead72e615d36e00
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-08 15:11:58 +02:00
Artur Harasimiuk a6d9e74851 Revert "Refactor of glcl sharing"
This reverts commit 51ecef7ec2.

Change-Id: Ia654fe0d50a2144371c3def7e768ef9707419c61
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-10-08 14:03:57 +02:00
Katarzyna Cencelewska 51ecef7ec2 Refactor of glcl sharing
new pattern to load gl functions from dll

Change-Id: I6f39945d3c53b5a169b0829f36b2102c3ef5e18a
2018-10-05 12:41:31 +02:00
Zdanowicz, Zbigniew bb62343aba Add new parameter to thread data dispatching
Change-Id: I86710b0cc764156f4c2db9d24ccd1c96b32d7660
2018-10-05 12:06:25 +02:00
Maciej Dziuban bc4700a193 Add OsContext argument to MemoryManager::makeNonResidentEvictionAllocations
OsContext has to propagate through following calls first:
- WddmCommandStreamReceiver<GfxFamily>::processEviction
- CommandStreamReceiver::makeSurfacePackNonResident

Change-Id: I7559c7406b2860c51905c9961cec251fac231b08
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-05 01:28:31 +02:00
Mateusz Jablonski 77bbd2b89b Don't access command stream receivers when vector is empty
Change-Id: I1011b94be1ec7f28b71659c27b09b93e577769e2
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-04 22:42:38 +02:00
Dunajski, Bartosz 2cd411227c Improve PageTableManager creation
Change-Id: If359c76ae880fb2e1f56fc561aca761530787b5e
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-10-03 22:37:05 +02:00
Mateusz Jablonski b602cd2bb8 Pass execution environment to memory manager
Change-Id: If43cf9d1353b4cbc02ea269fb9105c01cc4e0876
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-03 22:12:26 +02:00
Hoppe, Mateusz ce29770d61 Extend PhysicalAddressAllocator with page size and alignement
- this allows for reserving 64k pages or bigger with specified alignement
if required

Change-Id: I256d6c0d9e7fee0e2bac5f4ab5e4fd49ea9d8d50
2018-10-03 20:02:58 +02:00
Maciej Dziuban ea9e7bea31 Change MemoryManager::lastPeriodicTrimFenceValue to a vector
Also start registering OsContext to MemoryManager in
WddmMemoryManagerResidencyTest along with some cleanup in fixture's SetUp

Change-Id: I3f6763ae0cd9bf638cdc5dbbfbc60dfb0fd0ef05
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-28 06:33:12 +02:00
Dunajski, Bartosz 7a3515e882 Remove filename duplication
Change-Id: I570f8904ba2ca7b9f8509af33a8a29dcec424e3b
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-09-27 18:45:28 +02:00
Maciej Dziuban 95e4dc4152 Delete unneeded residency/eviction allocations mutators
Change-Id: Ic73ea4c4e3ebf422f935a440a1b4789fe1c15494
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-26 13:02:19 +02:00
Maciej Dziuban f48b90ffee Change CommandStreamReceiver::flush() argument to a reference
Change-Id: Ic933a297d4c4e243138d0d62323ba82a8b91240f
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-25 17:28:44 +02:00
Maciej Dziuban 9804bddd46 Change makeResidentResidencyAllocations argument to a reference
Change-Id: I7e8a73fdbe5371e29a53ec34201eddb42cb7f20a
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-25 11:34:16 +02:00
Mrozek, Michal e2ee839250 Limit unrecoverable scope.
Change-Id: I3967d64eb0fbae7d34268458568090c2305226f5
2018-09-24 12:41:59 -07:00
Maciej Godek b8e9251eeb Rename D3DFMTCLImageFormat to D3DtoClFormatConversions
Change-Id: Ie2be88e628963dd071272b03049a4d7586a4d5a1
2018-09-24 15:11:54 +02:00
Artur Harasimiuk 40146291ad Update copyright headers
Updating files modified in 2018 only. Older files remain with old style
copyright header

Change-Id: Ic99f2e190ad74b4b7f2bd79dd7b9fa5fbe36ec92
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-09-20 18:02:35 +02:00
Mrozek, Michal 78f828fcd1 Make residency in graphics allocation OsContext dependent.
- Graphics Allocation now holds residency control per OsContext.

Change-Id: Ie0a0d3aa9fdaf542fdd42dee3aba236a5af635c7
2018-09-20 16:44:04 +02:00
Artur Harasimiuk de2d5d7532 move CL-GL Sharing header to different folder
- rename file
- move to folder public

Change-Id: Ie3c14c5a2be0aec5809b322b9a0e2cebe0e3fc22
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-09-20 10:42:41 +02:00
Hoppe, Mateusz fe912704b8 Enhance AubTests with TBX server capability
- aub_tests started with "--tbx" option connects to TBX server
- CSR is created in dual mode: TBX + AUB to dump aub file
- with this enhancement it is possible to debug aub tests live

Change-Id: I0302f5f4bac4c293661a149f64888770dd49343c
2018-09-19 15:34:36 +02:00
Milczarek, Slawomir 65dc5fb7de Generate multiple devices in AUB and TBX CSR modes
This commit adds a capability for a driver to generate multiple devices
and hwinfo in AUB and TBX CSR modes.

Change-Id: Icc0eac7c16760d3d4ae6ef08cd0be950b45d35e7
2018-09-18 18:03:41 +02:00
Katarzyna Cencelewska 962b6ce883 Add support for cl-gl sharing
Change-Id: I08d7608722746baa3be61846e05eecb5419cc136
2018-09-18 11:18:46 +02:00
Mrozek, Michal f5a2b38fa4 Add new debug flag allowing to not register trim callback.
Change-Id: I615be3edc9d843fb7b37cf32f2abd5e2839d6ada
2018-09-18 04:48:22 +02:00
Maciej Dziuban ac1d2b9901 Change processResidency argument to a reference
Change-Id: Ie313a8cc4e479a314bcf170917397c13fbb70d14
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-14 13:36:20 +02:00
Pawel Wilma 01fa11ba4d Additional Wddm context flags
Change-Id: I6f0bfd721e4840f44414da49ebbb7df3539e5588
2018-09-14 10:11:04 +02:00
Maciej Dziuban da5a292e54 Delegate MemoryManager residency and eviction calls through CSR
MemoryManager::getEvictonAllocations()
MemoryManager::pushAllocationForEviction()
MemoryManager::clearEvictionAllocations()
MemoryManager::clearResidencyAllocations()

Change-Id: Iaa3051965bc9dfc09384e2bd5e9e0c372b5e722a
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-14 08:18:04 +02:00
Maciej Dziuban 7aa70248e8 Get rid of processResidency() calls with null ResidencyContainer 4/n
Change-Id: I318e0b2846a72d9cba4921ba62e0ea491cc46da9
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-13 15:12:20 +02:00
Maciej Dziuban fafde2ec15 Delegate all MemoryManager::getResidencyAllocations() calls through CSR
Change-Id: I9cfbfd86d39b5341598ff2bd8883e13605c58b72
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-13 14:56:06 +02:00
Milczarek, Slawomir a7d41d95b4 AUB subcapture in filter mode to define start/end indexes to a given kernel
This commit introduces new controls to define start/end indexes
that apply only to the kernel specified by name for a sub-capture

Change-Id: I7ad7674d115f9addd35c44d824aee0731060881e
2018-09-13 11:13:33 +02:00
Dunajski, Bartosz 53c4d2946e Update Wddm23 interface
Change-Id: I8c1484875f28dd7f2591db810c64b117f49f70e3
2018-09-13 09:55:15 +02:00
Mrozek, Michal 789cb3327b Add support for returning raw GPU timestamps via registry flag.
Change-Id: Id80ef2a95132f1cdc1d14e45d406925b11599db1
2018-09-12 13:49:01 +02:00
Mrozek, Michal 581805cc88 Move OsContext id setting to constructor.
Change-Id: I1b809befc02536257800e3667307b8deabd5c95d
2018-09-12 09:50:26 +02:00
Maciej Dziuban f1a264e380 Get rid of processResidency() calls with null ResidencyContainer 3/n
Change-Id: I526cac86f7e4eb61f7962d1ddd33a5d029451111
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-12 06:43:49 +02:00
Venevtsev, Igor ed4e1e9c3e Add enableLocalMemory param to WddmMemoryManger constructor
Change-Id: I89299c01f11565ab57a8421573a287c9a2e77b6e
2018-09-11 19:04:59 +02:00
Pawel Wilma 8c1db4fb2f Code cleanup for reduced GPU address space
Change-Id: Ibce79ddbe1f03dac1813b5dc2356a9db86b60200
Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
2018-09-10 16:16:06 +02:00
Hoppe, Mateusz cfa8035836 Add localMemorySupported member to MemoryManager
- extend constructor to take new flag
- extend ExecutionEnvironment createMemoryManager with new flag
- only OsAgnosticMemoryManager changes in this step

Change-Id: I1dae4fd79fe28fd87e42b237600dc216c94b597e
2018-09-07 12:04:21 +02:00
Mrozek, Michal ac2a2de3be Enhance ResidencyData to work with multiple OsContext
- Add new method updateCompletionData to register completion fence and context
- remove obsolete methods and fields
- for trimming choose default 0 OsContext

Change-Id: I0f6c7af9499a454a70ad1c5b0fa2766416eba297
2018-09-07 09:09:58 +02:00
Mrozek, Michal df41112b6a Do not wait on CPU for fence.
- If allocation is passed for destruction it means that it is ready to
be destroyed, there is no need to wait for tag.

Change-Id: I6b85ed62250aca8ee6293956b6178ce19bdb1f30
2018-09-07 06:56:38 +02:00
Mrozek, Michal cb2b45625a Assign numerical value to OsContext.
- will be used for all array based accesses.

Change-Id: If93efc874f05780d60573fe8359beccea8ff0f77
2018-09-07 06:49:53 +02:00
Stefanowski, Adam 8a005434f4 [1/n] Initialize WDDM only once
- remove Wddm parameter from WddmCommandStreamReceiver
and pass it via ExecutionEnvironment
- remove drm parameter from DrmCommandStreamReceiver
and pass it via ExecutionEnvironment
- remove void parametr from TbxCommandStreamReceiverHw

Change-Id: Ib76332f1341339426e86e0ce2b6ce96919219881
2018-09-06 14:14:29 +02:00
Pawel Wilma 4a12deea2b Add support for reduced GPU address space
Change-Id: I9ebbc8c51039bb533b44c6b80e717e1489a20a43
Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
2018-09-03 13:51:36 +02:00
Venevtsev, Igor f6743ced2a Remove reuseBO from createGraphicsAllocationFromSharedHandle
Change-Id: Ia7af1cdd8e3986b8af7c542032d2767303865382
2018-09-03 13:38:19 +02:00
Mateusz Jablonski 92bfd2e3d2 Move OsContext to Device
Change-Id: I030b65372fbdc075423d22720e9da34ac65b8e68
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-09-03 10:42:26 +02:00
Maciej Godek 1d7d376262 Sharing format query for Intel/DX9
Change-Id: I600872be34ff41c3be06679d83e788c66f635e83
2018-08-31 18:20:42 +02:00
Hoppe, Mateusz 31d3cc847c Rename setupGtSystemInfo to setupHardwareInfo
- adding new parameter for FeatureTable setup

Change-Id: I1f1c66894555003612e08127801c6b096b0a2400
2018-08-29 16:24:16 +02:00
Zdunowski, Piotr ad65477868 Fix crash caused by missing residency data.
Change-Id: Ib615e3b13382950ec8ecc128bea0032a126666e0
2018-08-29 12:46:50 +02:00
Dunajski, Bartosz 02611dc953 Retrun valid status on createAllocation64k fail
Change-Id: Iaaed107c995a79125236196b6a956696dfe20875
2018-08-28 19:57:19 +02:00
Dunajski, Bartosz a807b9a90b Initial implementation of Timestamp Packet write
Change-Id: Ic498bcf9795f54fbb5fb5a8d07ed17fa70dc4f1a
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-08-28 08:27:13 +02:00
Mateusz Jablonski 4b29b30db1 Add OsContext class in shared code
Change-Id: If5aea2126abe1b892068af9ca53e7f448e5b85a6
2018-08-27 09:20:09 +02:00
Milczarek, Slawomir b59e3aec14 AUB capture - add control to configure file name
This commit adds the AUBDumpCaptureFileName control to configure from outside
a file name with an optional path where to save the AUB capture into.

Change-Id: Ibf2f7663e23ad9e1001896b0c5b7030f9979dae2
2018-08-23 22:31:03 +02:00
Mateusz Jablonski 9ac3529c6b Remove template parameter from Wddm methods
Change-Id: Icd700c7215184d4c0f9564c61868a1f9f29a75e5
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-08-23 16:37:31 +02:00
Mateusz Jablonski deaaa908a4 Extract Os Context from Wddm and WddmInterface
Change-Id: I13a52fc466a14f4bd28876d3c47884dc596f2b58
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-08-23 09:07:57 +02:00
Milczarek, Slawomir 393c2219c9 Add device callback for GMM library to notify AUB subcapture
This commit adds a new callback to be called by GMM library
when it allocates/deallocates compressed resources to collect data
about their addresses and sizes and handle their AUB residency.

Change-Id: I075d3ff4cb049cfe626da82892069c4460ea585c
2018-08-20 14:38:42 +02:00
Mrozek, Michal 931ed38a57 [3/n] Wddm Cleanup.
- remove different flavors of Wddm
- rename files for better meaning
- remove unnecessary files
- remove unnecessary methods

Change-Id: I73a35e186a9a99169260bb157958ff795b36e20d
2018-08-16 10:07:24 +02:00
Mrozek, Michal 077134faf4 Add debug flag to loop at initialize.
- This is to help debugging applications that requires attaching to them.

Change-Id: Ia7923c231b925ab9a473a70fb5fcc13fd99db1ca
2018-08-16 09:57:49 +02:00
Hoppe, Mateusz 5be98e2e0f Fix VA sharing scenario
- make createGraphicsAllocationFromSharedHandle and
freeGraphicsMemory more threadsafe - there was race condition
where one thread called PRIME_FD_TO_HANDLE ioctl when the other just
closed the last handle with GEM_CLOSE ioctl. This led to situation
where newly acquired handle from PRIME_FD_TO_HANDLE was already invalid
and used in exec.

- adding mutex for the time of accessing shared handles container
 and ioctls (GEM_CLOSE and PRIME_FD_TO_HANDLE) resolves racing problem

Change-Id: I8417a036a1429be8f1ba97e63ebdda2707960564
2018-08-14 15:00:16 +02:00
Hoppe, Mateusz 22f80a8a2c Add logging to VA sharing api
Change-Id: I5c68995db4d2dcde9505210030d9c63b5e86ddbd
2018-08-14 14:15:35 +02:00
Mrozek, Michal 6c5875f805 [2/n] Initialize Wddm interface in Wddm init.
Change-Id: If7184e64df54b4e6840970fec67cb5bc11909b7c
2018-08-14 11:02:27 +02:00
Mrozek, Michal d51c7ccdd4 [1/n] Move different wddm functions to dedicated helper.
- This is first phase of moving wddm specific internals to Wddm
Interface helper
- Instead of having 2 different wddm classes driver will route interface
specific functions to dedicated helper
- Helper will be initialized when interface version will be known,
therefore we would not need to initialize wddm multiple times

Change-Id: Ic71788ccb2f8a71bf2f3f3c2a04117f16417d85e
2018-08-14 09:08:25 +02:00
Stefanowski, Adam 8598168355 Remove programCount from device
Change-Id: I4edfabadd73166a27db73a120fc1380de52a33a5
2018-08-13 13:45:55 +02:00
Mrozek, Michal 9632d18071 Use make unique to construct an object.
Change-Id: I4fd944869238c0a4c38676160cb752d523dc07a1
2018-08-10 18:06:49 +02:00
Mrozek, Michal ae9134233d OsInterface cleanup.
- OsInterface is now a part of execution environment
- it is created when getDevice is being called
- move ownership of wddm from Wddm Memory manager to OSInterface
- reuse osInterface on Linux in Command Stream Receiver
- currently OsInterface is not reused upon command stream receiver creation
on Windows this will change in further commits.
- make enumAdapters non static function

Change-Id: I10f36c01e6729f48653e3b5c11cbc32e811ce754
2018-08-10 14:25:53 +02:00
Kowalczuk, Jakub 571babf1d5 Add new macro _RELEASE_BUILD_WITH_REGKEYS
Change-Id: I679a17e99d7928b3caf10f80a581fb386aaf7751
2018-08-10 11:17:22 +02:00
Mrozek, Michal 9776868aff Remove not used debug variable.
Change-Id: I6e3a7d1340096383101b84148d772afd2d4f304e
2018-08-09 16:12:44 +02:00
Slawomir Milczarek 285af96dc2 getCpuGpuTime to return false when unavailable
This commit addresses crash issue in AUB standalone mode
when queue profiling is enabled on Linux platform.

Change-Id: Ie2d02093d3628efac3a8925890f22afd6a49469d
2018-08-09 10:10:47 +02:00
Katarzyna Cencelewska e4f986a283 Add missing API_ENTER and DBG_LOG_INPUTS logging functions in api_win.cpp
Change-Id: I7d604e2b6fbb9480a6f8949b64b7eba1fe34fe8b
2018-08-09 09:34:36 +02:00
Mrozek, Michal 1599ea800e Pass execution environment to command stream receiver.
Change-Id: I598f67f8b005b5ce8249b638e080657eb6dc3547
2018-08-08 17:10:39 +02:00
Mrozek, Michal d17879d412 Pass ExecutionEnvironment to get devices.
- this would allow for further re-use of objects allocated here.

Change-Id: I73b62ae3991ebd786dea3c085e1391194b8de6ba
2018-08-07 15:17:06 +02:00
Mrozek, Michal 4eb2e64231 Remove OsInterface creation from getDevices on Windows.
Change-Id: I33a141803c336eeaaa6b2702b92515420de97cc1
2018-08-07 14:41:31 +02:00
Mrozek, Michal dd407a3bf1 Move header setting to Wddm csr creation.
- This is constant setting and will not change in device lifetime.
- This is a part of device removal from memory manager.

Change-Id: Ib80559bac67d65c1bcc488fb033be7343839a108
2018-08-07 10:35:40 +02:00
Hoppe, Mateusz 4cb408294c Add useSystemMemoryPool flag to Gmm
Change-Id: Ide27887de9169a9d958d3f232bcd70a1b7afe94f
2018-08-03 12:52:23 +02:00
Mateusz Jablonski 89cf7532ea Make all gmm helper members non-static
Change-Id: Idb399aa275d66905040b6317d3888c94ffb98c55
2018-08-03 08:25:44 +02:00
Hoppe, Mateusz e1eaf3ded0 Fix bug in VA sharing multithreaded scenario
- createGraphicsAllocationFromSharedHandle was not threadsafe,
instead of reusing BufferObject for a single handle when
multiple threads were creating memory objects from a single VASurface,
new BO could be created and placed in container with BOs for reuse.
This was leading to errors in ioctl calls.

- add lock for following set of operations:
 1. find BufferObject with a given handle in container
 2. create shared BO when not found
 3. add shared BO to container
 prevents creating multiple BOs for a single handle

- replace recursive mutex with regular mutex as mutex shouldn't
be locked recursively

Change-Id: I0937e2abf3bf1c672c6d77422d46e441f7216a68
2018-08-02 12:55:05 +02:00
Katarzyna Cencelewska 00a62f204a Add missing API_ENTER logging in functions:
clGetPlatformIDs, clIcdGetPlatformIDsKHR,
 clGetPlatformInfo, clGetDeviceIDs,
 clCreateSubDevices, clRetainDevice,
 clCreateContextFromType

Change-Id: I571b036cc6b64a66d768d7f3f8eb55e7d69b9aa7
2018-08-01 14:29:10 +02:00
Hoppe, Mateusz 4441387969 Refactor allocateGraphicsMemoryInPreferredPool
- extend AllocationType to code necessary flags
- remove redundant args
- refactor Buffer::create()

Change-Id: Ic4b2e0931fad8198ad1cf4f79de210d815048ccf
2018-07-31 08:05:55 +02:00
Stefanowski, Adam 16b7cd1a75 Move debug variables to new location
Change-Id: I2311f9b3f7bbe1a319c25ae3a99e5c41452faf90
2018-07-30 11:22:02 +02:00
Mateusz Jablonski 6618a35126 Remove static gmmlib support on Windows
Change-Id: I9e52f11b196ef9364b710766d9dd302e4dc0cc64
2018-07-24 10:02:03 +02:00
Dunajski, Bartosz 512978768e Pass renderCompressed information to GMM for 64kb allocations
Change-Id: I56302055c028e919bceeb3333557cab7451e1d09
2018-07-23 11:28:43 +02:00
Mateusz Jablonski 8537c7f42f Use types of gmm dll functions in gmm interfaces
Change-Id: I91bd9563abbcde32a0c88066a2f6747c1d5abc81
2018-07-23 10:07:27 +02:00
Mateusz Jablonski 8ed9991910 Remove not used function, unify gmm interface filenames
Change-Id: I017697ec4076ddd47f2039f71805a895d687c8a9
2018-07-23 09:09:47 +02:00
Mateusz Jablonski 56557ca3a3 Unit tests: Initialize gmm before wddm initialization
Change-Id: I751bd93248aa78731b9591f494eafcd12d3e6d82
2018-07-20 15:47:15 +02:00
Hoppe, Mateusz f125c8ff45 Add allocateGraphicsMemoryInDevicePool
- do not always expect failures in tests with failure injections
there is retry mechanism for some cases

Change-Id: If7589d2dacc41216d2f3b08f861209bbab179615
2018-07-20 13:00:00 +02:00
Mateusz Jablonski 96e3163386 Prepare to use gmm dynamic lib on Linux
Change-Id: Ie1b0c8fe13c4e044f1f2b0651349840d2850f423
2018-07-19 01:04:52 +02:00
Dunajski, Bartosz 1c0f90b194 Improve renderCompressed flags usage
Change-Id: Ib5fd8e078dba0f19dd65bc8cdc6cded771e559a2
2018-07-18 19:55:52 +02:00
Hoppe, Mateusz 407227959a Add memoryPool to GraphicsAllocation
- new ExtendableEnum struct that serves as enum but can
be extended with values
- decrease dependencies on graphics_allocation.h header -
 use forward class declaration when possible
- memoryPool indicates what kind of memory is allocated
for a given GraphicsAllocation

Change-Id: I7a707c28dc4544cc73abc5f0ed5263ba5be17452
2018-07-17 20:10:33 +02:00
Mrozek, Michal d2e820aac8 Enhance validation in sharing scenarios.
Change-Id: I590c5d66602749fb5702e414ccf2b1acec3bc9e7
2018-07-17 19:47:54 +02:00
Mrozek, Michal 07031518dc Add error handling in d3d9 sharing scenario.
Change-Id: I3f337b633514d90298f03a9fa486757026137151
2018-07-17 19:25:36 +02:00