Commit Graph

408 Commits

Author SHA1 Message Date
Piotr Fusik 87bb6afa56 Move stamps allocators from memory manager to CSR.
Change-Id: Ib399e462cdddad89fcc470df4c4f0f5e4591a6b2
2018-11-27 14:52:06 +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
Dunajski, Bartosz 7781089740 Allow Device creating multiple CSRs [4/n]
- Introduce additional RCS engine
- Set fixed size for Engines array

Change-Id: I06533a425684b64214f956783b07877e6157935b
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-26 09:40:44 +01:00
Dunajski, Bartosz 706d9f8070 Allow Device creating multiple CSRs [2/n]
Create new OsContext per CSR

Change-Id: I8dad7fc1ab450e560f78eba3152b5913791e59a3
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-22 14:29:44 +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
Dunajski, Bartosz af46d88fc1 Allow Device creating multiple CSRs [1/n]
Change-Id: Ie5d8d89aa388c608d5464919059c28a054ac9b1e
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-21 12:37:25 +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
Dunajski, Bartosz d6870a896b Reduce tag pool size to 1 for AUBs
Change-Id: I3a3513250b10e899795e149bff2739193a725f84
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-20 11:42:32 +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
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 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
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
Maciej Dziuban 5e75027735 Fix WddmResidencyControllerWithGdiTest fixture
Gdi was not mocked during WddmResidencyController creation

Change-Id: I48761d8dd81e52d16b2b2d7f5aad71506383ad6d
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-11-10 01:29:28 +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
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
Mrozek, Michal 200228b506 Replace cpuPtrAllocated flag with driverAllocatedCpuPointer.
Change-Id: Ic0ce165d0e583701e1128595a3d9dabd0a61a84b
2018-10-31 12:37:20 +01:00
Mrozek, Michal 5b2e16651f Remove alignedSize from WddmAllocation.
Change-Id: I3b610515e4d5db16ce6a604e7e2f4b85b657bef2
2018-10-31 08:30:50 +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
Jacek Danecki ebe851e6d9 fix typo in function name
Change-Id: I629ce616aefa74821ddde9f6e9ab32e50dc8c624
Signed-off-by: Jacek Danecki <jacek.danecki@intel.com>
2018-10-26 16:04:12 +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
Mrozek, Michal e128cb7a7c Make sure that non null handle is returned from registerTimNotificationMock
Change-Id: I8eca792fb6938150fa0629b11e84f94c0a736a56
2018-10-26 06:43:44 +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
Mateusz Jablonski a531751001 Remove ULT code from runtime
Change-Id: I2faf52070f980d031788fc6946df8534d96c639b
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-24 17:45:08 +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
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
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
Mateusz Jablonski 8a9d0a81df Move temporary and reusable allocation lists to command stream receiver
Change-Id: I40df6fe39b367e243e3710c5fdeaab3c85198d9d
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-11 15:32:12 +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
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
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
Mateusz Jablonski 9a1adc3095 Remove scenarios with memory manager with null csr
Change-Id: Ie151bf3d16c5d994f154c8f9ac3db43702a4798c
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-02 21:43:21 +02:00
Maciej Dziuban 41e8d70363 Change makeSurfacePackNonResident argument to a reference
Change-Id: Ic95ad2406184e91a78c152fad3fe6f0f4ebb24ae
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-28 18:08:18 +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
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
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
Venevtsev, Igor 7c94409ce8 Change MemoryManager::allocateGraphicsMemoryInPreferredPool() signature.
Remove allocateMemory param.
Add AllocationFlags and DeviceIndex params.

Change-Id: I3ba048f8ea9840a047a3222dc1e97be2105c2222
2018-09-20 13:04:21 +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
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 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
Maciej Dziuban 81a1e435f9 Delegate all MemoryManager::pushAllocationForResidency() calls through CSR
This prepares for moving this method from MemoryManager to CSR.

