Γράφημα Υποβολών

54 Υποβολές

Συγγραφέας SHA1 Μήνυμα Ημερομηνία
Felix Kuehling f5a094bc96 libhsakmt: Update kfd_ioctl.h
Change-Id: Ibf165023b98787fdf295f50324e19aa062f2421d
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2019-06-03 19:15:49 -04:00
Philip Cox c2c1385e29 libhsakmt: Update wave suspend/resume API
This is updating to the new suspend and resume API for the
KFD and the thunk.  We now support passing in a list of queues
to suspend, and not just all of the queues for the process.

The kfdtest testcase was also updated so it still compiles.

Change-Id: I71d1b178476bd9df0c311bdedaa6a891528cebcf
Signed-off-by: Philip Cox <Philip.Cox@amd.com>
2019-05-03 10:32:47 -04:00
Oak Zeng ae111689f0 Map remapped mmio page to process space
HDP conherence registers are remapped at driver level
to an empty page in mmio space (the remapped mmio page).
This change allocate and map the remapped mmio page to
process space.



Change-Id: I89c405c41870a79c5b58eea0d8e564aa35f55182
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-04-30 09:00:16 -05:00
Eric Huang d6cde5bf08 libhsakmt: update kfd_ioctl.h regarding RAS interface
It is aligned with RAS changes in KFD.

Change-Id: I52816da01a4001158a40a1207d1fbe6ec3271343
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>
2019-03-28 21:38:44 -04:00
Oak Zeng e4109de26d Use latest kfd_ioctl.h
A new SDMA queue type for XGMI was added

Change-Id: Iad065c1a7c053a58e0d86becfb374215e316a611
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-03-07 13:25:33 -05:00
Oak Zeng faba8950d4 Delete a few SDMA queue types
The design changed. Those are not needed any more

Change-Id: Ibb1230d1c34d6ac5153275f9334af45c73805f37
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2019-01-22 14:49:05 -06:00
Philip Cox 37858f2311 Initial gfx9 debugger node suspend/resume
Change-Id: I2a5dac3d02265c11f5b6985ab457e2d1caa0a033
Signed-off-by: Philip Cox <Philip.Cox@amd.com>
2019-01-11 09:00:54 -05:00
Eric Huang 8ee93b3187 libhsakmt: add RAS support v2
RAS feature enabling bit and errors return are implemented in
existed topology and event mechanism.

v2: change library interface.

Change-Id: I75807c080b5b26e8115240b05b3d7016cb05a31a
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>
2018-12-13 10:17:12 -05:00
Eric Huang 29d11d02e8 Revert "libhsakmt: add RAS support"
This reverts commit 1fbe010354.

Change-Id: I739b17e057f2a8a0f4375741955209d2477c704a
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>
2018-12-08 19:42:33 -05:00
Eric Huang 1fbe010354 libhsakmt: add RAS support
RAS feature enabling bit and errors return are implemented in
existed topology and event mechanism.

Change-Id: I9b018bba80cf4a6998e42a7bff64318c689b1d2a
Signed-off-by: Eric Huang <JinhuiEric.Huang@amd.com>
2018-11-23 11:42:34 -05:00
Oak Zeng 055f7c9c2c Use latest kfd_ioctl.h file
Change-Id: Icd7da4a305581c6857e17d59fbd0c3bd5101df3b
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
2018-11-13 14:51:46 -05:00
Philip Cox db92d5af23 Add GFX debug trap control code
Add initial support for the kfd debugger trap support
for GFX9 chips.

   - Adding support for Enable/Disable trap support
   - Setting debug trap support data
   - Setting wave launch trap override
   - Setting wave launch mode

Change-Id: If39f2395c4b6cf56249cf76f1c44cfcbdcef891c
Signed-off-by: Philip Cox <Philip.Cox@amd.com>
2018-08-22 14:40:15 -04:00
Felix Kuehling 7495e74257 Cosmetic changes to kfd_ioctl.h
Make it more similar with upstream.

Change-Id: I982ccfd4045d96e3c30bc84d38d0e03db8de9b08
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2018-05-31 13:17:27 -04:00
Felix Kuehling 571e2cf7e4 Update KFD-Thunk ioctl ABI to match upstream
- Clean up and renumber scratch memory ioctl
- Renumber get_tile_config ioctl
- Renumber set_trap_handler ioctl
- Update KFD_IOC_ALLOC_MEM_FLAGS
- Renumber GPUVM memory management ioctls
- Remove unused SEP_PROCESS_DGPU_APERTURE ioctl
- Update memory management ioctls
    Replace device_ids_array_size (in bytes) with n_devices. Fix error
    handling and use n_success to update device_id arrays in objects.

This commit breaks the ABI and requires a corresponding KFD change.

Change-Id: Ibf0af5a5188e817c886eab388d1533130fc18293
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2018-05-31 13:17:27 -04:00
Felix Kuehling 19dacdecd3 Update kfd_ioctl.h from kernel
This adds new acquire_vm ioctl.

