Skip to content

CR-1235475: Reduced ZOCL log level #8862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/runtime_src/core/edge/drm/zocl/common/zocl_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ get_legacy_slot(struct drm_zocl_dev *zdev, struct axlf *axlf, int* slot_id)
slot->xclbin_type = zocl_xclbin_type;
mutex_unlock(&slot->slot_xclbin_lock);
*slot_id = s_id;
DRM_INFO("Found free Slot-%d is selected for xclbin \n", s_id);
DRM_DEBUG("Found free Slot-%d is selected for xclbin \n", s_id);
return 0;
}

Expand Down Expand Up @@ -119,7 +119,7 @@ get_free_slot(struct drm_zocl_dev *zdev, struct axlf *axlf, int* slot_id)
DRM_ERROR("%s: slot %d doesn't exists or invalid", __func__, s_id);
return -EINVAL;
}
DRM_INFO("Found a free slot %d for XCLBIN %pUb", s_id, &axlf->m_header.uuid);
DRM_DEBUG("Found a free slot %d for XCLBIN %pUb", s_id, &axlf->m_header.uuid);
// acquiring the free slot
zdev->slot_mask |= 1 << s_id;
*slot_id = s_id;
Expand Down Expand Up @@ -201,7 +201,7 @@ zocl_read_axlf_ioctl(struct drm_device *ddev, void *data, struct drm_file *filp)
DRM_WARN("Unable to allocate slot for xclbin.");
return ret;
}
DRM_INFO("Allocated slot %d to load xclbin in device.\n", slot_id);
DRM_DEBUG("Allocated slot %d to load xclbin in device.\n", slot_id);

return zocl_xclbin_read_axlf(zdev, axlf_obj, client, slot_id);
}
Expand All @@ -227,7 +227,7 @@ int zocl_create_hw_ctx_ioctl(struct drm_device *dev, void *data, struct drm_file
DRM_WARN("Unable to allocate slot for xclbin.");
return ret;
}
DRM_INFO("Allocated slot %d to load xclbin in hw_context.\n", slot_id);
DRM_DEBUG("Allocated slot %d to load xclbin in hw_context.\n", slot_id);

ret = zocl_xclbin_read_axlf(zdev, &axlf_obj, client, slot_id);
if (ret) {
Expand Down
4 changes: 2 additions & 2 deletions src/runtime_src/core/edge/drm/zocl/common/zocl_xclbin.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ zocl_read_sect(enum axlf_section_kind kind, void *sect,

err = xrt_xclbin_section_info(axlf_full, kind, &offset, &size);
if (err) {
DRM_INFO("skip kind %d(%s) return code: %d", kind,
DRM_DEBUG("skip kind %d(%s) return code: %d", kind,
xrt_xclbin_kind_to_string(kind), err);
return 0;
} else {
DRM_INFO("found kind %d(%s)", kind,
DRM_DEBUG("found kind %d(%s)", kind,
xrt_xclbin_kind_to_string(kind));
}

Expand Down
14 changes: 11 additions & 3 deletions src/runtime_src/core/edge/drm/zocl/edge/zocl_edge_xclbin.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ is_aie_only(struct axlf *axlf)
* @param zdev: zocl device structure
* @param axlf_obj: xclbin userspace structure
* @param client: user space client attached to device
* @param slot_id slot id allocated to load xclbin
*
* @return 0 on success, Error code on failure.
*/
Expand Down Expand Up @@ -240,7 +241,7 @@ zocl_xclbin_read_axlf(struct drm_zocl_dev *zdev, struct drm_zocl_axlf *axlf_obj,
} else {

if (!(axlf_obj->za_flags & DRM_ZOCL_PLATFORM_PR)) {
DRM_INFO("disable partial bitstream download, "
DRM_DEBUG("disable partial bitstream download, "
"axlf flags is %d", axlf_obj->za_flags);
} else {
/*
Expand Down Expand Up @@ -330,11 +331,18 @@ zocl_xclbin_read_axlf(struct drm_zocl_dev *zdev, struct drm_zocl_axlf *axlf_obj,
if (ret)
goto out0;

DRM_INFO("xclbin %pUb successfully loaded to slot %d\n",
zocl_xclbin_get_uuid(slot), slot_id);

goto done;

out0:
DRM_ERROR("%s: failed to load xclbin %pUb to slot %d ret: %d\n",
__func__, zocl_xclbin_get_uuid(slot), slot_id, ret);

done:
vfree(aie_res);
vfree(axlf);
DRM_INFO("%s %pUb ret: %d", __func__, zocl_xclbin_get_uuid(slot),
ret);
mutex_unlock(&slot->slot_xclbin_lock);
return ret;
}
Expand Down
4 changes: 2 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 @@ -35,11 +35,11 @@ zocl_read_sect_kernel(enum axlf_section_kind kind, void *sect,

err = xrt_xclbin_section_info(axlf_full, kind, &offset, &size);
if (err) {
DRM_INFO("skip kind %d(%s) return code: %d", kind,
DRM_DEBUG("skip kind %d(%s) return code: %d", kind,
xrt_xclbin_kind_to_string(kind), err);
return 0;
} else {
DRM_INFO("found kind %d(%s)", kind,
DRM_DEBUG("found kind %d(%s)", kind,
xrt_xclbin_kind_to_string(kind));
}

Expand Down
Loading