Adaptation issue of porting higher version mipi drivers to lower version kernel code
I am porting a mipi driver (kernel version 6.1.55), but the kernel version we are currently using is 4.14.98, and many DRM functions have different interface definitions. If we don't upgrade our kernel version, how should we handle it? The following are the errors I encountered. If they occur, it seems that they are all caused by the interface definition and return value of DRM.
For example, the following functions we are currently encountering,
The definition in kernel 4.14.98 is as follows:
static inline int drm_panel_get_modes(struct drm_panel *panel);
void drm_panel_init(struct drm_panel *panel);
And in version 4.14.98 of the kernel, there is no drm_paneL_of_backlight function;
The definition in 6.1.55 is as follows:
void drm_panel_init(struct drm_panel *panel,struct device *dev,const struct drm_panel_funcs *funcs,int connector_type)
int drm_panel_get_modes(struct drm_panel *panel,struct drm_connector *connector);
Please help analyze the solution, thank you very much!
Hello @ximenbingmeng
In this case I believe is better to be aligned the driver and kernel to version you are using.
For example in imx_4.14.98_2.3.5 in panel-simple driver you can see the functions as you need:
Best regards,
Salas.