Commit Graph

15 Commitit

Tekijä SHA1 Viesti Päivämäärä
Philip Cox b0d23aee16 fix suspend/resume logic in debug_trap code
There was a mistake and RESUME was used when it should
have been suspend in two places in the suspend resume
code.  This fixes that error.


Change-Id: I69be733d7ae7c14ce5ee8af57a307976e4212d62
2019-05-07 06:56:00 -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
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
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
Laurent Morichetti 056ddbbc82 Silence Valgrind warnings
Change-Id: I8803f3d310fccd69d0d04b2464b00dccc40270e3
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2018-01-25 16:48:17 -05:00
Philip Yang 3501b2f40d Fix double free on fork after hsaKmtCloseKFD
Child process hsaKmtOpenKFD() call must re-initialize global variables
copied from parent process. This includes close all file handles, free
dynamically malloc buf. Double free issue is because destroy_device_
debugging_memory() free the memory in parent process hsaKmtCloseKFD()
but don't reset it to null pointer. As a result, child process free it
again. kfd_fd is closed in parent process but don't reset to 0, so
child process close it again.

Fix: reset kfd_fd to 0 after close, reset is_device_debugged pointer to 0
after free



Change-Id: I421b3decbcaa4111298b8e599aa16940d851a58c
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
2017-10-26 15:36:15 -04:00
Kent Russell b78e0e152a Clean up thunk code
Use checkpatch.pl to fix the majority of errors. Some that remain and
will be excluded:
Use of typedefs/externs/volatile/sscanf
Lines over 80 characters

Remaining errors are due to misunderstanding the * symbol with typedefs

Also use this opportunity to spell manageable properly

Change-Id: I0b335e9cb3e1eea38bee27eaa1f582b2c9b09b38
2017-05-31 14:38:59 -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
Yair Shachar a815a4337f Disable scratch Host allocation - via debug registration flags.
Change-Id: Ia6e5f86ec3979c4a49800f7af4509442a4e5be27
Signed-off-by: Yair Shachar <Yair.Shachar@amd.com>
2016-02-10 07:52:32 -05:00
Harish Kasiviswanathan 5e53205b9e Don't limit number of supported HSA Nodes
Remove #define MAX_NODES 8

Change-Id: I756cadc652543dd17ea48a1c956adc08c3d2631a
2016-01-15 17:27:43 -05:00
Yair Shachar 681f4dcecc Add support for scratch GPUVM on host memory
This is required when we have a debug session



Change-Id: If9d6d2d23a9016b6ca9562e02a91fc16e0354ee4
Signed-off-by: Yair Shachar <Yair.Shachar@amd.com>
2015-12-20 15:50:50 +02:00
Yair Shachar 8f529e3c72 Add support for per device debug register state tracking
Change-Id: I8d51670f5de8d379ead898d484f668a8034f9878
Signed-off-by: Yair Shachar <Yair.Shachar@amd.com>
2015-12-07 21:11:21 +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
Yair Shachar 39f693aec0 Add H/W debug module
Signed-off-by: Yair Shachar <yair.shachar@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>

Adjust to new ioctl format

Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
2014-10-13 11:29:03 +03:00
Oded Gabbay 85ba9efa18 Add skeleton driver which supports open and close
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
2014-07-29 11:16:00 +03:00