커밋 그래프

55 커밋

작성자 SHA1 메시지 날짜
ozeng cb0f851560 libkmt: Misc fixes in thunk
1. Translate thunk queue priority to kfd priority
2. Initialize event SyncVar
3. Added HSAint32 data type


Change-Id: I7decc1be7cbe9c84cb670d9a7c99050b62ba98f3
2017-02-06 17:19:40 -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
Amber Lin 51e4d27c37 Add pointer attributes API
Add two pointer attributes APIs:
hsaKmtQueryPointerInfo - allow the user to query the memory information
    using a pointer. This pointer can point to any address inside the
    range known to HSA.
hsaKmtSetMemoryUserData - allow the user to attach data to a pointer to
    add memory tracking information. This pointer must match the start
    address of a memory allocation or registration.
TODO: This patch implements support on dGPU. Needs to add APU.

Change-Id: I4711809274248434901f0794f50ebfa13a7371a8
2016-09-07 17:24:46 -04:00
Yong Zhao 8351b3d2e8 Implement hsaKmtGetTileConfig in thunk
Change-Id: Iba8d8efa46e3c268a03442d3db568e1b19230e94
2016-09-06 16:24:29 -04:00
Lan Xiao 9cbbf30be7 libhsakmt: Add MarketingName and AMDName for all nodes - CPU & GPU
HSA thunk API is currently reporting engineering name to MarketingName
and returning NULL when querying for AMDName.

-Change current name reporting from MarketingName to AMDName.
-Use libpci to get MarketingName



Change-Id: I819a6de7b067a2e724a6695e7d800274b83a71f8
Signed-off-by: Lan Xiao <Lan.Xiao@amd.com>
2016-08-23 10:49:27 -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 0ed29f5191 Report SVM heap in topology
The Runtime requested this information so they can tell easily
whether a pointer is part of HSA shared address space or not.


Change-Id: If2041ed34031636677d692bc2dc6625634027ed4
2016-03-14 11:52:36 -04:00
Harish Kasiviswanathan 1c1bc32477 Sync IOLINK defines to thunk spec
Current thunk spec v1.07 dated Feb 1, 2016

Change-Id: Ie1821f7f1903ac48b76cb68d452a6073d3a3c8d9
2016-03-11 18:59:57 -05:00
Felix Kuehling 61ec3df2f9 Add support for hsaKmtRegisterGraphicsHandleToNodes
Change-Id: I6fd7154dea78188480d5cb89ac237bad572356c4
2016-03-10 11:16:02 -05:00
Felix Kuehling cb0315d31d Update kfd_ioctl.h from kernel
Change-Id: I9852ef2e33e1f3b24343747e3c1c09b0050ffdc1
2016-03-09 10:55:12 -05:00
Yair Shachar c42ec0b82c name unnamed struct within HsaMemMapFlagd union
For aligning with RT definitions

Change-Id: I4dca0c5818fdcea6c596a48c7516835fc595a289
Signed-off-by: Yair Shachar <Yair.Shachar@amd.com>
2016-03-07 18:43:03 +02: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
Ben Goz 7070f7ec5e Adding support to hsaKmtMapMemoryToGPUNodes
Change-Id: Iab6222402a43c3cd31b0efc5a316a6482986258e
Signed-off-by: Ben Goz <ben.goz@amd.com>
2016-02-09 17:34:29 +02: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
Ben Goz e37863d7f2 Adding HsaMemMapFlags struct
Change-Id: Ib0ee6dede1169582fd58bfca648347c3f8aa0b54
Signed-off-by: Ben Goz <ben.goz@amd.com>
2016-01-31 05:16:53 -05:00
Harish Kasiviswanathan e7e1361c3d Use new ioctl for getting process apertures
Change-Id: I73678744ad73942edec442ad9c6d38637f7e1235
2016-01-12 12:09:25 -05:00
Felix Kuehling 063ad3ad9e Implement hsaKmtRegisterMemoryToNodes
Fix hsaKmtRegisterMemory to be a no-op for now and move the multi-GPU
implementation to hsaKmtRegisterMemoryToNodes. Make GPU memory mappings
of host memory visible to all GPUs by default. Device memory is still
visible to the allocating GPU only by default (but can be overridden
with hsaKmtRegisterMemoryToNodes for experimenting with P2P).

Change-Id: I73408afbe3b10c8dad2ab3a780f58413249692e6
2016-01-08 16:00:23 -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
Felix Kuehling b94ae66c62 Update HsaMemFlags.ui32.CoarseGrain comment
As advised by Paul Blinzer

Change-Id: Icabf4acd94866ddbbe53faf48a71e1113f0c76b6
2015-10-05 16:48:50 -04:00
Felix Kuehling f2f45cc0e4 Add CoarseGrain memory flag
Change-Id: If8ac0339ae8c809c6e6a4f56592a4061d110ea94
2015-09-30 18:07:04 -04: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
Amber Lin 082f8314c4 Sync up HSA_ENGINE_ID type with Windows/Perforce
HSA_ENGINE_ID in Perforce added ui32 to the typedef while in Git it doesn't.
This causes conflicts to RT applications. Decision being made is to change Git
to match Perforce.

Change-Id: I7e9c6437b023bb23ec9578737f8534e9453589b9
2015-09-24 00:10:52 -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
Amber Lin a3925a3a19 Enable version info via thunk interface
- Replace HSAuint32 with HSA_ENGINE_ID for EngineId type so it explicitely
  presents version information for ucode and GfxIP
- Created a GfxIP lookup table to pass the version information. This lookup
  searches for matching device ID.

Signed-off-by: Amber Lin <Amber.Lin@amd.com>
Acked-by: John Bridgman <John.Bridgman@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
2015-07-31 14:56:33 -04: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
Oded Gabbay eb2d3cfcdf Add missing DoorbellType field to HSA_CAPABILITY
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
2015-05-02 12:10:04 +03:00
Oded Gabbay 4c4df38035 Revert "Add execution property in register memory for gfx801."
This reverts commit 5ed05c99b3.
2015-04-28 17:50:00 +03:00
Xihan Zhang 5ed05c99b3 Add execution property in register memory for gfx801.
Signed-off-by: Xihan Zhang <xihan.zhang@amd.com>
2015-04-10 22:26:44 +08: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 f0a7fcccc9 Match as much as possible hsakmt.h and hsakmttypes.h to p4
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
2015-02-03 11:13:13 +02:00
Ben Goz 25441796bd Supporting new thunk spec - adding relevant memflags
Signed-off-by: Ben Goz <ben.goz@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@amd.com>
2015-02-01 14:33:33 +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
Alexey Skidanov 36ccd7f867 Adding memory event type and definition of memory exception data
Signed-off-by: Alexey Skidanov <Alexey.Skidanov@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@amd.com>
2014-11-27 15:54:21 +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
Ben Goz bd7e10b0ec Adding support in allocating executable memory
Signed-off-by: Ben Goz <ben.goz@amd.com>
2014-12-07 14:36:21 +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 d995344ae7 Add new definitions of HSA functions and types
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
2014-10-20 08:48:28 +03: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