Change-Id: I82393289c48990f26ed3ac922bcd64e2b6c11f28
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-13 14:33:16 +02:00
Dunajski, Bartosz 53c4d2946e Update Wddm23 interface
Change-Id: I8c1484875f28dd7f2591db810c64b117f49f70e3
2018-09-13 09:55:15 +02:00
Mrozek, Michal 581805cc88 Move OsContext id setting to constructor.
Change-Id: I1b809befc02536257800e3667307b8deabd5c95d
2018-09-12 09:50:26 +02:00
Mrozek, Michal 8e33ec04c5 Create separate command stream receiver for every device.
Change-Id: I8073380941e2a3bfe57610e6e437bdc177dcc2d5
2018-09-12 09:32:41 +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
Mrozek, Michal 377b99be90 Pass device index to create method..
Change-Id: Iab493edf1b96a6cecf6e3dba6813824529f0c08b
2018-09-11 16:26:54 +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
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
Dunajski, Bartosz 02611dc953 Retrun valid status on createAllocation64k fail
Change-Id: Iaaed107c995a79125236196b6a956696dfe20875
2018-08-28 19:57:19 +02:00
Mateusz Jablonski deab9a33cd Move os context tests to os interface tests
Change-Id: I409d988c6c561bca6fc6dcb0ff16583131f0cf5a
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-08-28 08:58:06 +02:00
Mateusz Jablonski 4b29b30db1 Add OsContext class in shared code
Change-Id: If5aea2126abe1b892068af9ca53e7f448e5b85a6
2018-08-27 09:20:09 +02:00
Mateusz Jablonski 7cecedae45 Unit tests: Move initialization of Wddm to fixture's SetUp
Change-Id: I3d3fa30d5aebf4069c1726a21f537a3d40799793
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-08-24 14:31:27 +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
Stefanowski, Adam 1ad70dfebe Decouple memory manager and device
Change-Id: Ia64cc955e1d290cad4c50b6a2a41052d9acf0eec
2018-08-20 13:44:31 +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 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
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
Mrozek, Michal 1599ea800e Pass execution environment to command stream receiver.
Change-Id: I598f67f8b005b5ce8249b638e080657eb6dc3547
2018-08-08 17:10:39 +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
Mrozek, Michal 6f251f5ea1 Fix TBX completion loop.
- resources are dumped in make non resident call
- in order to dump correct data we need to be sure that GPU is done processing
- waiting needs to be unconditional to handle all cases
- remove not needed parameter to makeSurfacePackNonResident

Change-Id: Ib2b065d486cd3a5d86e599c51b24f3c958c3a10b
2018-08-03 09:32:24 +02:00
Mateusz Jablonski 89cf7532ea Make all gmm helper members non-static
Change-Id: Idb399aa275d66905040b6317d3888c94ffb98c55
2018-08-03 08:25:44 +02:00
Mrozek, Michal f60847b64e Pass device to flushTask.
- do not obtain it from memory manager

Change-Id: Icc7c03dc925c69ec5932c5812151ac28dc34d20d
2018-08-01 14:11:06 +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
Chodor, Jaroslaw c5becf63f7 Forcing llvm as intermediate for Link, CreateLib
Link and CreateLibrary will use llvm IR as
intermediate representation always

Change-Id: I370e92ee258d997f04f40320ab4a478970ee22bd
2018-07-30 17:15:21 +02:00
Mateusz Jablonski a906ddaa66 Make gmm client context non-static member
Construct platform and initialize gmm in each test

Change-Id: I4f209369e77213420308f31f911b7a569ea93283
2018-07-27 00:16:30 +02:00
Mateusz Jablonski ab7920ba14 Gmm Memory: initialize client context in constructor
Change-Id: Iaaa40f5485faceb022e018be7930777e14575b46
2018-07-23 12:27: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 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
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
Mateusz Jablonski 36db75da28 Create gmm client context wrapper, reduce mock_gmm
Change-Id: I4eec4366afeb175fea4bf7934e3046b50fe30fe9
2018-07-17 11:46:04 +02:00
Mrozek, Michal 0abacce160 Move tag allocation destruction to command stream receiver.
Change-Id: I657df755c6cdd695103769a45a8dce749f7bd545
2018-07-16 13:12:53 +02:00
Dunajski, Bartosz a8ce3ca00a Wddm: Use GMM allocation size during map GPU VA
Change-Id: Ie10898db7c539ce5025ab4a6d658d6e593e94c50
2018-07-13 08:03:57 +02:00
Hoppe, Mateusz 55a045ebe1 Refactor graphics memory allocation scheme
- replace createGraphicsAllocationWithRequiredBitness with more general
methodallocateGraphicsMemoryInPreferredPool based on passed
 AllocationData
- proper flags for allocation selected based on AllocationType

- remove allocateGraphicsMemory(size_t size, size_t alignment)
and use allocateGraphicsMemory(size_t size) instead where default
alignment is sufficient, otherwise use full options version:
allocateGraphicsMemory(size_t size, size_t alignment,
 bool forcePin, bool uncacheable)

Change-Id: I2da891f372ee181253cb840568a61b33c0d71fc9
2018-07-11 15:48:05 +02:00
Hoppe, Mateusz 684b1d75ba Refactor GraphicsAllocation::AllocationType and allocationType enums
- change GraphicsAllocatoin::AllocationType to scoped enumeration
so that ALLOCATION_TYPE_ prefix in every enum value can be removed
- all accesses are typed (example AllocationType::IMAGE)
- Rename allocationType to AllocationUsage to eliminate confusion
with multiple AllocationType enums / types

Change-Id: I16003297ecfcb0aaa5779ad00706c5d983914bbe
2018-07-06 13:00:08 +02:00
Mateusz Jablonski 94dbdb602d Add instance of gmm helper to execution environment
Change-Id: I1b044611fbad91fbb681ba233938f41502f29056
2018-07-06 08:48:19 +02:00
Hoppe, Mateusz 64277ee849 TBX CommandStreamReceiver fix for makeCoherent
- makeCoherent should be called after TBX finished processing
 - this is when tagAddress is updated with taskCount
