This reverts commit f94be2078c.
Change-Id: I954326d9a291280de7c9b7ef49a8cce0cd9dd9ad
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: a809a5bf32]
This reverts commit 559bb50c6a.
Change-Id: Ibd32ac36bcb9ee418957d25b240ef9dd9172fbd3
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 91b0fce535]
This reverts commit 14d821391e.
Change-Id: Idf636655ac01f569d8e92e9c0e100e5db7d1cb61
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 445fcd803b]
Map readonly range to GPU, test GPU can read range but write to
range trigger GPU vm fault.
Change-Id: Id2ce106055a353f21f4c34fa7f562d546523bc49
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: f9648c5014]
To test if SVM support address mmap on file backed memory.
Change-Id: I227cc0b44d167c4fa2e63257e13a481aefa4f750
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: d91f92669b]
This reverts commit 8f735fb9d5.
Reason for revert: aqlprofile has merged
Change-Id: Iee0fbe8ac1e475123273b328949f68f10490d3ca
[ROCm/ROCR-Runtime commit: 268bb1ae84]
g_props is intialized in topology_take_snapshot which needs to call
hsaKmtAcquireSystemProperties. In hsaKmtOpenKFD, it doesn't call hsaKmtAcquireSystemProperties.
So it needs to change parameter of topology_is_svm_needed from node_id
to EngineId to avoid Segmentation fault on gfx902.
Signed-off-by: changzhu <Changfeng.Zhu@amd.com>
Change-Id: Iba8d20a9142510c70927454d26bdcaf579ad5574
[ROCm/ROCR-Runtime commit: 978028d3f6]
Use the database provided by libdrm-amdgpu,as this is maintained by AMD
Signed-off-by: Mike Li <Tianxinmike.Li@amd.com>
Change-Id: I319a46d833cb23173a77fdff1deae69ea58588b8
[ROCm/ROCR-Runtime commit: cb1c84d99b]
Consolidate all thunk components into a single development package
Also declare build dependencies via find_package/library and report the
location of said dependencies during build time
Change-Id: I8524ad1a2d9a664accd93471abacc4bac82b9a7c
Signed-off-by: Kent Russell <kent.russell@amd.com>
[ROCm/ROCR-Runtime commit: 79d00a35f9]
The major version of the debug ioctl functions has been updated to 10.
Change-Id: Iddc8656ad07c92aa30c6a7a99add28ab3a3f5a80
[ROCm/ROCR-Runtime commit: d0ae4b1f3f]
Update KFDCWSRTest.BasicTest to run CWSR test with legacy HWS,
MES, and software scheduler.
Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Change-Id: I09af904507109c2bbbace6ff616a57fa2b1b8aa9
[ROCm/ROCR-Runtime commit: acd5eda54f]
This is reported as failing on pretty much every ASIC, so move it to the
temporary exclude list for all ASICs until the test can be fixed.
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: I2973feb5705c178db32009e4603376d1f5e94a2f
[ROCm/ROCR-Runtime commit: 52f5b666d6]
If lookup is successful, device info from find_hsa_gfxip_device() is
used to populate props->EngineId.ui32 gfx version fields and node CAL
name (props->AMDName).
If unsuccessful, uses gfx_target_version sysfs field if present
(otherwise results in error), and sets the node CAL name to
"GFX<GFX_VERSION>" (e.g. 9.0.8 -> GFX090008).
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Id39c521b769aebbe40c934f19e03150a66884cce
[ROCm/ROCR-Runtime commit: bb8deeae11]
Some g_system and Node ID checks already performed by validate_nodeid().
Fixes bug where hsaKmtGetNodeProperties() would return on
validate_nodeid() error without releasing lock. Switches some
conditionals to return INVALID_NODE_UNIT instead of INVALID_PARAMETER if
NodeId >= NumNodes. Removes some g_system assertions to return error
code rather than trigger a hard fault.
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Id1604b20c2cef8808b98cdad61bd47aa7ea3d229
[ROCm/ROCR-Runtime commit: 29369753f5]
All conditional logic previously dependent on asic_family now dependent
on gfx version. As such, HSA_FORCE_ASIC_TYPE is now deprecated and
HSA_OVERRIDE_GFX_VERSION should be used instead.
device_info structs containing asic_family, eop_buffer_size, and
doorbell_size removed (alongside dev_lookup_table[]). eop_buffer_size
and doorbell_size now determined via macro, with eop_buffer_size and
full gfx version field being added to queue struct.
Certain funcs previously dependent on DID or GPU ID now dependent on
Node ID (due to use of get_gfxv_by_node_id()).
Fixes sleeper bug where ctl_stack_size and debug_memory_size were being
incorrectly programmed on gfx90a.
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Iaabdc5c73920ad83b4b379cd6086992357b8ff10
[ROCm/ROCR-Runtime commit: 8f883d0830]
get_block_properties() switch statement now based on major GFX version
instead of asic_family. Addition for NPI bringup only needed on major
GFX revisions unless differing perf_counter_block assignment necessary.
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Ia02676d2a3a8f968b67feeafbab534ef4c01c0dd
[ROCm/ROCR-Runtime commit: 0b46d418c3]
Add defines for converting between full gfx version (in decimal) to
major/minor/stepping values, and major/minor/stepping values to full gfx
version (in hex). The first is to be used when grabbing the gfx version
from sysfs, the second when returning the gfx version in
get_gfxv_by_node_id() for comparisions in Thunk.
Add enum for defines of full gfx versions for various cards. These are
to be used in conditionals to replace CHIP_*/asic_family comparisons. On
NPI bringup, addition to this enum will not be required for
functionality unless explicitly needed for a conditional. Most ASICs in
this enum simply for completeness.
Add get_gfxv_by_node_id(): returns full gfx version in hex.
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I9d1dba7fdd4a587a000eea2f4141a1d301bf4776
[ROCm/ROCR-Runtime commit: 8880610265]
This was an implicit requirement, but the change to needing libdrm/drm.h
means we should be explicitly looking for this package during the build
Change-Id: I75064bf6f5477cb1ca99318681afca76c0060f72
[ROCm/ROCR-Runtime commit: 6778da4460]
Expand check control stack size for Beige Goby, Van Gogh and Yellow Carp.
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Change-Id: I6c8345bbb751eb9179fc740fe1674504b4295a5f
[ROCm/ROCR-Runtime commit: fc216a3668]
Put CHIP_gfx90a next to CHIP_gfx908 to keep all the GFXv9
chips together.
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Change-Id: I32b4b7f7746ae4bdaff7e178f13307c1bcfa93e1
[ROCm/ROCR-Runtime commit: 80e4cb6261]
Query pointer info return HsaPointerInfo with MemFlags for all pointer
type now.
Change-Id: I3c02b7b71ba0af953035e3ed9cd6bb6435bb9b65
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 991cde0656]
hsaKmtAllocMemory with mflags.HostAccess=1 will fail on desktop gfx1xxx GPU
because it's small bar PCIe. Remove this flag.
Child process exit status should use current_test_info, not unit test
info.
Change-Id: I060f23aa98a42251921d003878e70a409c92a4de
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 413979c319]
Parent process alloc memory with specific HsaMemFlags, child process
import the memory handle exported by parent process, query shared memory
pointer info, verify it has same HsaMemFlags.
If child process test failed, exit with error code to notify parent
process.
Change-Id: I5c9534e931b4565186d27124868799b893504c81
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 426b94015c]
Test if query userptr pointer info return correct alloc flags,
CoarseGrain by default.
Test if query hsaKmtAllocMemory pointer info return correct alloc
CoarseGrain flags.
Change-Id: If3a1175645717e5d7c475d6ff35b02d6876a1f7c
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: c3c1618db7]
hsaKmtQueryPointerInfo return vm_obj flags for all below registered
memory types other than hsaKmtAllocMemory, and set the CoarseGrain flag
correctly for:
Graphics: always coarse grain.
Shared: hsaKmtShareMemory pass mflags with export handle to KFD to store
in KFD objs, hsaKmtRegisterSharedHandle get mflags from KFD with import
handle.
Userptr: it is already coarse-grain by default, or based on mflags
provided in hsaKmtRegisterMemoryWithFlags call.
Change-Id: Idc23e8b0cf599b02580737639da2f9ef4ccd0c0d
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: fa7b4a6268]
Query pointer info returns KFD_IOC_ALLOC_MEM_FLAGS_* flags, it should
return HsaMemFlags, fix it by renaming vm_obj->flags to mflags and
always saving HsaMemFlags.
Use consistent function parameter and variable name to avoid confusion:
mflags for HsaMemFlags and ioc_flags for KFD_IOC_ALLOC_MEM_FLAGS_*
flags.
AMDKFD_IOC_GET_DMABUF_INFO return ioc_flags, translate it to mflags
using new helper fmm_translate_ioc_to_hsa_flags.
Change-Id: If9e117c507139c0166abb1ab0df8c233ef7e48a1
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 2c796e62be]
0x73E3 DID was missing, add it.
Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: Id1ae2f268e0e8b5cfec5ae2065153fe73854b93a
[ROCm/ROCR-Runtime commit: ed62c7aa1c]
sync with KFD ioctl version 1.6:
1.6 - Query clear flags in SVM get_attr API
Change import export handle args pad field to flags, to pass memory
alloc flags from alloc process to import process.
Change-Id: I69360b244651947e885c4a8da9f64a1163101d20
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: dee9c023a2]
kernel-headers provides the drm/drm.h path, while libdrm-dev[el]
provides the libdrm/drm.h path, which is what we want to use. Fix the
path so we use the newer drm.h header, as well as fixing SLES, which
doesn't provide drm.h in their kernel-headers.
Change-Id: Icb2b6643698d356169e3baeef17527a1b4e05483
[ROCm/ROCR-Runtime commit: 4f3440a8ac]
Update to thunk API introduced dependency on drm.h in commit
1001f27cb5 libhsakmt: update thunk api for exception handling
so update dependency list in SLES builds.
Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Change-Id: I6d987fac07612e3eca7b6087205d76df50dc13d9
[ROCm/ROCR-Runtime commit: 303c0748ce]
Add hsaKmtRuntimeEnable and disable.
Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Change-Id: I083f9293948e975546a1b3c1334cb41499b9ab1f
[ROCm/ROCR-Runtime commit: 1ce548829b]
The debugger and debug agent no longer use the Thunk API.
Remove all deprecated functions and keep commented
references for future KFD tests.
Update and the keep the version checks for future use
and hsaKmtRuntimeEnable/Disable.
Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Signed-off-by: Laurent Morichetti <laurent.morichetti@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Change-Id: Ia2f10d82f5ac36d0bd1bda233810f26e8a154d55
[ROCm/ROCR-Runtime commit: 31ac82617c]
Update hsaKmtCreateQueue to initialize the new save area header with the
exception payload and event ID.
Signed-by-off: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Reviewed-by: Sean Keely <sean.keely@amd.com>
Change-Id: Icd38062dc982cb29b30644699014eeb0b3e26d00
[ROCm/ROCR-Runtime commit: 96c7a5c9dc]
__fmm_release is sometimes called with the aperture lock, and sometimes
without. Consistently call it with the aperture lock held and remove the
lock/unlock calls from this function.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: I80dddc64cc0703e5eed8e9f1eb65b75a2c7ae2eb
[ROCm/ROCR-Runtime commit: 5fac7dcc3b]
Unlock mutex if MMIO mapping fails. This happens on all GFXv8 GPUs.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: I1dee1cbddefd9185c24ea79377f49f8ae2c5ff57
[ROCm/ROCR-Runtime commit: 19536080a8]