Commit Graph

45 Commits

Author SHA1 Message Date
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 7eceb3038c Do no increment ref counts when passing OsContext to residency.
- not needed anymore, memory manager manages the ilfecycle of OsContext

Change-Id: Ibcb32954522dd862187cf97d62d2e0b1b10e50e5
2018-09-06 12:53:35 +02:00
Mrozek, Michal 75e26f39b1 Move ownership of OsContext to memory manager.
- register OsContext when device is created
- memory manager controls residency so it needs to have control of
OsContexts underneath
- device may be destroyed while OsContexts may be still in use

Change-Id: If08df7686f5448a1e7b0b6ced20b37a1e8ba2cd6
2018-09-06 10:05:28 +02:00
Mrozek, Michal b87af2c9e7 Move residency to dedicated header.
Change-Id: Ic27748fdb36b1f92c58ca20f8b6e12e6a24f41d8
2018-09-05 16:34:08 +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
Zdunowski, Piotr ad65477868 Fix crash caused by missing residency data.
Change-Id: Ib615e3b13382950ec8ecc128bea0032a126666e0
2018-08-29 12:46:50 +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
Mrozek, Michal 9776868aff Remove not used debug variable.
Change-Id: I6e3a7d1340096383101b84148d772afd2d4f304e
2018-08-09 16:12:44 +02:00
Mrozek, Michal 1599ea800e Pass execution environment to command stream receiver.
Change-Id: I598f67f8b005b5ce8249b638e080657eb6dc3547
2018-08-08 17:10:39 +02:00
Hoppe, Mateusz 4cb408294c Add useSystemMemoryPool flag to Gmm
Change-Id: Ide27887de9169a9d958d3f232bcd70a1b7afe94f
2018-08-03 12:52:23 +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
Mateusz Jablonski 98061903aa Remove device helper
Change-Id: Ie66c029359a62b81c8658d804dcf8565647100f1
2018-07-26 14:10:05 +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
Dunajski, Bartosz 239ebf9eab Improve AllocationType operations: dont do bit operations on enums
Change-Id: Ie70ca9e2a93ec80b1cd655bad622db9e12abb7f7
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-07-20 09:12:58 +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
Hoppe, Mateusz c34ed02f57 Rename AllocationType to FragmentPosition
- better reflects enums usage
- make the type scoped enum

Change-Id: Id2712e43028258ffc038a5738ec9e546d19d9e2e
2018-07-12 12:44:29 +02:00
Dunajski, Bartosz 85d7081beb Enable 64kb pages when its allowed by platform
Change-Id: I10f02bd83beabeff929e16c7293324b81bfed054
2018-07-12 08:43:51 +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
Dunajski, Bartosz e26d67cde3 Aux surface programming for Buffers [1/n]: Gmm interface improvement
Change-Id: I984b8ebee27808a236217e82bb4e910550d624c4
2018-07-03 13:00:08 +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 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
Artur Harasimiuk ef5bd7ec5b refactor HwTS and HWPerf tag allocators
- use full type specification and remove casts in MemoryManager
- remove TagAllocatorBase not used any more
- make TagAllocator to be profiling/instrumentation agnostic
- unify UnlimitedTagCount and make part of TagAllocator

Change-Id: I7b5b1ed83aa5e1f0839f611db0530d7e062a3c25
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-24 22:12:10 +02:00
Mrozek, Michal 5bae27ae51 Fix a bug in Graphics Allocations constructors.
- There was a wrong cast in Graphics Allocation constructor resulting
in wrong GPU address generation in some sporadic scenarios.
- Problem appears in 32 bit applications where void* address is cast to
uint64_t value, if c style cast is used it makes trailing bit to be
populated to higher bits constructing wrong value

0xf000000 is being casted to 0xfffffffff0000000 while it should be casted to
0x00000000f0000000
- added special cast function for further use.

Change-Id: I56d53a8e13e17cbacd127566442eea3f6a089977
2018-04-19 09:45:03 +02:00
Mrozek, Michal 8583c68c8c [29/n] Internal 4GB allocator.
- Internal allocations may now coexists with non internal on reusable list.
- Caller now specifies if internal allocation is needed.
- If criteria are not met , then allocation is not returned.

Change-Id: I7da3a4f944768b7c8a873e44fd47248f1d76bf9e
2018-04-17 06:42:56 +02:00
Milczarek, Slawomir b56289a507 User space AUBs capable of memory re-dumps on CPU-side memory modifications.
Any CPU related updates such as clEnqueueMapBuffer or similar
need to trigger a re-dump of memory prior to the next clEnqueue call.

Change-Id: I7b31e559278e92ff55b6ebab8ef4190caef1ebc0
2018-04-03 15:40:29 +02: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
Dunajski, Bartosz d9dd68a8ef Remove copy constructor for GraphicsAllocation
Change-Id: If547a004b6f9e5cadb1f6ba0a0f44c3ac0d1ff0d
2018-03-01 14:00:24 +01:00
Mrozek, Michal 0b6acb4d7a [3/n] Internal 4GB allocator.
-Do not create allocator 32 bit with every DRM memory manager
-This is not needed for apps that do not use this.
-Add allocation of allocator to setForce32BitAddressing

Change-Id: I836b60f6b74eecf678cc9d56851797d0db176107
2018-02-28 16:54:49 +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 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
Mrozek, Michal 0066daf495 Add support for deletion of allocations that may be in use by GPU.
- fix deletion of constant program surface
- fix deletion of global program surface
- move program_data tests to shared code
- make program_data tests SKU agnostic

Change-Id: Icf3e9fd035416072699336c4f86e49703ef48cc5
2018-01-19 12:34:49 +01:00
Zdanowicz, Zbigniew 21f92d8258 Add preemption WA to make CSR surface uncacheable
Change-Id: Ia468c6f5df16522c3bc9aae22802895f2badc431
2018-01-05 22:44:26 +01:00
Hoppe, Mateusz e8fb931ef1 Use 64KB pages for SVM allocations when 64KB pages are enabled
- clSVMAlloc allocates 64KB pages as memory storage for both
fine grain and coarse grain allocation

Change-Id: I2068ffb9f5577761f739df47b54bc382e971949c
2017-12-28 11:25:43 +01:00
Brandon Fliflet 7e9ad41290 Initial commit
Change-Id: I4bf1707bd3dfeadf2c17b0a7daff372b1925ebbd
2017-12-21 00:45:38 +01:00