Code implementation of GPU address allocator for devices with reduced
address space.
Change-Id: Ieb0412c5930fdd71f90741055cf89c0338b01133
Signed-off-by: Kai Chen <kai.chen@intel.com>
Move definitions of objectNotUsed and objectNotResident to GraphicsAllocation
Change-Id: I2aec604a865cc6c975e9d1121028cbdd35c0b18a
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
- Move trimCallback from WddmMemoryManager
- Refactor lastFenceValue accessors to be less generic
Change-Id: I01b31ccb81a5ecc04d07912061326428b07a59bf
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
- 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
- Residency is being controlled by Graphics Allocation.
- Duplicates are now eliminated only for shared resources.
Change-Id: Ib51e2739a07728ae0b94abf6cce2e9981b017111
Move definition of allocations list method to internal_allocation_storage.cpp
Change-Id: I4c6038df8fd1b9335e8a74edbab33b78f9293d8f
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
- add EnableLocalMemory debug variable
- separate OSInterface::osEnableLocalMemory for dll and unit tests
Change-Id: I78a1f60364eece28b30ce3e91418e7d72ba3e0d9
- small cleanup
- files renaming to match convention
Change-Id: Iff9ed3a509001bcf6f154fc35f6d241ee9a968ae
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
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>
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>
New string debug variable HardwareInfoOverride is used to
specify new Hardware Info Config to be selected, for example 1x4x8.
Change-Id: I6d939608e6551e4a9102e5ab2e08255ee4982933
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>
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>
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>
- rename file
- move to folder public
Change-Id: Ie3c14c5a2be0aec5809b322b9a0e2cebe0e3fc22
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
- 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
This commit adds a capability for a driver to generate multiple devices
and hwinfo in AUB and TBX CSR modes.
Change-Id: Icc0eac7c16760d3d4ae6ef08cd0be950b45d35e7
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
- extend constructor to take new flag
- extend ExecutionEnvironment createMemoryManager with new flag
- only OsAgnosticMemoryManager changes in this step
Change-Id: I1dae4fd79fe28fd87e42b237600dc216c94b597e
- 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
- 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
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
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
- 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
- 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
- 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
This commit addresses crash issue in AUB standalone mode
when queue profiling is enabled on Linux platform.
Change-Id: Ie2d02093d3628efac3a8925890f22afd6a49469d
- This is constant setting and will not change in device lifetime.
- This is a part of device removal from memory manager.
Change-Id: Ib80559bac67d65c1bcc488fb033be7343839a108
- 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
- do not always expect failures in tests with failure injections
there is retry mechanism for some cases
Change-Id: If7589d2dacc41216d2f3b08f861209bbab179615
- 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
Add a capability for AUB subcapture feature to dump into several files
and read file name from the outside (via regkey and env variable).
Change-Id: I2d5f7945cfbc740b0316fe23b8c5ae9fd698ac57
This code is an infrastructure for special debug purpose that allow measure
execution time of any hardware command.
Change-Id: Id12a7979d204734a0c4a6c4700e427b65ac2397f
- 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
- 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
- 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
This commit adds a capability to selectively enable/disable AUB capture,
i.e. by toggling the registry key from the outside or specifying the filter
with a kernel name and/or kernel start index and kernel end index.
Change-Id: Ib5d39c21863fbc4a95aa73c949b9779ff993de0f
When different graphics allocations are created from
the same backing storage makeResident should be called only once.
Change-Id: Ide8ab385894505fd405eef010768dbcac3b92fba
Signed-off-by: Jacek Danecki <jacek.danecki@intel.com>
- SchedulerGWS forces gws for scheduler kernel - useful when using
TBX server
- Fix misaligned scattered write in scheduler kernel when
SchedulerSimulationReturnInstance is set to value > 1
- Fix copy_test_files dependecy - modification of files in test_files
triggers copy_test_files targets
Change-Id: Ieee2ddec67f6c61ab942d764c7ad076b3b6ca887
- when flag is enabled driver will not go with zero copy path for
CL_MEM_USE_HOST_PTR flag
- flag doesn't work in shared context where we must accept zero copy
storage.
Change-Id: Idda94f296dd12e7e3ccb15f2224808287551ac97
- Create Wddm20 interface by default for runtime and ULTs
- Add Windows dll test for Wddm creation
Change-Id: Id0a1b86e68112c31078b6965c647a5218790150f
- For every command buffer that we submit, pass it to gem close worker.
- Gem close worker will do asynchronous cleanup if this resource is meant to
be destroyed.
- if the resource is not meant to be destroyed we will call IOCTL wait for
this batch buffer.
- This will result in bumping up GPU clocks and better performance.
Change-Id: If9f181e411d7748573f31682e875a97c5355abe5
- Only Wddm object owns Gdi
- Dont pass Gdi object to constructor
- Move Wddm related files to new directory
Change-Id: Iadd26634c7692db760d7d3367211c32d2c2c8121
- 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
- add defines to command line
- remove most occurences of include "config.h"
Change-Id: I19d65d83c895fc6143d319d057a50e5ae3e78830
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
- interface to debugger dynamic library
- code is included when source level debugger header exists,
otherwise implementation is exluded from build
- unit tests do not load real dynamic library,
instead test version (DebbugerLibrary) of OsLibrary is used.
Change-Id: Id3229c77963352e8001043ee41b7d48c6b180a59