Commit Graph

63 Commits

Author SHA1 Message Date
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
Mrozek, Michal d2817427af Remove createInternalGraphicsAllocation function.
- Route directly to allocate32BitGraphicsMemory

Change-Id: Ia6872bae655c530ff06b0ec270f419ca91d005ce
2018-05-21 04:11:43 +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
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
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
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
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
Hoppe, Mateusz a1a20a3b34 Service read only memory passed as host_ptr
- read only memory cannot be used for allocation,
Oses cannot create graphics alocation for such memory
- if memory allocation fails for host_ptr passed
to enqueueWrite calls, then try doing new allocation
and copy host_ptr on cpu

Change-Id: I415a4673ae1319ea8f77e53bd8fba7489fe85218
2018-03-14 13:16:36 +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
Mrozek, Michal 8254d6a081 Ensure that submissions are flushed prior to csr destruction.
Change-Id: Ie04de561d3d295f40f55a19f01274d873d259abd
2018-03-12 12:54:47 +01:00
Mrozek, Michal 3d139c204e Remove unrecoverable.
Change-Id: I4f8db72668d8d36a68f46a591ee0823b35e41fb7
2018-03-09 16:20:28 +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
Woloszyn, Wojciech 5c8cd51fc8 Use allocateGraphicsMemoryForImage for mipmaps
Change-Id: I0cd740ca4c8286fb73f766b74abc50ed53cfc9d0
2018-03-01 20:39:15 +01:00
Dunajski, Bartosz d9dd68a8ef Remove copy constructor for GraphicsAllocation
Change-Id: If547a004b6f9e5cadb1f6ba0a0f44c3ac0d1ff0d
2018-03-01 14:00:24 +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
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