Change-Id: Ia6794bfd291706cecdb2d06f4902b324b48577df
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2018-03-09 16:36:52 -05:00
Yong Zhao 8126ddc77e Update kfd_ioctl.h
Kernel file has been changed recently, so we update the file in thunk.

Change-Id: I359a389fa9d91641114c7fb75f420ee6b16f467a
Signed-off-by: Yong Zhao <yong.zhao@amd.com>
2017-10-06 14:49:11 -04:00
Felix Kuehling 374bd89d8c Remove deprecated implementation of hsaKmtMapGraphicHandle
The KFD implementation has been removed and will not be upstreamed.
This API has been superseded by hsaKmtRegisterGraphicsHandleToNodes.

Change-Id: I5f2d8da3260974618cdb6ea3fdcd77d37b82c9cb
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Amber Lin <Amber.Lin@amd.com>
2017-06-02 13:52:19 -04:00
Amber Lin 683fc96325 Implement hsaKmtGetQueueInfo interface
For items in HsaQueueInfo, control stack information comes from KFD, CU
mask information is maintained in Thunk, and others (queue detail error
and queue type extended) are ignored (value = 0) at this point.

Change-Id: Ib21370b0f52b2bb4ebe6a9b4b6ec6139cccb25ca
Signed-off-by: Amber Lin <Amber.Lin@amd.com>
2017-06-01 14:15:54 -04:00
Felix Kuehling 15764e2897 Fix KFD ioctl ABI
This change breaks the ABI, and aligns it with the upstream ABI.
It also fixes some ioctl structures that are not 64-bit safe and
consolidates ioctl numbers.

Change-Id: Ib79944721534bd55a5299c5baf7bb5b3246cccd2
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2017-05-09 14:59:13 -04:00
Felix Kuehling 5eb31b2ebe Switch to cleaned up memory management ioctls
Change-Id: Ib8971ef91138f2a051272b9b57f0ebd480e8e738
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2017-05-04 16:29:37 -04:00
Felix Kuehling e5dd2f88c6 Update kfd_ioctl.h
Copied from kernel repository.

Change-Id: I9ed021cfb5b297d9a91dce93ed6355c95fb1127b
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
2017-02-27 10:39:05 -05:00
Harish Kasiviswanathan e79521b556 Add API entrypoints for Cross Memory Attach
Implement two new API for cross memory read and write operation.
 - hsaKmtProcessVMRead
 - hsaKmtProcessVMWrite

Add new ioclts necessary for the above APIs.

Change-Id: I0c153e3b4e1f32b7a8b102ad5c774d9ae9bfc2fa
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
2017-02-17 16:59:51 -05:00
Harish Kasiviswanathan 559e31d6ff Add API entrypoints for IPC functionality
Implement three new APIs for IPC buffer sharing:
	-hsaKmtShareMemory()
	-hsaKmtRegisterSharedHandle()
	-hsaKmtRegisterSharedHandleToNodes()

Add new ioclts necessary for the above APIs.

Change-Id: Ia2b4d0dc91ec64bff959395d11c0536467404792
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
2016-11-28 16:19:22 -05:00
Harish Kasiviswanathan 4838f6e740 kfd ioctl. Remove unused definitions
Sync the file with Kernel header file

Change-Id: I52d52a38fb38bd4b37d8210ce79775b88c8a985d
2016-11-22 09:44:22 -05:00
Felix Kuehling 2e0a6eb371 Allocate and map doorbells in SVM for discrete GPUs
Allocate doorbells for dGPUs in the SVM aperture and map them for
GPU access. This is necessary to allow GPU-initiated submissions to
user mode queues.

Depends on new doorbell BO allocation flag in KFD.

Change-Id: I0737bef4a4764bb4a66c43846707ead2108f6601
2016-09-16 16:04:27 -04:00
Yong Zhao 8351b3d2e8 Implement hsaKmtGetTileConfig in thunk
Change-Id: Iba8d8efa46e3c268a03442d3db568e1b19230e94
2016-09-06 16:24:29 -04:00
shaoyunl 79077811f5 Add Imprecise flag for memory access fault
KFD may not be  able to provide the precise VM fault address and status.
This flag will indicate whether the event data has the fault details

Change-Id: I15ffd5c25f555003c6450cc0700efb769418f76b
2016-03-14 15:17:17 -04:00
Felix Kuehling cb0315d31d Update kfd_ioctl.h from kernel
Change-Id: I9852ef2e33e1f3b24343747e3c1c09b0050ffdc1
2016-03-09 10:55:12 -05:00
Felix Kuehling 85f9efb1a0 Add support for register/deregister memory for dGPU
Allocate SVM address space for the registered memory and use new
userptr support in KFD to create a system memory BO associated with
the given user pointer. Map this BO at the SVM address for CPU
access.