makeCoherent is called from makeNonResident which is invoked just
after flush and may happen before TBX server finished processing
leading to invalid data to be read back to CPU accessible memory

- this fix adds waiting for taskCount to blocking calls for TBX CSR
before calling makeNonResident on surfaces to guarantee correct data
from TBX server is ready.

Change-Id: I498a5454e0826eec2a5413a08880af40268550e1
2018-07-04 12:04:32 +02:00
Stefanowski, Adam 8fd7f6a8ce Passing the capabilityTable as a reference to the constructor
previously we couldn't add new variable to capabilityTable structure
becasue then we get too large function argument passed by
value

Change-Id: I162967ba195ec18fc781d127012f82e8876913a6
2018-07-03 16:51:17 +02:00
Dunajski, Bartosz e26d67cde3 Aux surface programming for Buffers [1/n]: Gmm interface improvement
Change-Id: I984b8ebee27808a236217e82bb4e910550d624c4
2018-07-03 13:00:08 +02:00
Milczarek, Slawomir 86565e5f06 AUB subcapture in toggle mode to be controlled with HKCU regkey
- move AUBDumpToggleCaptureOnOff from HKLM to HKCU without admin rights
- fix AUB subcapture in toggle mode to call make resident in standalone mode

Change-Id: Ia6971921f33bb9ca63112790af870217da8a1585
2018-07-03 12:56:06 +02:00
Koska, Andrzej 3548876263 Setting the GpuAddress from a fragment in createGraphicsAllocation
Change-Id: I4d60aceea96dfbe50b2af4a1fbaada6a150ddd35
2018-06-29 16:13:29 +02:00
Mrozek, Michal 815151cb94 Simplify memory manager interfaces.
- Remove one function that routes to another function.

Change-Id: I44c17bf51abaf3aebf0692086de0f38e0693ab59
2018-06-29 15:39:10 +02:00
Dunajski, Bartosz e18e9fb94e Move static methods from Gmm to new GmmHelper class
Change-Id: I84fbe94f0e1072324164086b456c71a46ae5040c
2018-06-27 16:46:09 +02:00
Koska, Andrzej 4a4ad6460c Revert: Setting the GpuAddress from a fragment in createGraphicsAllocation
Change-Id: Ifd0a26f58b748df5e43e57b4e0be6b94c2051890
2018-06-26 17:05:26 +02:00
Koska, Andrzej b563e07394 Setting the GpuAddress from a fragment in createGraphicsAllocation
Change-Id: I4f6afbdd4d86ab2958de29cf49aaed9b8e2ea642
2018-06-26 14:43:08 +02:00
Godek 24ba7a0dbf using mock registry in Wddm23Tests
prevent reading from Windows registry in unit tests

Change-Id: I83f5d6f1db03aac4bc09665f8900606c07e757a5
2018-06-25 13:52:36 +02:00
Mrozek, Michal e47344ec0e Add debug flag CreateMultipleDevices.
- This flag allows to create multiple devices from the same GPU

Change-Id: I4b80e4759543ca4559549b2d26c5ddef241f9ebb
2018-06-20 18:33:32 +02:00
Koska, Andrzej e15c2b899f Setting the right handle value in fragment
Change-Id: Idcbdce5fc686360f252c8db0423ae77d9155702e
2018-06-15 16:36:52 +02:00
Artur Harasimiuk 75ab0c6fe1 Switch clang-format to 6.0
Change-Id: Id96d1f47fb3d479d10d1022f1259dc030a148192
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-06-14 09:45:00 +02:00
Dunajski, Bartosz 3a369ad500 Improve Wddm creation
Pick interface version basing on Ftr flag

Change-Id: I09880610922a6d451fc6f414a4fa5857449bc0f4
2018-06-14 09:06:40 +02:00
Mateusz Jablonski 98b8b4b6a4 Prepare to use gmm as dll on Windows
Since this commit neo on Windows can use static or shared gmm lib

Change-Id: I7db70d7f9bc969e8193ac77e8b6d65ecc57d0093
2018-06-08 17:35:01 +02:00
Koska, Andrzej fe56c57318 Tracking the internal allocation when creating a buffer
This fix prevents the creation of a buffer from the pointer
obtained from clEnqueueMapBuffer

