Skip to content

Commit

Permalink
Fixed an issue for single slot case where multiple IPs are opened. (#…
Browse files Browse the repository at this point in the history
…8177) (#8220)

* Fixed an issue for single slot case where multiple IPs are opened.

Signed-off-by: Saifuddin <[email protected]>

* Added a comments for this changes

Signed-off-by: Saifuddin <[email protected]>

---------

Signed-off-by: Saifuddin <[email protected]>
(cherry picked from commit ad87b01)
  • Loading branch information
saifuddin-xilinx authored Jun 4, 2024
1 parent 9cb419b commit 8dbd1c2
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ int xocl_get_slot_id_by_hw_ctx_id(struct xocl_dev *xdev,
mutex_lock(&client->lock);
hw_ctx = kds_get_hw_ctx_by_id(client, hw_ctx_id);
if (!hw_ctx) {
userpf_err(xdev, "No valid HW context is open");
/* This is a woraround. This is only valid for single slot case
* and application use legacy application flow but create
* multiple IPs. For multi-slot case consider this is an Error.
*/
userpf_info(xdev, "WARNING !!!! No valid HW context is open."
" Continuing with default one");
mutex_unlock(&client->lock);
return -EINVAL;
return 0;
}
mutex_unlock(&client->lock);

Expand Down

0 comments on commit 8dbd1c2

Please sign in to comment.