提交图

39 次代码提交

作者 SHA1 备注 提交日期
Amber Lin e4e6d49bfa Sync up gfx803 DIDs with KFD
Add gfx803 10/11 device IDs that were recently added to KFD.

Change-Id: Id40b117ae47bacedefa6e333fdfdf58dea92cd2d
Signed-off-by: Amber Lin <Amber.Lin@amd.com>


[ROCm/ROCR-Runtime commit: 72b842a6dc]
2017-02-01 12:05:24 -05:00
Harish Kasiviswanathan 6f2b43d96e Add fork support
If fork() is called, clear all duplicated data that is invalid in the
child process.

Change-Id: I4e27198060db593c630c6337b7071dfbd0d80b83
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>


[ROCm/ROCR-Runtime commit: f1f62d863c]
2017-01-12 14:38:30 -05:00
Felix Kuehling f07e9a5606 Allocate CWSR buffer in system memory
CWSR buffers can be large on dGPUs (~21MB on gfx803). Allocating them
in VRAM limits the number of queues that can be created unnecessarily.

Also make freeing of per-queue buffers symmetric with allocation. All
buffers are now allocated with allocate_exec_aligned_memory on dGPUs
and APUs, so use free_exec_aligned_memory to free them.

Change-Id: I45e8cb1801857d0268750202cdd422426611e457


[ROCm/ROCR-Runtime commit: 4181b408fc]
2017-01-04 16:07:56 -05:00
Jay Cornwall 469f3a5b5d Disable GPUVM-mapped doorbell on gfx802
gfx802 requires a workaround for a VM TLB bug in which lookups use
the ACTIVE bit of the 8th PTE within any aligned group of 8 PTEs.
Until this is fixed in amdgpu the GPUVM doorbell logic will fail.

Change-Id: I5ec7b1fcd8b7677011a141d27cfc486c45d9a415
Signed-off-by: Jay Cornwall <Jay.Cornwall@amd.com>


[ROCm/ROCR-Runtime commit: 5493ae420b]
2016-10-10 18:39:31 -05:00
Felix Kuehling fee7a91fb9 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


[ROCm/ROCR-Runtime commit: 2e0a6eb371]
2016-09-16 16:04:27 -04:00
Kent Russell 2d604a8498 queues.c: Enforce CUMaskCount being a multiple of 32
The thunk spec requires that CUMaskCount be divisible by 32. Check this
and return INVALID_PARAMETER if it is not.

Change-Id: I4e0c8502d996d3da31224b817a5d4ff2c6054e13


[ROCm/ROCR-Runtime commit: 70b1b5b17e]
2016-08-23 06:16:39 -04:00
Amber Lin 194f2083d2 Add gfx803 support
Add gfx803 and gfx80311 device IDs to the support

Change-Id: I16220fd811db102c02e5e0c5b82e40ec299877af


[ROCm/ROCR-Runtime commit: 876384305b]
2016-08-08 11:30:57 -04:00
shaoyunl 18373473c3 libhsakmt: Compute context save area size depends on CU num
Change-Id: Iaf35ddeee9fe5a6367097483f67c4adaa0796d7d
Signed-off-by: shaoyunl <Shaoyun.Liu@amd.com>


[ROCm/ROCR-Runtime commit: bf16caa75f]
2016-06-10 10:19:40 -04:00
shaoyunl 62d4e557ed libhsakmt: Add new device id for virtualized function of gfx803
Signed-off-by: Shaoyun Liu <Shaoyun.liu@amd.com>
Change-Id: I90b0bdaeaed8e9e80375e5a7a142205f2a542289


[ROCm/ROCR-Runtime commit: 16d5aa0d83]
2016-05-12 13:25:01 -04:00
Felix Kuehling 87bd249ed5 Add gfx70x support
Change-Id: I400adb62b5225ef3a42da279d067fb0a62907089


[ROCm/ROCR-Runtime commit: 97e51ce33d]
2016-04-25 14:27:44 -04:00
Felix Kuehling 03720306b9 Make hsaKmtAllocMemory more compliant with the Thunk spec
Allocations from GPU nodes will return VRAM, not system memory.
Only non-paged allocation from GPU nodes is supported. System
memory can only be allocated from CPU nodes (usually node 0).

The HostAccess flag is no longer used to distinguish the memory
type. It only indicates, whether the memory is mapped for CPU
access.

Maintain compatibility with broken KfdTests by returning system
memory for paged-memory requested from GPU nodes.