Change-Id: I203f2d5263eeb02fe0d73bc9db159438af3cf1fc
2018-06-08 07:33:07 +02:00
Zdunowski, Piotr 4f3e03b560 Forbid copying of objects when it could cause memory leaks.
Change-Id: I079345fb0bf74babb7aa072ddee4f3a853e2572c
2018-06-05 18:32:40 +02:00
Stefanowski, Adam a7520e7a3d setting unique file names for the rest of the cpp files
Change-Id: I34f168714e6f66611bee0a755621aeeea0ddc13f
2018-06-04 08:29:55 +02:00
mplewka 95e5aba86a Decode sip binaries once for all tests
Change-Id: I05a54146dc1aa893c5217f60f3b4ca47ded03019
2018-05-29 13:47:19 +02:00
Dunajski, Bartosz 71b844f522 Wddm interface [7/n]: Add 2.3 interface with HW queue support
Change-Id: Ia0e829b8616b7060e39170aea0f1d2f123d73399
2018-05-24 10:26:58 +02:00
Mrozek, Michal d2817427af Remove createInternalGraphicsAllocation function.
- Route directly to allocate32BitGraphicsMemory

Change-Id: Ia6872bae655c530ff06b0ec270f419ca91d005ce
2018-05-21 04:11:43 +02:00
Dunajski, Bartosz 430f6def75 Wddm interface [5/n]: cmake improvements to find all existing source files
Change-Id: I2f3f004b964f472085a1f036b40f0552489ac288
2018-05-16 14:57:14 +02:00
Dunajski, Bartosz ef76b9ddc4 Wddm interface [6/n]: Add debug variables
Change-Id: Ia4a6b25f2c5b0a230e7344f34822197e90d45ff3
2018-05-15 15:19:53 +02:00
Dunajski, Bartosz e4857867a9 Wddm interface [4/n]: Make 2.0 default version
- Create Wddm20 interface by default for runtime and ULTs
- Add Windows dll test for Wddm creation

Change-Id: Id0a1b86e68112c31078b6965c647a5218790150f
2018-05-15 09:16:28 +02:00
Hoppe, Mateusz baa7640c90 Rename MemoryType enum to AllocationOrigin
- better describes the meaning of INTERNAL and
EXTERNAL allocation types

Change-Id: Iacb97f5a9d63f45b60bc404cc6dd32c7ebd72ab3
2018-05-14 12:38:52 +02:00
Dunajski, Bartosz bab9ad6cda Wddm interface [3/n]: Improve constructing Wddm object
- Only Wddm object owns Gdi
- Dont pass Gdi object to constructor
- Move Wddm related files to new directory

Change-Id: Iadd26634c7692db760d7d3367211c32d2c2c8121
2018-05-10 17:14:25 +02:00
mplewka 2bc2869fe1 Refactor ult's for preemption enabling part 2
Change-Id: If8e335e87f3a78d35cab12a17880fb1922d479f5
2018-05-10 13:12:03 +02:00
Dunajski, Bartosz 3a5227f9a0 Improve MockGmmMemory usage
Change-Id: I5edfe5a09c743d1672631a62be588e2aed55fd46
2018-05-10 11:58:27 +02:00
Dunajski, Bartosz 46003145e9 Gmm interface update
- Use local gmmClientContext instead of pGMMGlobalContext
- ResourceInfo and PTmanager creation from gmmClientContext
- Mock Gmm context creation in Wddm to have only one instance per run

Change-Id: I67e015c57f0ab5524564760fd9a849615615697f
2018-05-10 08:51:46 +02:00
Dunajski, Bartosz 44e54ef69b Wddm interface [2/n]: Move WddmMock to igdrcl_mocks + more cleanup
Change-Id: I993312c1e17fb474e142424b154666f8af6a4170
2018-05-08 15:57:38 +02:00
Dunajski, Bartosz d33866b027 Wddm interface [1/n]: Wddm fixture cleanup
Change-Id: I9ef300ba6f0abe7659683ee96730621a9b57ea85
2018-05-08 13:14:55 +02:00
Dunajski, Bartosz 224676bc2d Change return type of Wddm::createContext to make init more consistent
Change-Id: I113dbd636c2ed11ba76333021535160e46cb7116
2018-05-07 13:08:50 +02:00
Pawel Wilma a0c044e6d2 Extend batch buffer flattening in AubCSR to BatchedDispatch mode
- batch buffer flatening in batched mode
    - added MI_USER_INTERRUPT command
    - added GUC Work Queue Item

Change-Id: I35142da34b30d3006bb4ffc1521db7f6ebe68ebc
2018-04-26 12:45:02 +02:00
Artur Harasimiuk 5fbdad88c6 refactor config.h usage
- add defines to command line
- remove most occurences of include "config.h"

Change-Id: I19d65d83c895fc6143d319d057a50e5ae3e78830
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-26 10:02:15 +02:00
Hoppe, Mateusz 83160213f0 Fix problems in thkWrapper and SharingHandler
- ThkWrapper had uninitialized mFunc member, setting it
to nullptr

- D3DSurface could dereference null image pointer,
adding validateUpdateData method in SharingHandler
that may return CL_INVALID_MEM_OBJECT if memObject is invalid

