Commit Graph

390 Commits

Author SHA1 Message Date
Mrozek, Michal b79be3dafb Fix a typo in VME kernel.
Change-Id: Ib41245d994ebc300e9e250159dbc2e48a2c9b7a3
2018-04-23 09:40:47 +02:00
Maciej Dziuban 1392b79b58 L3 programming refactor 1/n
- Clean up size estimation functions
- Make some tests gen specific

Change-Id: If9c15f311306282ba035b380e6d4cadc17584815
2018-04-20 22:34:35 +02:00
Mrozek, Michal 588d982989 Add null checks to VME kernels.
- They are required to properly handle scenarios where null buffers
are passed by the application.

Change-Id: I5bf3c70220ebaf01b16f74ac0e617abdf442c604
2018-04-20 15:00:09 +02:00
Mrozek, Michal 5b3160c7f8 Add null checks for all the VME buffers.
- In VME scenarios input buffers may be NULL, we need to skip
some parts of the kernel instead of trying to read from NULL pointer.

Change-Id: Ie9788ec76af1be270f6a03547fdcf80c7b2c84b2
2018-04-20 14:44:43 +02:00
Mrozek, Michal ce8c44cae3 Add check for local work group size in clEnqueueNDRangeKernel call.
- Incoming local work group size cannot exceed device capabilities.

Change-Id: I89a7503155c71443e3ebc630debb5d5b466c6cb5
2018-04-20 08:16:16 +02:00
Dunajski, Bartosz 5ed13d7c88 KMD Notfy: Multiply timeout by taskCount diff only on Linux
Change-Id: Idb75dcc02cd218ff097f29d6881c97bb8feb25da
2018-04-19 22:28:06 +02:00
Woloszyn, Wojciech 6eec23844b fix nullptr dereference issues in windows api
Change-Id: I6209892f8c0ea96426c28d7977d20c234d3cd81d
2018-04-19 21:55:40 +02:00
Chodor, Jaroslaw 9b0820d6de Fixing potential buffer overflow in simple_sprintf
Change-Id: I67d92073d05049740b4a1bf9783fe8dede7c3c0a
2018-04-19 21:48:34 +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
Artur Harasimiuk 75d497a9a9 separate BuiltinDispatchInfoBuilder from built_ins.h
We don't need BuiltinDispatchInfoBuilder in every place where built ins
are used. specifically in .cpp files generated from kernel binary.

Change-Id: Ie739951cdc93873993f78ad14cee656122af51fd
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-19 12:32:13 +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 d900bdffc6 [33/n] Internal 4GB allocator.
- Move indirect heap to internal allocator domain.
- Add logic in getIndirectHeap to allocate with proper API depending on
heap type
- Add State base Address programming, reflecting that now Indirect Object
Heap is placed in 4GB domain.
- For AddPatchInfoCommentsForAUBDump mode , keep all heaps in non 4GB mode.

Change-Id: I6862f6a249e444d0d6cfe7e499a10d43f284553e
2018-04-19 08:13:48 +02:00
Hoppe, Mateusz 81362d5b7d Source Level Debugger: add generating debug data in cloc
- generate debug data to .dbg file in cloc
- generate debug kernel for ults with "-g" option
in addition to "-cl-kernel-debug-enable"
- append "-g" option for compilation and build of
programs with kernel debugging enabled to make
compiler generate debug data

Change-Id: I09401f84be6e09da167194a44d1b9a7f2bfb622d
2018-04-18 17:14:15 +02:00
Mateusz Jablonski 350e5fa684 Correct error value when setting invalid kernel arg
Change-Id: I9719e7ea7b4cf39fae57996528dd56595ee9bfcc
2018-04-18 12:53:04 +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
Koska, Andrzej 9dda0ed149 Checking if the PrivateSurface Size exceeds UINT32_MAX
Change-Id: I75598d7b4bdbfe1648b7f03fd0878ed51824221b
2018-04-17 16:05:19 +02:00
Artur Harasimiuk 12843c5eba use externally provided names of compiler shared libraries
Intel Graphics Compiler is preparing change to unify compiler naming.
They will expose two variables which we should use when loading compiler
libraries.

Change-Id: If6edcb7541452b3cd429a8b4f7c26f6d43169035
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-17 12:07:58 +02:00
Mrozek, Michal 1660f904dc [31/n] Internal 4GB allocator.
- Add Indirect Heap function that will be used to program State Base Address.
- This is to allow indirect heaps to work in 2 modes, either heap will service
as whole indirect allocation OR offsets in 4GB space will be used.