Change-Id: I514defede735f55e6de436f41944125b6f2c4ccf


[ROCm/ROCR-Runtime commit: 887b32fe86]
2016-02-10 10:29:54 -05:00
shaoyunl 60bbf00fb1 libhsaKmt: Add CWSR support on dGPU
This is thunk part of the  CWSR support.
1. SDMA queue don't support CWSR , no necessary to allocate the context save/restore memory
2. Allocate the context save/restore memory in local frame buffer for dGPU

Change-Id: Ie83506f0cced2a5a537c49d68125796d831c2764


[ROCm/ROCR-Runtime commit: 4e6c25e55b]
2016-02-04 15:00:58 -05:00
Felix Kuehling 61039bcd36 Remove gfx802 page size workaround on gfx803
All tonga page size alignment is done in the memory management
functions in fmm.c. All other code only specifies the minimum
alignment it needs and lets fmm.c handle the HW-specific
alignment.

Clean up aligned-exec memory allocation in queue.c to remove
hard-coded TONGA_PAGE_SIZE alignments and remove code duplication.
Make sure alignments are consistent between allocate and free.

Change-Id: Ia8923448173d1cef315af24cebff12adef385cb0


[ROCm/ROCR-Runtime commit: cc9fc386bd]
2016-01-28 16:05:18 -05:00
Harish Kasiviswanathan b687eaf2c2 Don't limit number of supported HSA Nodes
Remove #define MAX_NODES 8

Change-Id: I756cadc652543dd17ea48a1c956adc08c3d2631a


[ROCm/ROCR-Runtime commit: 5e53205b9e]
2016-01-15 17:27:43 -05:00
Harish Kasiviswanathan 14358ee07f Don't limit number of supported GPUs
Stop using NUM_OF_SUPPORTED_GPUS. For now the definitions itself cannot
be removed as ioctl code is in upstream Kernel.

Change-Id: If846625a8ad5062d5483e762850c793d3c00b9d0


[ROCm/ROCR-Runtime commit: ce83dc623f]
2016-01-15 11:44:42 -05:00
Felix Kuehling c89d3124d9 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


[ROCm/ROCR-Runtime commit: 063ad3ad9e]
2016-01-08 16:00:23 -05:00
Ben Goz 2fa7eef572 Adding support for mGPU
Change-Id: I5ed184e6a58b38d9dde48867f14513d161cf41a9
Signed-off-by: Ben Goz <ben.goz@amd.com>


[ROCm/ROCR-Runtime commit: ea0f9d2a0b]
2016-01-04 15:35:15 +02:00
Philip Cox 782cea350c Add SDMA IOCTL type to Create Queue function.
Change-Id: I7e31507b761ca388b2cac93f994f6106de962f17


[ROCm/ROCR-Runtime commit: 0c234c7ef3]
2015-10-29 10:25:41 -04:00
Harish Kasiviswanathan 462a775ec3 Fix hard-coded usage of Node 0
Use appropriate NodeId instead

Change-Id: I46af93b76978fea7bedb34457fcc0864ed4fe2d4


[ROCm/ROCR-Runtime commit: b6c6f79143]
2015-10-14 17:27:38 -04:00
Felix Kuehling 574fcdd340 Fix various dgpu memory management issues
Fix TONGA_PAGE_SIZE value and move it to libhsakmt.h for usiing it
consistently in all places that require the same alignment for the
same reason. Create a generic alignment helper macro to replace some
incorrect hand-coded size alignments.

Move virtual address and size alignments down into aperture management
functions. Alignment is a per-aperture property that is set during
fmm_init_process_apertures. Doing the alignment there ensures that
all allocations in the same aperture are aligned the same way. Finding
objects by size and address can take the alignment into account.

Also align the size of physical allocations to back aligned virtual
address allocations. CPU mappings do not need to be aligned.

Map anonymous pages over released memory mappings to allow the
backing pages to be released, while keeping the address space
reserved.

Add alignment parameter to free_exec_aligned_memory_gpu to match the
interface of allocate_exec_aligned_memory_cpu. It doesn't make sense
to allow an alignment parameter in one but assume a specific
alignment in the other.

Change-Id: I74226ca6938f4948f643e5aee1d474720cd89e78


[ROCm/ROCR-Runtime commit: 6a5ca4bc5a]
2015-10-13 19:14:56 -04:00
Felix Kuehling a4c4170906 Add support for gfx803
Create new device_info and add device ID. Add helper macros to
identify chip families (VI, discrete). For now gfx803 behaves like
gfx802. But if necessary we can have gfx802 or gfx803-specific
code paths or workarounds in the future.

