Skip to content

[Deepin-Kernel-SIG] [linux 6.18-y] [Deepin] Sync our patches and enable configs from v6.6-v6.18#1502

Merged
dongert merged 24 commits intodeepin-community:linux-6.18.yfrom
opsiff:linux-6.18.y-2026-02-10-part1
Feb 10, 2026
Merged

[Deepin-Kernel-SIG] [linux 6.18-y] [Deepin] Sync our patches and enable configs from v6.6-v6.18#1502
dongert merged 24 commits intodeepin-community:linux-6.18.yfrom
opsiff:linux-6.18.y-2026-02-10-part1

Conversation

@opsiff
Copy link
Member

@opsiff opsiff commented Feb 10, 2026

Summary by Sourcery

Improve HID report retrieval robustness, add diagnostic logging for Mediatek mt7921 PCI power management, and adjust kernel build timestamp configuration.

Enhancements:

  • Add informative probe-time logging of ASPM configuration for Mediatek mt7921 PCI devices.
  • Allow kernel builds to prefer a dedicated build version timestamp variable when setting the build timestamp.

Build:

  • Update build timestamp selection logic to use KBUILD_BUILD_VERSION_TIMESTAMP when provided before falling back to other timestamp sources.

adriaan42 and others added 24 commits February 10, 2026 16:58
(cherry picked from commit 9c7f81209b8dca342ab39d8f22363a940ff920e2)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
We want to include the Debian version in the utsname::version string
instead of a full timestamp string.  However, we still need to provide
a standard timestamp string for gen_initramfs_list.sh to make the
kernel image reproducible.

Make mkcompile_h use $KBUILD_BUILD_VERSION_TIMESTAMP in preference to
$KBUILD_BUILD_TIMESTAMP.

(cherry picked from commit 8d4351f548daa5761760fb11d014a14b3aa5190e)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
We met many platform relate issue,
add the log to help tracking aspm bug.

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Link: deepin-community#616
(cherry picked from commit 7b1a62a1e0c6697ad6d1eff117c6ba7ca439dd29)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
A touchscreen cannot work in matebook 14(FLMH model),
failed in i2c_hid_get_report, it return -EAGAIN but retry in
i2c-core is failed, it use i2c-desginware-pcidrv.
usleep(400, 500) not okay,  usleep(4000, 5000) is okay.

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Link: deepin-community#611
(cherry picked from commit a9cd2c37212fc5e4707c1c6a90e9593faf0806d9)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: bugfix

Edit LSM, add landlock to CONFIG_LSM.

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
(cherry picked from commit 04babd0)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: feature

Tested in Lenovo KaiTian X1 G1d/LXKT-ZXEP-X1, BIOS W0NKT11A 05/28/2024,
KX-6000G NoteBook.

Tested-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
(cherry picked from commit 7ad267b)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: other

make deepin_x86_desktop_defconfig & make savedefconfig to fresh it.

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: feature

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: feature

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: feature

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: feature

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: feature

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: feature

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: feature

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: feature

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: feature

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: feature

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: feature

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion
category: feature

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: feature

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: feature

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: feature

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: feature

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
@sourcery-ai
Copy link

sourcery-ai bot commented Feb 10, 2026

Reviewer's Guide

Adds retry-with-backoff handling for transient I2C HID get_report failures, adds a debug log in the MT7921 PCI probe for ASPM state, adjusts the kernel build timestamp selection logic, and updates Deepin desktop defconfigs and perf build configuration for the 6.18 kernel sync.

Flow diagram for kernel build-timestamp selection logic

flowchart TD
    A[Kbuild start] --> B{KBUILD_BUILD_VERSION_TIMESTAMP set?}
    B -- yes --> C[build-timestamp = KBUILD_BUILD_VERSION_TIMESTAMP]
    B -- no --> D{KBUILD_BUILD_TIMESTAMP set?}
    D -- yes --> E[build-timestamp = KBUILD_BUILD_TIMESTAMP]
    D -- no --> F[build-timestamp = build-timestamp-auto]
    C --> G[use build-timestamp in UTS_VERSION]
    E --> G
    F --> G
Loading

File-Level Changes

