Open alexisfrjp opened 2 years ago
Here is the patch:
diff --git a/src/runtime_src/core/pcie/driver/linux/xocl/userpf/xocl_drm.c b/src/runtime_src/core/pcie/driver/linux/xocl/userpf/xocl_drm.c
index 17ce660a8..99db738b8 100644
--- a/src/runtime_src/core/pcie/driver/linux/xocl/userpf/xocl_drm.c
+++ b/src/runtime_src/core/pcie/driver/linux/xocl/userpf/xocl_drm.c
@@ -571,9 +571,16 @@ void *xocl_drm_init(xdev_handle_t xdev_hdl)
* The pdev field was removed from drm_device starting from 5.14 and
* should be skipped starting from that version.
* https://github.com/torvalds/linux/commit/b347e04452ff6382ace8fba9c81f5bcb63be17a6
+ * Also from RHEL 8.6
*/
+#if defined(RHEL_RELEASE_VERSION)
+#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 6)
+ ddev->pdev = XDEV(xdev_hdl)->pdev;
+#endif
+#else
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
ddev->pdev = XDEV(xdev_hdl)->pdev;
+#endif
#endif
ret = drm_dev_register(ddev, 0);
Tested, working.
Thanks, you can probably send a PR that we can review for patching. Thanks
What is the status of this? Did it landed?
Hi @keryell, I started working on this. The changes will be pushed in 1-2 days
What is the status of this? Did it landed?
I wrote the patch above, you guys just needed to take it and merge it...
@alexisfrjp there are other changes as well, I will send PR including all changes to support RHEL 8.6
PR- https://github.com/Xilinx/XRT/pull/6734 solves this issue
Release/xrt_202210.2.13.0_8-x86_64-xrt.rpm
/var/lib/dkms/xrt/2.13.0/build/make.log
From RHEL kernel version 4.18.0-365.el8.x86_64
Every time there is a
LINUX_VERSION_CODE
, it's almost guaranteed aRHEL_RELEASE_CODE
is necessary.