Change-Id: I61b4ffef7dd7796bb34cb01fbff0089bd49507bb


[ROCm/ROCR-Runtime commit: 0fc0a5b526]
2015-10-09 17:40:54 -04:00
Felix Kuehling c3a1263604 Add all gfx802 device IDs to supported_devices
Without this, queue creation segfaults on unknown devices.

Change-Id: Ieea0bc4783e7313b3dcdabf03ab1269e3670b217


[ROCm/ROCR-Runtime commit: 7505893cc7]
2015-10-02 15:33:37 -04:00
shaoyunl d30daaba5d 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


[ROCm/ROCR-Runtime commit: 2d63ee7b8f]
2015-09-25 15:12:25 -04:00
Ben Goz 9db147f2d4 Support gfx802 dGPU
Signed-off-by: Ben Goz <ben.goz@amd.com>


[ROCm/ROCR-Runtime commit: fb8378a18b]
2015-08-30 14:13:53 +03:00
Ben Goz 918ad5eac6 Revert "Enable creating SDMA queue."
This reverts commit fcf6e22216.


[ROCm/ROCR-Runtime commit: bb4a5cddd9]
2015-08-05 13:33:42 +03:00
Flora Cui 0f0e28cbdb Add interface to set CU mask
Signed-off-by: Flora Cui <flora.cui@amd.com>
Acked-by: Ben Goz <ben.goz@amd.com>


[ROCm/ROCR-Runtime commit: fc4e07daa3]
2015-07-23 15:44:01 +08:00
Xihan Zhang fcf6e22216 Enable creating SDMA queue.
Signed-off-by: Xihan Zhang <xihan.zhang@amd.com>
Reviewed-by: Ben Goz<ben.goz@amd.comt>


[ROCm/ROCR-Runtime commit: 112f7e751a]
2015-04-28 23:42:49 +08:00
Oded Gabbay 7a243604ad Disable SDMA queue creation
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>


[ROCm/ROCR-Runtime commit: 13e0d87733]
2015-03-01 14:40:16 +02:00
Oded Gabbay ecf262fd54 Revert "Disable SDMA queue creation"
This reverts commit c1cfb2a540.


[ROCm/ROCR-Runtime commit: 417e6f7501]
2015-03-01 14:36:45 +02:00
Oded Gabbay c1cfb2a540 Disable SDMA queue creation
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>


[ROCm/ROCR-Runtime commit: f3ac33230e]
2015-03-01 11:08:46 +02:00
Oded Gabbay 9a511e8e1e Revert "Workaround for non cached memory issue on gfx801 A0"
This reverts commit b494094790.

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


[ROCm/ROCR-Runtime commit: 5c0f8660b6]
2015-02-16 17:22:45 +02:00
Ben Goz a22e054980 fix a bug in rptr page release
Adjust to new ioctl format

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


[ROCm/ROCR-Runtime commit: e7a5cda5a5]
2014-12-14 13:49:41 +02:00
Ben Goz b494094790 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>


[ROCm/ROCR-Runtime commit: 402ff3f881]
2014-12-07 14:51:53 +02:00
Ben Goz 75895e0f5e Supporting QCM for gfx801
Signed-off-by: Ben Goz <ben.goz@amd.com>


[ROCm/ROCR-Runtime commit: c5585b0f26]
2014-12-07 14:50:28 +02:00
Ben Goz 4676447863 Add SDMA queues support
Signed-off-by: Ben Goz <ben.goz@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>


[ROCm/ROCR-Runtime commit: 8afe1ef4e8]
2014-07-01 16:51:57 +03:00
Oded Gabbay 22136281cb Move from direct call to kfd_ioctl to wrapping kmtIoctl
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>


[ROCm/ROCR-Runtime commit: 94c0329fc4]
2014-12-29 15:37:42 +02:00
Oded Gabbay f231b71743 Change names of IOCTLS
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>


[ROCm/ROCR-Runtime commit: 9f647b07ff]
2014-12-29 13:34:32 +02:00
Ben Goz 89e31c5281 Add queues module
Signed-off-by: Ben Goz <ben.goz@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>


[ROCm/ROCR-Runtime commit: 678287d98b]
2014-07-29 13:56:50 +03:00
Oded Gabbay a91aa132aa Add skeleton driver which supports open and close
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>


[ROCm/ROCR-Runtime commit: 85ba9efa18]
2014-07-29 11:16:00 +03:00