Change-Id: Ic4ca1e907c1b30d2f98dc39e8ab945ce35ed6ad0
2018-04-17 09:42:25 +02:00
Mrozek, Michal 6299388b71 [30/n] Internal 4GB allocator.
- Add support for patching indirect state with internal heaps.

Change-Id: Ib5748beb462be1786134a0a81bb649dd279816ec
2018-04-17 09:22:15 +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
Mrozek, Michal 87b8b6e261 [28/n] Internal 4GB allocator.
Avoid default parameter to getIndirectHeap.

Change-Id: I105ceaa4b5e9b23ce8dc96631410b9535e5a44e0
2018-04-16 17:56:49 +02:00
Mrozek, Michal cb06fad983 [27/n] Internal 4GB allocator.
- Allow indirect heap to work in 2 modes:
first mode is when it will be used as an allocation from 4GB allocator.
In such scenario driver will return offset from base of the allocator region.
Second mode is the legacy mode which will be used by device enqueue, this
will results in heap CPU base address being programmed in State Base Address
commands and during programming heap offset base of 0 will be returned.

Change-Id: Ica098f3278b6b6ed5036b4c5ab7461dc61d8ee86
2018-04-16 16:45:30 +02:00
Zdanowicz, Zbigniew e7ab0b2d33 Add KMD/GMM FtrWddm2_1_64kbPages flag
Change-Id: Ife5f759db8e999ab765c6fd19b52940839703803
2018-04-16 16:23:40 +02:00
Artur Harasimiuk cb064abb04 fix mapImage for 1D_ARRAY
There are differences in qPitch programming between Gen8 vs Gen9+
devices and this requires special operation when image is zero-copy.

For Gen8 qPitch is distance in rows while Gen9+ it is in pixels.
Minimum value of qPitch is 4 and this causes slicePitch = 4*rowPitch on
Gen8.

To allow zero-copy we have to tell what is correct value rowPitch which
should equal to slicePitch.

Change-Id: I58dea004e3c7f9f4dfabd154d02749c15b6b0246
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-16 16:13:51 +02:00
Hoppe, Mateusz 87f0dcda36 Source Level Debugger - add MI_LOAD_REG debug cmds
- add 2 MI_LOAD_REGISTER_IMM cmds in preamble when debugger
is active

Change-Id: I4dd46a3c01fc95feadf8a12728ce801efe506e05
2018-04-16 13:33:12 +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
Hoppe, Mateusz e898b9e218 Source Level Debugger: SIP programming in preamble
- program SIP_STATE when either MidThread preemption is enabled
or kernel debugging is active
- device creates correct sip based on preemption mode and
active kernel debugging

Change-Id: I3e43b66ad00d24c2389fa4fc766dd47044b6af80
2018-04-13 14:40:08 +02:00
Koska, Andrzej b0a6d9131a Making DSH and IOH always resident
Change-Id: Ib114b92cb5ee153f213c15c935f8f1d1cfeb46eb
2018-04-13 12:35:15 +02:00
Chodor, Jaroslaw d516cd6edc Don't expose mipmaps on 1.2 devices
Change-Id: Id7949266f29ef06ae71c88725298822055ca7c13
2018-04-13 11:22:33 +02:00
Jacek Danecki 1504d89571 switch to libva 2.x
- support for libva 1.x has been dropped

Change-Id: Ie5361b98cdd36144c9cd2a413c5fc2871655f333
2018-04-13 11:16:33 +02:00
Mrozek, Michal 2d7e551695 Fix cmake.
Change-Id: I28272db5309bbb84b312522d9c9b0e433eb4a183
2018-04-13 08:43:42 +02:00
Dunajski, Bartosz f40dc29ea1 Dont change multisampled surface state storage for R32_FLOAT_X8X24 type
Change-Id: I5e386057e4368e0d80bed496f2ddc19b5ae271a5
2018-04-12 15:47:46 +02:00
Dunajski, Bartosz bf799d99e0 Update manifest and add missing decalaration in cmake
Change-Id: If00bdc48e05ea2e00b871cca1f85722848f0378c
2018-04-12 14:28:36 +02:00
Jacek Danecki e43c345e07 sharing: add context tests
Change-Id: I1dc504f6931ab0ae5645e9460ae0c0284704404c
2018-04-12 11:26:58 +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
Mateusz Jablonski 881895bd2a Stop querying gpu frequency during each profiling data calculation
change type of profiling timer resolution in device info to double

