Skip to content

Commit

Permalink
Fixed aie xclbin switching issue
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Lin <[email protected]>
  • Loading branch information
Jeff Lin committed Sep 7, 2023
1 parent 3dfbf7e commit 4b28bba
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/runtime_src/core/edge/drm/zocl/zert/zocl_ps_xclbin.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,6 @@ zocl_xclbin_load_pskernel(struct drm_zocl_dev *zdev, void *data, uint32_t slot_i
size_of_header = sizeof(struct axlf_section_header);
num_of_sections = axlf_head->m_header.m_numSections-1;
xclbin = (char *)axlf;
if (zocl_xclbin_get_uuid(slot) != NULL)
zocl_cleanup_aie(zdev);

/*
* Read AIE_RESOURCES section. aie_res will be NULL if there is no
Expand Down Expand Up @@ -361,6 +359,13 @@ zocl_xclbin_load_pskernel(struct drm_zocl_dev *zdev, void *data, uint32_t slot_i
}
slot->aie_data = aie_data;

/* Mark AIE out of reset state after load PDI */
if (zdev->aie) {
mutex_lock(&zdev->aie_lock);
zdev->aie->aie_reset = false;
mutex_unlock(&zdev->aie_lock);
}

// Cache full xclbin
//last argument represents aie generation. 1. aie, 2. aie-ml ...
DRM_INFO("AIE Device set to gen %d", hw_gen);
Expand Down

0 comments on commit 4b28bba

Please sign in to comment.