Change-Id: Iaa4499bcea47baca156c9d28be4c93ba4f0e1ebb
2018-04-19 15:04:38 +02:00
Mrozek, Michal 59df78cc18 [32/n] Internal 4GB allacator.
- Ensure that heaps passed as IndirectHeap to flushTask

Change-Id: Ib633e3d3027e142a1fdb51e78b970fb1bd1b9b0c
2018-04-18 08:49:08 +02:00
mplewka 079f94cd2d Refactor ult for preemption enabling
Refactoring in ULTs around preemption:
    -refactoring ULTS to not fail with default preemption mode
    -fixing ULT memory leaks observed after enabling preemption
    -mocking getSipKernel in ULTs (to minimize ULT execution time)

Change-Id: I194b56173d7cb23aae94eeeca60051759c817e10
2018-04-16 12:55:30 +02:00
Koska, Andrzej b0a6d9131a Making DSH and IOH always resident
Change-Id: Ib114b92cb5ee153f213c15c935f8f1d1cfeb46eb
2018-04-13 12:35:15 +02:00
Dunajski, Bartosz acf97999f3 Force Kmd Notify timeout for Windows machines running on battery
- This is to improve battery usage while waiting in busy loop on CPU
- New Kmd Notify helper to maintain dynamic parameters
- Ask OS about battery status on longer waits
- Pick different timeout when using battery and optimization is disabled

Change-Id: I5f9c8c5a9c635652aac27c707f2b55933947a7fb
2018-04-12 10:03:10 +02:00
Zdanowicz, Zbigniew 9bc11a7f48 Adjust PLATFORM values for a given Product Family
Change-Id: I4522df78060861b6f91ac5f125cf6b11023f1509
2018-04-05 10:07:38 +02:00
Maciej Dziuban f4af035ab7 CapabilityTable adjustments part 2
- Move Windows HardwareInfo configuration from DeviceFactory to HwInfoConfig
- Add ULTs for HwInfoConfig on Windows

Change-Id: I9b84bbe60ca9f2ad4ddc3119bc8cb88331a7d154
2018-03-30 11:31:14 +02:00
Artur Harasimiuk 7e6432a207 ULTs cleanup
- remove unused MemoryManagementFixture.
  MemoryLeaks are tracked using MemoryLeakListener no need to duplicate
  with Fixure.
  MMF should be used when you need to inject memory allocation failure

Change-Id: I95bcaa7051acf540c5b015c5489ed6a6fc38ee8e
2018-03-29 15:09:59 +02:00
Mrozek, Michal 9bdf01468e [20/n] Internal 4GB allocator.
- Switch to internal heap for kernel ISA allocations.
- remove IH from various functions
- remove IHState from CSR , IH is never dirty
- ISA is no longer copied on enqueue calls.

Change-Id: I0099cf2a9ebab6192ea03a74dd35f7da963fd5a5
2018-03-28 16:07:26 +02:00
Stefanowski, Adam ffb33f5e86 refactor virtualAlloc methods
Change-Id: I06e93471b395818ad172048d545f1439066207d5
2018-03-28 14:12:21 +02:00
Hoppe, Mateusz aa088da8d3 User pointer read-only memory fix
- do not store fragment in map until hostPointerValidation
is done
- set pointers to nullptr after delete in cleanOsHandles

Change-Id: I0bf99c3215c4b91ce059bb4e94716671c49f1946
2018-03-28 12:42:31 +02:00
Milczarek, Slawomir a02c3cb781 KM DAF AubCapture to recapture fill pattern allocations
The commit introduces a recapture of fill pattern allocations on every submit.

Change-Id: I634af075348dbc59c7809f58b8495326cab804e1
2018-03-27 16:38:41 +02:00
Milczarek, Slawomir 32825e203e KM DAF AubCapture to recapture command streams and heap allocations
This commit introduces a recapture of CS and Heap resources on every submit.

Change-Id: I2a5a763e8988de804da1a6c2c8042154b0786b2e
2018-03-26 18:27:20 +02:00
Chodor, Jaroslaw d65128d4e8 Refactor around sharings
- exposing additional handles in common code
- adding proxy for CreateEvent (windows)

Change-Id: I90872682c6c518c98d9d43e79f5112ee869e94aa
2018-03-26 15:32:25 +02:00
Hoppe, Mateusz 7f32eb06d1 Kernel Source Level debugger support 4/n
- adding DebugSurface allocation and setup
- unit tests refactors:
  - mock kernel with kernel debug option
  - separating fixtures to headers
  - added helper for getting internal-options kernels
    filenames

Change-Id: I7b6f4d46e2ab7cff0da8d5212483f44ae0d4be31
2018-03-26 15:02:42 +02:00
Hoppe, Mateusz ed30f6e55f Read-only memory allocations handling in Wddm
- return InvalidHostPointer when createallocation
fails with NO_VIDEO_MEMORY