MapMemoryToGPU can be used with the registered user pointer and
will return the SVM address as alternate GPUVA.

Change-Id: I4886e193c51fb6870a567878870c36bf8b5c3748
2016-02-16 18:12:05 -05:00
shaoyunl 7e40877e81 libhsakmt: Use GPU ID instead of Node ID in set_process_dgpu_aperture
Change-Id: I0e66ca4a018c15c009a3516d250f0044a4407878
2016-02-04 10:32:23 -05:00
Harish Kasiviswanathan e7e1361c3d Use new ioctl for getting process apertures
Change-Id: I73678744ad73942edec442ad9c6d38637f7e1235
2016-01-12 12:09:25 -05:00
Ben Goz ea0f9d2a0b Adding support for mGPU
Change-Id: I5ed184e6a58b38d9dde48867f14513d161cf41a9
Signed-off-by: Ben Goz <ben.goz@amd.com>
2016-01-04 15:35:15 +02:00
Ben Goz e61500c46e Adding support for new AQL Queue Memory allocation
Change-Id: If84fc4b961627dbdd0b77b1c509a3c9a4c709b9f
Signed-off-by: Ben Goz <ben.goz@amd.com>
2015-10-22 13:13:54 +03:00
shaoyunl 2d63ee7b8f Initiali support for CWSR on thunk
1. Add IOCTL defines to set trap handler
2. Add control stack size information on create queue argument.
3. Increase the total save&restore area size for carrizo to include the control stack size.

Signed-off-by: Shaoyun Liu <Shaoyun.liu@amd.com>

Change-Id: Iccf15e073b7db2519e96e7f7b46a89d57ab9a4df
2015-09-25 15:12:25 -04:00
Ben Goz 692e004047 Adding new memory allocation IOCTL
Change-Id: I0eb1924811a2e1e436296ebe632d8f112a61637d
Signed-off-by: Ben Goz <ben.goz@amd.com>
2015-09-21 13:58:32 -04:00
Ben Goz fb8378a18b Support gfx802 dGPU
Signed-off-by: Ben Goz <ben.goz@amd.com>
2015-08-30 14:13:53 +03:00
Flora Cui fc4e07daa3 Add interface to set CU mask
Signed-off-by: Flora Cui <flora.cui@amd.com>
Acked-by: Ben Goz <ben.goz@amd.com>
2015-07-23 15:44:01 +08:00
Moses Reuben 29c083f695 adding support for scratch memory
Signed-off-by: Moses Reuben <moses.reuben@amd.com>
2015-07-21 16:43:23 +03:00
Oded Gabbay 2e76017278 increase event limit to provide 4K events
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
2015-05-18 11:01:42 +03:00
Oded Gabbay a70a98b30b Increase limit of signal events to 4096
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Reviewed-by: Ben Goz<ben.goz@amd.com>
2015-05-03 13:58:10 +03:00
Ben Goz b27de08442 Adding support for mmap events page from Thunk
Signed-off-by: Ben Goz <ben.goz@amd.com>
2015-03-24 17:55:54 +02:00
Oded Gabbay e62d46ba1c Don't alloc/free VRAM in map/unmap paths
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
2015-02-25 22:49:11 +02:00
Oded Gabbay 5c0f8660b6 Revert "Workaround for non cached memory issue on gfx801 A0"
This reverts commit 402ff3f881.

Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Acked-by: Ben Goz <ben.goz@amd.com>

Conflicts:
	include/linux/kfd_ioctl.h
	src/queues.c
2015-02-16 17:22:45 +02:00
Yair Shachar 89188a6d6c Modify HW dbg thunk,to adapt to new KFD-thunk interface
Signed-off-by: Yair Shachar <yair.shachar@amd.com>
2015-02-08 21:44:47 +02:00
Oded Gabbay 8cc0b16293 match kfd_ioctl.h to kernel repo
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
2015-01-19 17:18:47 +02:00
Alexey Skidanov d7196d4122 IOCTL: Adding memory exception data
Signed-off-by: Alexey Skidanov <Alexey.Skidanov@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@amd.com>
2014-11-27 16:21:53 +02:00
Ben Goz 402ff3f881 Workaround for non cached memory issue on gfx801 A0
Signed-off-by: Ben Goz <ben.goz@amd.com>

Adjust to new ioctl format

Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
2014-12-07 14:51:53 +02:00
Oded Gabbay 7972bb00c5 kfd_ioctl: interop
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
2014-12-08 10:02:34 +02:00
Oded Gabbay d14eb7aa00 kfd_ioctl: local memory
Add two new IOCTLs

Remove old IOCTLs

Signed-off-by: Alexey Skidanov <Alexey.Skidanov@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@amd.com>
2014-12-08 10:02:27 +02:00
Oded Gabbay f7c3c3bd1b kfd_ioctl: debug
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
2014-12-08 10:02:12 +02:00