Correct initial kfd_open_count increment.
Don't set kfd_open_count=1 unless hsaKmtOpenKFD actually succeeds. This prevents returning HSAKMT_STATUS_KERNEL_ALREADY_OPENED in subsequent calls when KFD is actually closed. Signed-off-by: Sean Keely <Sean.Keely@amd.com> Change-Id: Ia870b5faa8626826a6c8795aa10784d376cf2e80
This commit is contained in:
+2
-1
@@ -194,7 +194,6 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtOpenKFD(void)
|
||||
}
|
||||
|
||||
kfd_fd = fd;
|
||||
kfd_open_count = 1;
|
||||
|
||||
init_page_size();
|
||||
|
||||
@@ -210,6 +209,8 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtOpenKFD(void)
|
||||
if (result != HSAKMT_STATUS_SUCCESS)
|
||||
goto init_doorbell_failed;
|
||||
|
||||
kfd_open_count = 1;
|
||||
|
||||
if (init_device_debugging_memory(sys_props.NumNodes) != HSAKMT_STATUS_SUCCESS)
|
||||
pr_warn("Insufficient Memory. Debugging unavailable\n");
|
||||
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user