Change-Id: I6946eeb04d3a191550478e1d26a6ce0c32b75c34
2018-03-23 14:30:00 +01:00
Mateusz Jablonski c0a8522eb1 Cmake refactor part 19
- create new object library igdrcl_libult_env
- move sources shared between igdrcl_tests, igdrcl_aub_tests and
  igdrcl_mt_tests to igdrcl_libult_env
- partially cleanup unit_tests/mt_tests/CMakeLists.txt

Change-Id: I4f4bbfa5649d84d79133b9d5c9bd137c68b7d82e
2018-03-22 16:30:15 +01:00
Dunajski, Bartosz 516082e7c5 Kmd notify improvements [1/n]: Quick KMD sleep optimization
- KmdNotifyProperties struct for CapabilityTable that can be extended by
  incoming KmdNotify related optimizations
- Quick KMD sleep optimization that is called from async events handler
- Optimization makes a taskCount check in busy loop with much smaller
  delay than basic version of KMD Notify optimization

Change-Id: I60c851c59895f0cf9de1e1f21e755a8b4c2fe900
2018-03-21 20:41:33 +01:00
Woloszyn, Wojciech 0ad81024b7 Implement cl_khr_mipmap_image [1/n]
- Add mipmap image handling for clEnqueueReadImage, clEnqueueWriteImage
- Fix mipmap image handling for clCreateImage

Change-Id: I42938a330b55c7e69a16c26dce3ab5d66f8a8938
2018-03-21 10:51:13 +01:00
Mrozek, Michal 2119d5db08 [13/n] Internal 4GB allocator.
- Add common function for all memory managers to obtain internal heap base.

Change-Id: Iacdaaf598e8786dad046b3f4550f9c80ce3f15d9
2018-03-12 16:19:24 +01:00
Artur Harasimiuk 12b7c551d8 use ADAPTER_INFO in one method only
size of structure can vary. Create single point of conversion to extract
required data and store them in Neo specific structures.

Change-Id: I822ec633014aa7394cbd626ecbc275e32e61cf60
2018-03-09 12:30:05 +01:00
Mateusz Jablonski a8b5a66439 Cmake refactor part 12
igdrcl_tests: define os_interface sources in subdirectories

Change-Id: Ibbf1754bf7a095f22ad152db709614f7e40ed2fb
2018-03-08 22:55:07 +01:00
Artur Harasimiuk 3297cd8342 add function to properly load dependency
Change-Id: I0cec677ae19fa6525890c9b0abe0601a0c11e7df
2018-03-06 23:47:53 +01:00
Pawel Wilma c4c35955d1 Debug option to flatten main and chained batch buffer in AUB dump.
New debug option FlattenBatchBufferForAUBDump has been added. When set it
modifies AUB dump in such way that commands from main and chained batch
buffer are dumped as single allocation. Commands from chained batch buffer are
dumped directly after commands from main batch buffer without
MI_BATCH_BUFFER_START. This feature also requires ImmediateDispatch mode which
can be forced using debug option CsrDispatchMode = 1.

Change-Id: I730760791693a748e7f4e1463ce8e7af94287b93
2018-03-06 12:26:50 +01:00
Artur Harasimiuk 8781bd518e remove some redunant casts in setAdapterInfo
Change-Id: I96bc52e6870346d35209b345362d4ddd951f90b4
2018-03-06 09:09:04 +01:00
Artur Harasimiuk f1f9fba509 use ADAPTER_INFO in Wddm only
do all transform and conversion in enumAdapters and return HardwareInfo.
the ADAPTER_INFO structure may vary and SkuInfoTransfer is responsible
to copy/deduce required flags, it can be done as a part of enumAdapter.

Change-Id: Iad6fd5f7094f591a0175025c9ec33a96e55ebdc9
2018-03-02 09:45:03 +01:00
Mrozek, Michal b2f964dcf2 [6/n] Internal 4GB allocator
-Use GPU address to program command buffer in WDMM.

Change-Id: Iea6e423ccb18a09b4969a10cf2bd44d7a6af6629
2018-03-01 21:50:14 +01:00
Woloszyn, Wojciech 5c8cd51fc8 Use allocateGraphicsMemoryForImage for mipmaps
Change-Id: I0cd740ca4c8286fb73f766b74abc50ed53cfc9d0
2018-03-01 20:39:15 +01:00
Mrozek, Michal 3e3c6c28c7 Change default value of UseNoRingFlushesKmdMode to true.
Change-Id: I7c7246aeebb2815262cb2cd4731aabb2d74a3002
2018-03-01 17:25:38 +01:00
Mrozek, Michal 52cdb7e57d [2/n] Internal 4GB allocator
- Add test for new parameter to mapGpuVirtualAddress

Change-Id: Ie374981fb58892e974efb80ba944419564422d98
2018-02-28 10:04:53 +01:00
Mrozek, Michal 19c68a608f [1/n] Internal 4GB allocator
- Add new entry point in memory manager for internal allocations.
- Route to allocate32BitGraphicsMemory
- Add new enum to control memory region
- Change mm to memoryManager

