-
Notifications
You must be signed in to change notification settings - Fork 38
Fix compatibility with Linux kernel 6.17 #81
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,7 +40,7 @@ struct it66121_priv { | |
|
|
||
| struct hdmi_avi_infoframe hdmi_avi_infoframe; | ||
|
|
||
| struct edid *edid; | ||
| const struct drm_edid *drm_edid; | ||
| bool dvi_mode; | ||
| }; | ||
|
|
||
|
|
@@ -311,8 +311,8 @@ static void it66121_intr_work(struct work_struct *work_item) | |
| it66121_is_hpd_detect(priv); | ||
| event = true; | ||
| if (priv->conn_status == connector_status_disconnected) { | ||
| kfree(priv->edid); | ||
| priv->edid = NULL; | ||
| drm_edid_free(priv->drm_edid); | ||
| priv->drm_edid = NULL; | ||
|
Comment on lines
+314
to
+315
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
| } | ||
|
|
||
|
|
@@ -395,28 +395,26 @@ static int it66121_get_edid_block(void *context, u8 *buf, unsigned int block, si | |
|
|
||
| return ret; | ||
| } | ||
|
|
||
| static int it66121_connector_get_modes(struct drm_connector *connector) | ||
| { | ||
| struct it66121_priv *priv = container_of(connector, struct it66121_priv, connector); | ||
| struct edid *edid = priv->edid; | ||
| const struct drm_edid *drm_edid = priv->drm_edid; | ||
| int count; | ||
|
|
||
| if (!edid) { | ||
| edid = drm_do_get_edid(connector, it66121_get_edid_block, priv); | ||
| if (!edid) | ||
| if (!drm_edid) { | ||
| drm_edid = drm_edid_read_custom(connector, it66121_get_edid_block, priv); | ||
| if (!drm_edid) | ||
| return 0; | ||
|
|
||
| drm_connector_update_edid_property(connector, edid); | ||
|
|
||
| priv->dvi_mode = !drm_detect_hdmi_monitor(edid); | ||
| priv->edid = edid; | ||
| drm_edid_connector_update(connector, drm_edid); | ||
| priv->dvi_mode = !drm_edid_is_digital(drm_edid); | ||
| priv->drm_edid = drm_edid; | ||
| } | ||
|
|
||
| return drm_add_edid_modes(connector, edid); | ||
| count = drm_edid_connector_add_modes(connector); | ||
| return count; | ||
|
Comment on lines
+401
to
+413
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| } | ||
|
|
||
| static enum drm_mode_status it66121_connector_mode_valid(struct drm_connector *connector, | ||
| struct drm_display_mode *mode) | ||
| const struct drm_display_mode *mode) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| { | ||
| /* TODO: validate mode */ | ||
| UNUSED(connector); | ||
|
|
@@ -486,7 +484,7 @@ static const struct component_ops it66121_component_ops = { | |
| }; | ||
|
|
||
| /* TODO: rewrite register access properly, add error processing */ | ||
| static int it66121_bridge_attach(struct drm_bridge *bridge, enum drm_bridge_attach_flags flags) | ||
| static int it66121_bridge_attach(struct drm_bridge *bridge, struct drm_encoder *encoder, enum drm_bridge_attach_flags flags) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| { | ||
| int ret; | ||
| struct it66121_priv *priv = container_of(bridge, struct it66121_priv, bridge); | ||
|
|
@@ -842,7 +840,7 @@ static void __exit it66121_remove(void) | |
|
|
||
| component_del(&priv->client->dev, &it66121_component_ops); | ||
|
|
||
| kfree(priv->edid); | ||
| drm_edid_free(priv->drm_edid); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| drm_bridge_remove(&priv->bridge); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,7 @@ | |
| #include <drm/drm_fourcc.h> | ||
| #include <drm/drm_fb_helper.h> | ||
| #include <drm/drm_framebuffer.h> | ||
| #include <drm/drm_fbdev_generic.h> | ||
| #include <drm/drm_fbdev_shmem.h> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| #include <drm/drm_gem_framebuffer_helper.h> | ||
| #include <drm/drm_gem_dma_helper.h> | ||
| #include <drm/drm_atomic_helper.h> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -104,16 +104,15 @@ static void fl2000_drm_release(struct drm_device *drm) | |
|
|
||
| static struct drm_driver fl2000_drm_driver = { | ||
| .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC, | ||
| .lastclose = drm_fb_helper_lastclose, | ||
| .ioctls = NULL, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| .fops = &fl2000_drm_driver_fops, | ||
| .release = fl2000_drm_release, | ||
|
|
||
| DRM_GEM_DMA_DRIVER_OPS_VMAP, | ||
| DRM_FBDEV_SHMEM_DRIVER_OPS, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| .name = DRM_DRIVER_NAME, | ||
| .desc = DRM_DRIVER_DESC, | ||
| .date = DRM_DRIVER_DATE, | ||
| .major = DRM_DRIVER_MAJOR, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| .minor = DRM_DRIVER_MINOR, | ||
| .patchlevel = DRM_DRIVER_PATCHLEVEL, | ||
|
|
@@ -524,7 +523,7 @@ int fl2000_drm_bind(struct device *master) | |
| fl2000_reset(usb_dev); | ||
| fl2000_usb_magic(usb_dev); | ||
|
|
||
| drm_fbdev_generic_setup(drm, FL2000_FB_BPP); | ||
| // fbdev setup removed - handled by DRM_FBDEV_SHMEM_DRIVER_OPS | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| return 0; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type of
edidhas been changed fromstruct edid *toconst struct drm_edid *. This is a necessary update to align with the new DRM EDID API, ensuring proper handling of EDID data.