libhsakmt: queue suspend/resume can return non-zero positive values
New queue suspend/resume update can now return the number of successful
queue requests so return success if IOCTL return is non-negative.
This should be backwards compatible since old queue suspend/resume returns
0 on success.
Signed-off-by: Jonathan Kim <Jonathan.Kim@amd.com>
Change-Id: I06b70d95d203b2bfc19a0cc1b88c5719c695159a
[ROCm/ROCR-Runtime commit: 93c333711a]
This commit is contained in:
committed by
Jonathan Kim
parent
38ab5ed98e
commit
7740384eab
@@ -325,7 +325,11 @@ static HSAKMT_STATUS debug_trap(HSAuint32 NodeId,
|
||||
if (argout)
|
||||
*argout = args;
|
||||
|
||||
if (err == 0)
|
||||
if ((op == KFD_IOC_DBG_TRAP_NODE_SUSPEND ||
|
||||
op == KFD_IOC_DBG_TRAP_NODE_RESUME) && err >= 0 &&
|
||||
err <= args.data2)
|
||||
result = HSAKMT_STATUS_SUCCESS;
|
||||
else if (err == 0)
|
||||
result = HSAKMT_STATUS_SUCCESS;
|
||||
else
|
||||
result = HSAKMT_STATUS_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user