Change-Id: I2ee069aa9baf7f69f652022e026569ec4fdb9d77
2018-02-27 16:35:12 +01:00
Mrozek, Michal 3c230f6302 Align createContext & createDevice DisableGpuTimeout flags.
- Make sure we program the same value for both calls.

Change-Id: I11b26fb56e60fff8f379827f6f6424a387b005d3
2018-02-22 15:55:30 +01:00
Artur Harasimiuk 006e86d7a6 move mocks to igdrcl_mocks target
Change-Id: I6d9f87fc415ff70261344105e8808c6e91a960bd
2018-02-21 23:36:31 +01:00
Mrozek, Michal ca33e029b7 Fix profiling calculation for CPU profiling path.
-There was a precision problem with timestamp calculation, all math was using
integers which are not very precise in overflow scenarios
-Change the logic to use doubles and cast back to uint64_t at the end.

Change-Id: Ia08d504a90a43df7330f398af966535ed944650d
2018-02-19 19:08:23 +01:00
Milczarek, Slawomir 5c746131f1 HW CSR with AUB dump to operate on real device (HW Info)
This commit ensures AUB files to be dumped for real device
in the configuration CSR HW + CSR AUB.

Change-Id: I7b5f740440aae062d2f5ad7ad8b9c3b4f2207ddd
2018-02-19 13:11:43 +01:00
Mrozek, Michal f9254c8de6 Add new performance flag to steer NoRingFlushes CreateContext flag.
Change-Id: I51426c1c51a1e4133f9bcc3127ecdc5af51048cd
2018-02-16 10:47:24 +01:00
Dunajski, Bartosz 87ed3d4fff Improve page table manager initialization
Change-Id: Ifdd74bf93a93fcdecaae5b1276c0fa83a9664987
2018-02-15 13:31:50 +01:00
Mrozek, Michal acb044dce3 Fix DC flush programming in non concurrent scenarios.
-If out of order flag was disabled then pipe control was not having dc flush.
-This could led to a batch buffer that doesn't end with dc flush.
-This change adds differentiation between pipe controls that may be erased and
pipe controls that are used as a part of epilogue command

Change-Id: Ic9c970c75c89ff524a0e40506eff6dd097760145
2018-02-15 09:42:11 +01:00
Zdanowicz, Zbigniew 45dedb37f3 For HostPtr surfaces of enqueue calls use GPU address
Change-Id: I67bf5076d23d43438f5e82c5cb6cbd3b9ed2f152
2018-02-14 15:44:27 +01:00
Zdanowicz, Zbigniew d6b5433f14 Lower Windows minimal address to 16kB
Change-Id: I138438943d438ace0b5d76e04f3af8d9541d532a
2018-02-12 18:04:56 +01:00
Hoppe, Mateusz 012b8bd73c Adding initial PreemptionMode::Initial
- account for initial setting (when set mode was equal to initial(Disabled))
estimate size in cmdStreamCS, program MMIO

Change-Id: Ice218ae986583c8f3bab4f4f6979e38f03e30d7e
2018-02-08 16:21:52 +01:00
Zdanowicz, Zbigniew a1db4ddd7a Retry Wddm mapGPUVA after failure when deferred deleter is set
mapGPUVA will fail when allocation is still in deferred deleter and using
the same base pointer to map, while there is no reserveGPUVA for SVM range.
In that case driver should drain deleter and retry mapGPUVA call

Change-Id: I4ded7d79e0cd935ec62d7fae785d66570c847535
2018-02-08 10:28:40 +01:00
Mrozek, Michal 006d248de6 Always set DisableGpuTimeout.
Reg key for preemption may not be available, this doesn't mean that
preemption is off.

Change-Id: If7c8a8228fbfa9f01f95d61d4134bd398e4079f6
2018-02-06 19:21:06 +01:00
Zdunowski, Piotr 1cfe5344fc Enable throttle hints extension.
Change-Id: I996fce8dbc792d77dc85df143ba5c0aa1cad83e5
2018-02-06 17:01:37 +01:00
Milczarek, Slawomir 89be67b570 Add support for DAF injection
This commit adds support for Debug Assistance Functionality (DAF)
aka "Driver Aubcapture" to debug builds on Windows.

Change-Id: I7e859d32af17a6fcee23868392df6cd1390e4afd
2018-02-05 16:08:52 +01:00
Zdanowicz, Zbigniew 292f8fae90 Use alignedSize for map range and to calculate trim budget
Change-Id: Iceaf5c1d7fd1abfa6bdb08c97a439dba3bbccdf4
2018-02-01 19:20:27 +01:00
Zdanowicz, Zbigniew bf270c4643 Use reserved memory to map GPU VA when cpu memory doesnt meet restrictions
Change-Id: I9f255a3f2ce6b1c22110e7da6e90c013f1f598e6
2018-01-31 18:05:11 +01:00
Milczarek, Slawomir 7c038eb7a4 Add AUB generation in parallel to execution on GPU
This commit adds basic for parallel AUB generation and execution on GPU.

