Compilation breaks on 6.8.0-RC1
Crashdummyy opened this issue · comments
Crashdummy commented
Errors
There've been some breaking changes into the 6.8 Kernel
$ make
make -C /lib/modules/6.8.0-0.rc1.20240123gt7ed2632e.212.vanilla.fc39.x86_64/build M=$PWD
make[1]: Entering directory '/usr/src/kernels/6.8.0-0.rc1.20240123gt7ed2632e.212.vanilla.fc39.x86_64'
CC [M] /home/crashdummy/coding/github/evdi/module/evdi_platform_drv.o
CC [M] /home/crashdummy/coding/github/evdi/module/evdi_platform_dev.o
CC [M] /home/crashdummy/coding/github/evdi/module/evdi_sysfs.o
CC [M] /home/crashdummy/coding/github/evdi/module/evdi_modeset.o
CC [M] /home/crashdummy/coding/github/evdi/module/evdi_connector.o
CC [M] /home/crashdummy/coding/github/evdi/module/evdi_encoder.o
CC [M] /home/crashdummy/coding/github/evdi/module/evdi_drm_drv.o
In file included from /home/crashdummy/coding/github/evdi/module/evdi_drm_drv.c:16:
/home/crashdummy/coding/github/evdi/module/evdi_drm_drv.c:41:27: error: ‘DRM_UNLOCKED’ undeclared here (not in a function); did you mean ‘VM_LOCKED’?
41 | DRM_UNLOCKED),
| ^~~~~~~~~~~~
./include/drm/drm_ioctl.h:155:26: note: in definition of macro ‘DRM_IOCTL_DEF_DRV’
155 | .flags = _flags, \
| ^~~~~~
make[3]: *** [scripts/Makefile.build:243: /home/crashdummy/coding/github/evdi/module/evdi_drm_drv.o] Error 1
make[2]: *** [/usr/src/kernels/6.8.0-0.rc1.20240123gt7ed2632e.212.vanilla.fc39.x86_64/Makefile:1923: /home/crashdummy/coding/github/evdi/module] Error 2
make[1]: *** [Makefile:242: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/kernels/6.8.0-0.rc1.20240123gt7ed2632e.212.vanilla.fc39.x86_64'
make: *** [Makefile:86: module] Error 2
Changes
DRM_UNLOCK
appears to be obsolete
I2C_CLASS_DDC
appears to be obsolete as well
Patch
Currently compiling on that one.
I dont own a docking anymore to test tho.
diff --git a/module/evdi_debug.c b/module/evdi_debug.c
index 56f29b6..0f941d3 100644
--- a/module/evdi_debug.c
+++ b/module/evdi_debug.c
@@ -7,6 +7,7 @@
*/
#include <linux/sched.h>
+#include <linux/proc_fs.h>
#include "evdi_debug.h"
diff --git a/module/evdi_drm_drv.c b/module/evdi_drm_drv.c
index c0f59c9..b21c705 100644
--- a/module/evdi_drm_drv.c
+++ b/module/evdi_drm_drv.c
@@ -37,16 +37,20 @@
static struct drm_driver driver;
struct drm_ioctl_desc evdi_painter_ioctls[] = {
- DRM_IOCTL_DEF_DRV(EVDI_CONNECT, evdi_painter_connect_ioctl,
- DRM_UNLOCKED),
- DRM_IOCTL_DEF_DRV(EVDI_REQUEST_UPDATE,
- evdi_painter_request_update_ioctl, DRM_UNLOCKED),
- DRM_IOCTL_DEF_DRV(EVDI_GRABPIX, evdi_painter_grabpix_ioctl,
- DRM_UNLOCKED),
- DRM_IOCTL_DEF_DRV(EVDI_DDCCI_RESPONSE, evdi_painter_ddcci_response_ioctl,
- DRM_UNLOCKED),
- DRM_IOCTL_DEF_DRV(EVDI_ENABLE_CURSOR_EVENTS, evdi_painter_enable_cursor_events_ioctl,
- DRM_UNLOCKED),
+
+#if KERNEL_VERSION(6, 8, 0) <= LINUX_VERSION_CODE || defined(EL8)
+ DRM_IOCTL_DEF_DRV(EVDI_CONNECT, evdi_painter_connect_ioctl, 0),
+ DRM_IOCTL_DEF_DRV(EVDI_REQUEST_UPDATE, evdi_painter_request_update_ioctl, 0),
+ DRM_IOCTL_DEF_DRV(EVDI_GRABPIX, evdi_painter_grabpix_ioctl, 0),
+ DRM_IOCTL_DEF_DRV(EVDI_DDCCI_RESPONSE, evdi_painter_ddcci_response_ioctl, 0),
+ DRM_IOCTL_DEF_DRV(EVDI_ENABLE_CURSOR_EVENTS, evdi_painter_enable_cursor_events_ioctl, 0),
+#else
+ DRM_IOCTL_DEF_DRV(EVDI_CONNECT, evdi_painter_connect_ioctl, DRM_UNLOCKED),
+ DRM_IOCTL_DEF_DRV(EVDI_REQUEST_UPDATE, evdi_painter_request_update_ioctl, DRM_UNLOCKED),
+ DRM_IOCTL_DEF_DRV(EVDI_GRABPIX, evdi_painter_grabpix_ioctl, DRM_UNLOCKED),
+ DRM_IOCTL_DEF_DRV(EVDI_DDCCI_RESPONSE, evdi_painter_ddcci_response_ioctl, DRM_UNLOCKED),
+ DRM_IOCTL_DEF_DRV(EVDI_ENABLE_CURSOR_EVENTS, evdi_painter_enable_cursor_events_ioctl, DRM_UNLOCKED),
+#endif
};
#if KERNEL_VERSION(5, 11, 0) <= LINUX_VERSION_CODE || defined(EL8)
diff --git a/module/evdi_i2c.c b/module/evdi_i2c.c
index 3da656e..5e7f7e0 100644
--- a/module/evdi_i2c.c
+++ b/module/evdi_i2c.c
@@ -40,7 +40,10 @@ int evdi_i2c_add(struct i2c_adapter *adapter, struct device *parent,
void *ddev)
{
adapter->owner = THIS_MODULE;
+#if KERNEL_VERSION(6, 8, 0) <= LINUX_VERSION_CODE || defined(EL8)
+#else
adapter->class = I2C_CLASS_DDC;
+#endif
adapter->algo = &dli2c_algorithm;
strscpy(adapter->name, "DisplayLink I2C Adapter", sizeof(adapter->name));
adapter->dev.parent = parent;
Fedora rpms
If you want to test it on fedora37-39 (x86_64) I prepared some rpms
Emilia Daria Majewska commented
Hi. Would you like to make this into a PR?
Crashdummy commented
Hi. Would you like to make this into a PR?
I'll do that in a few minutes.
It still works on at least one amd and one intel device running fedora 39
robmaster2016 commented
The dkms module can now be compiled with kernel 6.8, but no more screens are recognized. I switch back to kernel 6.7 and an older evdi version.