Fix build on Linux 6.12+ kernel round 2#83
Fix build on Linux 6.12+ kernel round 2#83ReachableCEO wants to merge 2 commits intoklogg:masterfrom
Conversation
- Replace drm_fbdev_generic.h with drm_fbdev_shmem.h - Replace drm_gem_dma_helper.h with drm_gem_shmem_helper.h - Replace drm_fb_dma_helper.h (removed) - Update drm_driver to use DRM_GEM_SHMEM_DRIVER_OPS - Use DEFINE_DRM_GEM_FOPS instead of DEFINE_DRM_GEM_DMA_FOPS - Replace drm_fbdev_generic_setup with drm_fbdev_shmem_setup - Update it66121 bridge to use drm_edid_read_custom API - Remove .lastclose callback (removed from drm_driver in 6.12+) The DMA GEM helpers are not enabled in Debian's default kernel configuration, but SHMEM helpers are available. This also adapts to the renamed/removed DRM APIs in kernel 6.12+. 💘 Generated with Crush Assisted-by: GLM-5 via Crush <crush@charm.land>
- Fix unsafe SHMEM buffer access using drm_gem_shmem_vmap/vunmap - Remove .date field from drm_driver (removed in Linux 6.12) - Change kfree to drm_edid_free for drm_edid structure 💘 Generated with Crush Assisted-by: GLM-5 via Crush <crush@charm.land>
Summary of ChangesHello @ReachableCEO, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses build compatibility issues with Linux kernel versions 6.12 and newer by modernizing the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request correctly updates the it66121 and fl2000 drivers to use modern DRM APIs, specifically transitioning from the legacy struct edid to struct drm_edid and from GEM DMA helpers to GEM SHMEM helpers. These changes are necessary for compatibility with Linux kernel 6.12 and later. The implementation is clean and correctly follows the new API patterns. Additionally, the refactoring in fb2000_dirty fixes a pre-existing bug where drm_dev_exit was skipped on error paths.
| fl2000_stream_compress(drm_if->stream, map.vaddr, fb->height, fb->width, | ||
| fb->pitches[0]); |
There was a problem hiding this comment.
When compressing the framebuffer data, it is important to account for the memory offset defined in the framebuffer object. While many simple configurations use an offset of 0, user-space can provide a non-zero offset which would result in the driver reading from the wrong memory location if only the base address of the GEM object is used. Since map.vaddr points to the start of the GEM object, adding fb->offsets[0] ensures the correct pixel data is accessed.
fl2000_stream_compress(drm_if->stream, map.vaddr + fb->offsets[0], fb->height, fb->width,
fb->pitches[0]);
No description provided.