Change-Id: I3c77557a9578db05c87be6db7a5e3006f7c4b053
2018-01-29 17:24:26 +01:00
Zdanowicz, Zbigniew e42d43953d Restrict system memory allocations to certain address range
Change-Id: Ibe8c1183368ce48f2c820d0f1a71f0b15703ffcd
2018-01-26 15:16:41 +01:00
Dunajski, Bartosz 3532c6373f D3D sharable 2D texture: Map Aux GpuVa and set renderCompressed if possible
Change-Id: I508965d07f456af74ecef6e980337f42f5967b43
2018-01-26 08:38:59 +01:00
Zdanowicz, Zbigniew 4ad96b75f5 Make base class for gmm_memory
Change-Id: I307f616be27d5fed126f0e36bff0d182ab7a8b53
2018-01-26 08:35:41 +01:00
Dunajski, Bartosz 8b9713582a Aux programming fixes + ULT improvements
- Dont program clear color aux params for multisampled images (depth or MCS)
- Mock Gmm PageTable manager default actions
- Local Wddm for WddmCsr tests to make expects on creation
- Set Gmm PageTable manager for Wddm Memory Manager tests without WddmCsr

Change-Id: I8ccfddb06340bc81184e07eff5a7078756d28571
2018-01-18 14:40:56 +01:00
Zdanowicz, Zbigniew 75a902bf2c Wddm freeGraphicsMemory should handle null GraphicsAllocation same as Drm
Change-Id: Idafdaf654f630d41b890f87c6e8c14833b18f714
2018-01-18 08:24:07 +01:00
Artur Harasimiuk 3883f790cc Instrumentation refactoring
Use bool instead of int where it should be.
Tweak naming.
Removed unused members

Change-Id: I468be28d78e9da7c7fa1632e362ed077929fb91a
2018-01-16 16:15:44 +01:00
Zdanowicz, Zbigniew 474b6a2a23 Enable Mid-Thread preemption for Gen9
Change-Id: Iacec1c8fa899d4fbf0cbb9cc292990546871ca6a
2018-01-16 12:55:35 +01:00
Mrozek, Michal af77720f9c Fix resource destruction scheme on device closure.
- Call waitForTaskCountAndCleanAllocationList with latest flushed task count
to reflect what was actually sent to HW.

- refactor cleanAllocationList to waitForTaskCountAndCleanAllocationList

Change-Id: I5301185c5fce212e39eb017b952b43c279559cf4
2018-01-15 18:45:48 +01:00
Milczarek, Slawomir 7c42353c4c Add support for batched dispatch to userspace AUBs
This commit as aimed to add support for batched dispatch,
but doesn't make it the default mode for AubCSR yet.

Change-Id: I4dc366ec5f01adf2c4793009da2100ba0230c60a
2018-01-12 15:40:56 +01:00
Mateusz Jablonski 502e9c2d15 Async deleter: move releasing cpu/gpu pointers to main thread
Change-Id: I3c3c9fb6200c38ecf1fc8910380531d6a5f1e875
2018-01-12 13:16:59 +01:00
Dunajski, Bartosz 97021d74a8 Ftr/Wa table separation
Change-Id: I21034f6ec09d8b91dd6cd16135fbe5a19298dcad
2018-01-11 08:55:06 +01:00
Dunajski, Bartosz 11e7a5f1d9 Pass FtrWddm2GpuMmu flag to GMM
Change-Id: Ie52f1889a2ce1ab7abab8ac39a5dc6f0e60c6bcf
2018-01-09 13:04:34 +01:00
Zdanowicz, Zbigniew 6cf7ac41c2 Mock call should follow GDI call convention
Change-Id: Ibd217539c091e972bcc079b086f6aadb9ae18d22
2018-01-09 09:29:54 +01:00
Mateusz Jablonski f12b5861fd Drain deferred deletions when cannot allocate memory for tiled image
Change-Id: I68b15269da4b5a58e02571a9c594c52b9a95edeb
2018-01-09 09:20:10 +01:00
Zdanowicz, Zbigniew 21f92d8258 Add preemption WA to make CSR surface uncacheable
Change-Id: Ia468c6f5df16522c3bc9aae22802895f2badc431
2018-01-05 22:44:26 +01:00
Zdunowski, Piotr b006972d07 Improve error handling for shared handles in wddm.
Change-Id: I93d33d89cb4b6333924c362b54e0638174e44091
2017-12-29 16:10:16 +01:00
Brandon Fliflet 7e9ad41290 Initial commit
Change-Id: I4bf1707bd3dfeadf2c17b0a7daff372b1925ebbd
2017-12-21 00:45:38 +01:00