Change Details Files
Make i2c-hid get_report more robust by retrying transfers that fail with -EAGAIN before treating them as hard errors.
  • Wrap the i2c_hid_xfer call in a loop that retries up to 5 times on failure.
  • Only break out of the loop when i2c_hid_xfer succeeds.
  • Treat non-EAGAIN errors as fatal and return immediately with an error log.
  • On -EAGAIN failures, sleep 4–5 ms between retries using usleep_range.
drivers/hid/i2c-hid/i2c-hid-core.c
Expose ASPM-related state at MT7921 PCI probe time via a kernel log for easier debugging of power-management behavior.
  • Add a pr_info message logging the values of mt7921_disable_aspm and dev->aspm_supported after ASPM capability detection.
drivers/net/wireless/mediatek/mt76/mt7921/pci.c
Adjust kernel build timestamp selection to support an additional, more specific version timestamp variable.
  • Change build-timestamp to prefer KBUILD_BUILD_VERSION_TIMESTAMP when present, then fall back to KBUILD_BUILD_TIMESTAMP, then the automatic timestamp.
init/Makefile
Sync Deepin desktop defconfigs for LoongArch and x86 with the 6.18 kernel series configuration and enable new options as needed.
  • Update deepin_loongarch_desktop_defconfig to align with new 6.18 configuration and Deepin-specific options.
  • Update deepin_x86_desktop_defconfig similarly for x86 desktop targets.
arch/loongarch/configs/deepin_loongarch_desktop_defconfig
arch/x86/configs/deepin_x86_desktop_defconfig
Update perf build configuration for the synced kernel version and Deepin environment.
  • Adjust Makefile.perf settings to match the new toolchain, features, or Deepin-specific perf options for 6.18.
tools/perf/Makefile.perf

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dongert
Once this PR has been reviewed and has the lgtm label, please ask for approval from opsiff. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dongert dongert merged commit 1213b3b into deepin-community:linux-6.18.y Feb 10, 2026
6 of 8 checks passed
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • In i2c_hid_get_report, the retry loop declares the loop variable inside the for initializer, which is not idiomatic in kernel C (and may not compile with older configs); declare the iterator variable before the loop instead.
  • The new retry logic in i2c_hid_get_report does not handle the case where all retries still return -EAGAIN (the function falls through as if the transfer succeeded); consider returning the last error or logging and bailing out after the final attempt.
  • The mt7921_pci_probe logging uses pr_info without device context and may be too noisy for normal operation; consider using dev_dbg/dev_info with pdev->dev and possibly gating it behind a debug or verbose flag.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `i2c_hid_get_report`, the retry loop declares the loop variable inside the `for` initializer, which is not idiomatic in kernel C (and may not compile with older configs); declare the iterator variable before the loop instead.
- The new retry logic in `i2c_hid_get_report` does not handle the case where all retries still return `-EAGAIN` (the function falls through as if the transfer succeeded); consider returning the last error or logging and bailing out after the final attempt.
- The `mt7921_pci_probe` logging uses `pr_info` without device context and may be too noisy for normal operation; consider using `dev_dbg`/`dev_info` with `pdev->dev` and possibly gating it behind a debug or verbose flag.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

CONFIG_EFI=y
CONFIG_EFI_STUB=y
CONFIG_EFI_MIXED=y
CONFIG_HYGON_CSV=y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CONFIG_VIRT_DRIVERS=y
CONFIG_VBOXGUEST=m
CONFIG_NITRO_ENCLAVES=m
CONFIG_CSV_GUEST=m
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CONFIG_XIAOMI_WMI=m
CONFIG_REDMI_WMI=m
CONFIG_GIGABYTE_WMI=m
CONFIG_YOGABOOK=m
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CONFIG_CRYPTO_SEQIV=y
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_RMD160=m
CONFIG_CRYPTO_SM3_GENERIC=m
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Selected by [m]: x
x - HYGON_GM

CONFIG_CRYPTO_SERPENT_SSE2_X86_64=m
CONFIG_CRYPTO_SERPENT_AVX2_X86_64=m
CONFIG_CRYPTO_SM4_AESNI_AVX2_X86_64=m
CONFIG_CRYPTO_SM4_ZHAOXIN_GMI=m
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants