Commit Graph

79 Commits

Author SHA1 Message Date
Mrozek, Michal 200228b506 Replace cpuPtrAllocated flag with driverAllocatedCpuPointer.
Change-Id: Ic0ce165d0e583701e1128595a3d9dabd0a61a84b
2018-10-31 12:37:20 +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
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 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
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
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 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
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
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 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
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
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
Hoppe, Mateusz 4cb408294c Add useSystemMemoryPool flag to Gmm
Change-Id: Ide27887de9169a9d958d3f232bcd70a1b7afe94f
2018-08-03 12:52:23 +02:00
Dunajski, Bartosz 512978768e Pass renderCompressed information to GMM for 64kb allocations
Change-Id: I56302055c028e919bceeb3333557cab7451e1d09
2018-07-23 11:28:43 +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 8a69656446 Fix unrecoverable.
- Do not rely on device as it may be destroyed use
command stream receiver instead.

Change-Id: I2c8a1542a27e5688cec6031e931d5765bcbebc28
2018-07-16 17:30:56 +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
Dunajski, Bartosz e26d67cde3 Aux surface programming for Buffers [1/n]: Gmm interface improvement
Change-Id: I984b8ebee27808a236217e82bb4e910550d624c4
2018-07-03 13:00:08 +02:00
Kamil Diedrich 784ddf0a6c cleanup dead code, readability fixes
Change-Id: I91a3947d4ec0ef2264afed5abc58ff66151f0dc6
2018-07-02 12:50:15 +02:00
Koska, Andrzej 3548876263 Setting the GpuAddress from a fragment in createGraphicsAllocation
Change-Id: I4d60aceea96dfbe50b2af4a1fbaada6a150ddd35
2018-06-29 16:13:29 +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
Koska, Andrzej e15c2b899f Setting the right handle value in fragment
Change-Id: Idcbdce5fc686360f252c8db0423ae77d9155702e
2018-06-15 16:36:52 +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