Change-Id: I41a67ecf61cd3bdc5a997b1f083b9998063f4f7f
2018-04-11 12:00:41 +02:00
Chodor, Jaroslaw 1c3ff8a15b Adding mipmap support in sampler
* sampler mipmap lod/filtering programming
* sampler queries
* clCreateSamplerWithProperties
* fixed point numeric type (e.g. U4.8)

Change-Id: I6b496e6f067f6232bab464ab3ee74af8b00904d3
2018-04-10 22:15:09 +02:00
Zdanowicz, Zbigniew e51cb6bd0b Separate struct EnqueueOperation declaration and implementation
Change-Id: I537660867a1c98f957280237c14b7a1554fce3db
2018-04-10 16:36:48 +02:00
Mrozek, Michal 86e000f67a Do not use simplified Mocs Table on gen8 devices.
- On gen8 devices we are not using index to control caching, but we program
caches directly
- In such case we need to rely on values reported from GMM instead of using
Kernel Mocs indexes.

Change-Id: I6c030847509d8f39f63ac98ebd3ebd0b0907e625
2018-04-10 15:43:40 +02:00
Mateusz Jablonski 5d296f15e3 Validate image 2d sizes unless parent image is nv12
when any check in Image::validate method failed then early return

Change-Id: Ib28110ac493f5930ffa99fa7463443e9e7fc8fcf
2018-04-10 11:41:00 +02:00
Mateusz Jablonski 1843b23692 Fix image 2d validation
check image sizes only for image without parent mem object

Change-Id: I73189f1c73653f609c6e4d7dcb7a85d06a2f858a
2018-04-10 09:39:52 +02:00
Dunajski, Bartosz 87f8f735f9 Move KMD Notify logic from CSR to specialized helper
- Decission about timeout enabling and value moved out of CSR
- Timeout multiplier is no longer Linux specific

Change-Id: I6858fe2f811ef13802b95e0470e310210a9dea8b
2018-04-10 08:16:11 +02:00
Chodor, Jaroslaw 10ada58bd6 Fix for context lifetime management
Don't destroy context if any related memobject is alive

Change-Id: I7d4776b6bb16373adb367d2ab4e249c62353afbe
2018-04-09 17:23:29 +01:00
Hoppe, Mateusz 9a86f86a24 Source Level Debugger device debugger active flag
- device flag indicating if debugger is active
- when active, proper sip kernels must be used

Change-Id: I678367cdf8fab5d4b5770e3f471246ff6d6bd112
2018-04-09 14:02:45 +02:00
Chodor, Jaroslaw 6bf4135def Fix for externally synchronized events
When inheriting task count from parent events,
don't take into account externally synchronized events

Change-Id: I52d861e482669a18e2aca499c813716bb4951b74
2018-04-09 12:12:58 +02:00
Mateusz Jablonski ac45ff74ec Fix creating image from image
- allow creating image 2d from non NV12 image 2d
- validate image descriptor and format when create image from image

Change-Id: Ie7887e75f1450fc723dc1d1ae9ff5639d88835fc
2018-04-09 11:29:11 +02:00
Mrozek, Michal ffa9b097f5 [26/n] Internal 4GB allocator.
- change the way we handle blocked commands.
- instead of allocating CPU pointer and populating it with commands, create
real IndirectHeap that may be later submitted to the GPU
- that removes a lot of copy operations that were happening on submit time
- for device enqueue, this requires dsh & shh to be passed directly to the
underlying commands, in that scenario device queue buffers are not used

Change-Id: I1124a8edbb46777ea7f7d3a5946f302e7fdf9665
2018-04-09 10:47:37 +02:00
Chodor, Jaroslaw 614b69a3bf Adding support for get_image_num_mip_levels
* patch token decoding
* crossthread data patching

* additionally, fixing nasty ODR violation in VA tests
  (note : ODR = One Definition Rule)

Change-Id: I9803ed599826c97359349d2b8fa0d86e46cb33ea
2018-04-06 11:04:29 +02:00
Zdunowski, Piotr 5946a2cd15 Fix printf issue with printing pointers from 32bit kernel on 64bit system.
Change-Id: I77771b4ebe6c4335d51dc1834f0b8f9df2a069a4
2018-04-05 17:12:33 +02:00
Mateusz Jablonski 835a1da175 Update kernel allocation when substitute kernel heap
Change-Id: Iee02a93d4e10c7b32fae56ffa61c90d8617d6ec9
2018-04-05 10:49:40 +02:00