Skip to content

Conversation

@amazingfate
Copy link
Contributor

@amazingfate amazingfate commented Jan 13, 2026

Description

  • media-0005-media-verisilicon-AV1-Set-IDR-flag-for-intra_only-fr.patch is used for playing videos from bilibili.com.
  • media-0006-media-verisilicon-AV1-Fix-tx-mode-bit-setting.patch is a general fix from kernel mailing list.
  • media-0007-add-verisilicon-AV1-iommu-driver.patch is used to let chromium play 4k videos with 256M cma.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

  • ./compile.sh kernel BOARD=armsom-sige7 BRANCH=edge KERNEL_CONFIGURE=no DEB_COMPRESS=xz KERNEL_BTF=yes KERNEL_GIT=shallow
  • ./compile.sh kernel BOARD=armsom-sige7 BRANCH=edge KERNEL_CONFIGURE=no DEB_COMPRESS=xz KERNEL_BTF=yes KERNEL_GIT=shallow
  • Tetsed with chromium on trixie.

Checklist:

Please delete options that are not relevant.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • New Features

    • Added Verisilicon IOMMU driver support for enhanced AV1 video decoding performance on RK3588.
    • Enabled additional kernel configuration options for improved resource management and performance monitoring.
  • Bug Fixes

    • Fixed IDR flag handling for intra-only frames in AV1 decoder.
    • Corrected transform mode bit setting in AV1 hardware decoding operations.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 13, 2026

📝 Walkthrough

Walkthrough

This PR adds kernel configuration options for Rockchip64 platforms and introduces hardware patches across kernel versions 6.18 and 6.19, including Verisilicon IOMMU driver implementation, AV1 decoder IDR flag fixes, and TX mode bit mapping enhancements.

Changes

Cohort / File(s) Summary
Kernel Configuration
config/kernel/linux-rockchip64-current.config, config/kernel/linux-rockchip64-edge.config
Added 6 new kernel options including CONFIG_BPF_JIT_ALWAYS_ON, CONFIG_BLK_CGROUP_IOCOST, CONFIG_VSI_IOMMU, and CONFIG_FUNCTION_TRACER to enable BPF JIT, cgroup I/O cost tracking, VSI IOMMU support, and kernel tracing.
AV1 Decoder IDR Flag Fix
patch/kernel/archive/rockchip64-6.18/media-0005-..patch, patch/kernel/archive/rockchip64-6.19/media-0005-...patch
Updated IDR flag register write in AV1 decoder to use IS_INTRA(ctrls->frame->frame_type) instead of negated frame_type logic for correct intra_only frame handling.
AV1 Decoder TX Mode Mapping
patch/kernel/archive/rockchip64-6.18/media-0006-...patch, patch/kernel/archive/rockchip64-6.19/media-0006-...patch
Introduced rockchip_av1_tx_mode enum and rockchip_vpu981_av1_get_hardware_tx_mode() helper function to map V4L2 TX modes to hardware-specific TX mode constants (4x4, 8x8, 16x16, 32x32, SELECT).
Verisilicon IOMMU Driver
patch/kernel/archive/rockchip64-6.18/media-0007-...patch, patch/kernel/archive/rockchip64-6.19/media-0007-...patch
Added complete Verisilicon IOMMU driver with domain management, page table handling, IOVA translation, and IRQ support; integrated IOMMU context restoration into AV1 decode path; added device-tree node for RK3588 IOMMU binding; exported vsi_iommu_restore_ctx() API.

Sequence Diagram(s)

sequenceDiagram
    participant AVDec as AV1 Decoder
    participant VSI as VSI IOMMU Driver
    participant Domain as IOMMU Domain
    participant HW as Hardware
    
    AVDec->>VSI: rockchip_vpu981_av1_restore_iommu()
    VSI->>Domain: iommu_get_domain_for_dev(dev)
    Domain-->>VSI: iommu_domain handle
    VSI->>VSI: vsi_iommu_restore_ctx(domain)
    VSI->>HW: Restore IOMMU page tables & context
    HW-->>VSI: Context restored
    VSI-->>AVDec: Restoration complete
    AVDec->>AVDec: rockchip_vpu981_av1_dec_run() continues
    AVDec->>HW: Decode AV1 frame
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Suggested reviewers

  • amazingfate
  • igorpecovnik
  • rpardini
  • joekhoobyar
  • brentr
  • krachlatte
  • paolosabatino
  • prahal
  • TheSnowfield

Poem

🐰 The rabbit hops through IOMMU gates,
Where AV1 frames need not wait,
With TX modes mapped just right,
And IDR flags shining bright,
The decoder's speed accelerates!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title mentions 'verisilion' which appears to be a misspelling of 'Verisilicon' (the actual company/driver name). While the title is related to the changeset content, it contains a spelling error that reduces clarity. Correct the spelling to 'Rockchip64: Add Verisilicon AV1 patches' for accuracy and professional clarity.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added 02 Milestone: First quarter release size/large PR with 250 lines or more Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Jan 13, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
@patch/kernel/archive/rockchip64-6.19/media-0007-add-verisilicon-AV1-iommu-driver.patch:
- Around line 552-576: The attach_dev callbacks include an extra third parameter
not present in the kernel 6.19 IOMMU API; change the signatures of
vsi_iommu_identity_attach and vsi_iommu_attach_device to match int
(*attach_dev)(struct iommu_domain *domain, struct device *dev) by removing the
final struct iommu_domain *old parameter, update their prototypes/definitions
accordingly, and ensure the function pointer assignments where these are
registered use the 2-arg signature so the callbacks match the kernel's expected
attach_dev prototype.
🧹 Nitpick comments (5)
patch/kernel/archive/rockchip64-6.18/media-0006-media-verisilicon-AV1-Fix-tx-mode-bit-setting.patch (1)

27-33: Minor naming inconsistency in enum values.

The enum values use inconsistent casing: ONLY_4X4 and 8X8 use uppercase 'X', while 16x16 and 32x32 use lowercase 'x'. Since this is an upstream kernel patch from Collabora, this is a nitpick observation rather than a change request.

patch/kernel/archive/rockchip64-6.19/media-0007-add-verisilicon-AV1-iommu-driver.patch (2)

144-146: Duplicate macro definition.

VSI_DTE_PT_VALID is defined twice with the same value BIT(0) at lines 145 and 182 within the patch. While this doesn't cause a compilation error since the values match, it's unnecessary duplication.

♻️ Suggested fix

Remove the duplicate definition at line 182 (patch line +#define VSI_DTE_PT_VALID BIT(0) appearing after vsi_mk_pte).

Also applies to: 182-183


608-614: Dead code: list_entry result can never be NULL.

The list_entry macro is implemented via container_of, which performs pointer arithmetic and never returns NULL. The check if (!iommu) at line 612 is therefore dead code.

♻️ Suggested fix
 	list_for_each(pos, &vsi_domain->iommus) {
 		struct vsi_iommu *iommu;
 
 		iommu = list_entry(pos, struct vsi_iommu, node);
-		if (!iommu)
-			continue;
 
 		spin_lock(&iommu->lock);
patch/kernel/archive/rockchip64-6.19/media-0006-media-verisilicon-AV1-Fix-tx-mode-bit-setting.patch (1)

27-33: Minor naming inconsistency in enum.

The enum rockchip_av1_tx_mode has inconsistent capitalization: ROCKCHIP_AV1_TX_MODE_16x16 uses lowercase 'x' while ROCKCHIP_AV1_TX_MODE_8X8 and ROCKCHIP_AV1_TX_MODE_32x32 have inconsistent patterns (8X8 uppercase, 32x32 lowercase).

♻️ Suggested fix for consistency
 enum rockchip_av1_tx_mode {
 	ROCKCHIP_AV1_TX_MODE_ONLY_4X4	= 0,
 	ROCKCHIP_AV1_TX_MODE_8X8	= 1,
-	ROCKCHIP_AV1_TX_MODE_16x16	= 2,
-	ROCKCHIP_AV1_TX_MODE_32x32	= 3,
+	ROCKCHIP_AV1_TX_MODE_16X16	= 2,
+	ROCKCHIP_AV1_TX_MODE_32X32	= 3,
 	ROCKCHIP_AV1_TX_MODE_SELECT	= 4,
 };

Note: The mapping function would also need to update references to use the new names.

patch/kernel/archive/rockchip64-6.18/media-0007-add-verisilicon-AV1-iommu-driver.patch (1)

144-146: Same minor issues as 6.19 version.

The 6.18 version has the same optional refactoring opportunities as noted in the 6.19 review:

  1. Duplicate VSI_DTE_PT_VALID macro definition
  2. Dead code if (!iommu) check after list_entry

These don't affect functionality but could be cleaned up for consistency across both versions.

Also applies to: 182-183, 608-614

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 3e40fe9 and 7ad6687.

📒 Files selected for processing (8)
  • config/kernel/linux-rockchip64-current.config
  • config/kernel/linux-rockchip64-edge.config
  • patch/kernel/archive/rockchip64-6.18/media-0005-media-verisilicon-AV1-Set-IDR-flag-for-intra_only-fr.patch
  • patch/kernel/archive/rockchip64-6.18/media-0006-media-verisilicon-AV1-Fix-tx-mode-bit-setting.patch
  • patch/kernel/archive/rockchip64-6.18/media-0007-add-verisilicon-AV1-iommu-driver.patch
  • patch/kernel/archive/rockchip64-6.19/media-0005-media-verisilicon-AV1-Set-IDR-flag-for-intra_only-fr.patch
  • patch/kernel/archive/rockchip64-6.19/media-0006-media-verisilicon-AV1-Fix-tx-mode-bit-setting.patch
  • patch/kernel/archive/rockchip64-6.19/media-0007-add-verisilicon-AV1-iommu-driver.patch
🧰 Additional context used
🧠 Learnings (24)
📓 Common learnings
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub API (https://api.github.com/repos/armbian/build/pulls/{pr_number}/files) to get the complete picture of what files are being added or modified, especially for U-Boot patches that will be applied during the build process.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub or the PR API to get the complete picture of what files are being added or modified.
Learnt from: rpardini
Repo: armbian/build PR: 9159
File: patch/u-boot/u-boot-genio/0026-dts-configs-add-Grinn-GenioSBC-510.patch:161-161
Timestamp: 2026-01-03T20:46:29.189Z
Learning: For the Armbian genio family (config/sources/families/genio.conf and patch/u-boot/u-boot-genio/), when reviewing PRs that include vendor U-Boot patches from Collabora, avoid flagging potential issues in board configurations that are out of scope for the PR's primary focus (e.g., don't flag Genio 510/700 board issues when the PR is focused on radxa-nio-12l/Genio 1200). The maintainer prioritizes keeping vendor patches close to upstream for easier re-copying and maintenance, even if secondary board configs have potential mismatches.
<!-- </add_learning>
Learnt from: EvilOlaf
Repo: armbian/build PR: 9086
File: patch/kernel/archive/uefi-arm64-6.19/net-stmicro-stmmac-Phytium-onboard-ethernet-drivers-and-ACPI-glue-for-6.x.patch.disabled:625-633
Timestamp: 2025-12-21T10:28:48.455Z
Learning: The patch "net-stmicro-stmmac-Phytium-onboard-ethernet-drivers-and-ACPI-glue-for-6.x.patch" in patch/kernel/archive/uefi-arm64-6.19/ is known to break compilation on kernel 6.19 and is therefore disabled (has .disabled extension).
Learnt from: SuperKali
Repo: armbian/build PR: 8608
File: lib/functions/compilation/patch/drivers_network.sh:361-363
Timestamp: 2025-09-11T06:06:52.328Z
Learning: For the RTW88 SDIO RF path detection fix patch (004-rtw88-sdio-rf-path-detection-fix.patch), SuperKali prefers using exact version matching (eq 6.1 || eq 6.16) rather than range checks, as the patch has only been tested on those specific kernel versions and may be mainstreamed soon.
Learnt from: igorpecovnik
Repo: armbian/build PR: 8789
File: config/kernel/linux-sunxi64-edge.config:839-839
Timestamp: 2025-10-22T07:51:53.015Z
Learning: In Armbian's wireless driver configuration, CONFIG_RK_WIFI_DEVICE_* options are Rockchip-specific device registration settings, while CONFIG_WLAN_UWE* are the actual cross-platform driver modules for UWE5622 wireless chips. The UWE5622 chip (manufactured by Unisoc/Spreadtrum) is used on multiple Allwinner boards including Orange Pi Zero 2/2W/3 and Orange Pi 3 LTS, so CONFIG_WLAN_UWE5621/5622 along with Unisoc infrastructure options (CONFIG_SPARD_WLAN_SUPPORT, CONFIG_SC23XX, CONFIG_UNISOC_WIFI_PS, CONFIG_WCN_BSP_DRIVER_BUILDIN) are correct in sunxi64 kernel configs.
Learnt from: rpardini
Repo: armbian/build PR: 8879
File: config/sources/families/uefi-x86.conf:0-0
Timestamp: 2025-11-06T15:36:04.682Z
Learning: As of PR #8879, the uefi-x86 family in the Armbian build system now includes kernel patches for the first time. The current and edge branches for uefi-x86 are specifically configured for Apple T2-based x86 machines, including T2-specific patches from the linux-t2 project and custom kernel configuration options for Apple hardware drivers.
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:222-230
Timestamp: 2025-09-14T06:32:29.806Z
Learning: In the Armbian build system, the write_uboot_platform() function implementations follow different patterns across Rockchip family files. The newer standard (used in rockchip64_common.inc and rk3506) includes 'status=none' parameter in dd commands, while older implementations (rk3288, rk322x) use an older pattern without this parameter. The rk3506 implementation correctly follows the current Rockchip family standard.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8886
File: patch/kernel/rk35xx-vendor-6.1/dt/rk3528-nanopi-rev01.dts:9-9
Timestamp: 2025-11-08T06:39:24.527Z
Learning: In Armbian's Rockchip vendor kernel branches (rk35xx-vendor), device tree files may not require the same headers as mainline Linux. For example, input key definitions like KEY_BACK and KEY_VOLUMEUP may be handled differently in BSP kernels and don't necessarily need explicit includes like <dt-bindings/input/input.h> that would be required in mainline kernel device trees.
Learnt from: libiunc
Repo: armbian/build PR: 8033
File: config/kernel/linux-starfive2-vendor.config:43-43
Timestamp: 2025-03-31T12:57:13.880Z
Learning: For StarFive2 platform kernel configurations, maintain alignment with vendor-provided configurations rather than modifying security settings like SECCOMP. This ensures hardware compatibility as intended by the manufacturer.
📚 Learning: 2025-12-19T13:56:45.124Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.

Applied to files:

  • patch/kernel/archive/rockchip64-6.19/media-0005-media-verisilicon-AV1-Set-IDR-flag-for-intra_only-fr.patch
  • patch/kernel/archive/rockchip64-6.18/media-0005-media-verisilicon-AV1-Set-IDR-flag-for-intra_only-fr.patch
  • config/kernel/linux-rockchip64-current.config
  • patch/kernel/archive/rockchip64-6.18/media-0007-add-verisilicon-AV1-iommu-driver.patch
  • patch/kernel/archive/rockchip64-6.19/media-0007-add-verisilicon-AV1-iommu-driver.patch
📚 Learning: 2026-01-10T04:28:58.758Z
Learnt from: kasimling
Repo: armbian/build PR: 9177
File: patch/kernel/archive/rockchip64-6.18/rk3588-1212-arm64-dts-Automatic-fan-speed-and-USB-3.0-Type-A-por.patch:37-41
Timestamp: 2026-01-10T04:28:58.758Z
Learning: When reviewing Linux kernel device-tree bindings involving thermal cooling devices, THERMAL_NO_LIMIT can be used for both min_state (lower) and max_state (upper). If used as lower/min_state, the framework converts it to 0; if used as upper/max_state, it converts to the cooling device's max_state. Verify patch entries like: cooling-device = <&fan THERMAL_NO_LIMIT 1> are valid and correctly reflect the intended bounds. Ensure consistent interpretation of NO_LIMIT in both min and max contexts and that the resulting values align with the device's actual limits.

Applied to files:

  • patch/kernel/archive/rockchip64-6.19/media-0005-media-verisilicon-AV1-Set-IDR-flag-for-intra_only-fr.patch
  • patch/kernel/archive/rockchip64-6.18/media-0005-media-verisilicon-AV1-Set-IDR-flag-for-intra_only-fr.patch
  • patch/kernel/archive/rockchip64-6.19/media-0006-media-verisilicon-AV1-Fix-tx-mode-bit-setting.patch
  • patch/kernel/archive/rockchip64-6.18/media-0006-media-verisilicon-AV1-Fix-tx-mode-bit-setting.patch
  • patch/kernel/archive/rockchip64-6.18/media-0007-add-verisilicon-AV1-iommu-driver.patch
  • patch/kernel/archive/rockchip64-6.19/media-0007-add-verisilicon-AV1-iommu-driver.patch
📚 Learning: 2025-12-17T05:09:02.306Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.

Applied to files:

  • patch/kernel/archive/rockchip64-6.18/media-0005-media-verisilicon-AV1-Set-IDR-flag-for-intra_only-fr.patch
  • patch/kernel/archive/rockchip64-6.18/media-0007-add-verisilicon-AV1-iommu-driver.patch
📚 Learning: 2026-01-03T07:27:40.951Z
Learnt from: iav
Repo: armbian/build PR: 9158
File: patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch:598-600
Timestamp: 2026-01-03T07:27:40.951Z
Learning: In vendor Rockchip kernel patches (e.g., rockchip64-6.18), verify that the FUSB302 device tree binding uses a phandle reference for usb-role-switch (e.g., usb-role-switch = <&typec_extcon_bridge>;), not a bare boolean flag as in mainline. Ensure patches reflect the vendor implementation that supports phandles to a USB role switch provider, and adjust bindings accordingly to avoid regressions in USB role switching.

Applied to files:

  • patch/kernel/archive/rockchip64-6.18/media-0005-media-verisilicon-AV1-Set-IDR-flag-for-intra_only-fr.patch
  • patch/kernel/archive/rockchip64-6.18/media-0006-media-verisilicon-AV1-Fix-tx-mode-bit-setting.patch
  • patch/kernel/archive/rockchip64-6.18/media-0007-add-verisilicon-AV1-iommu-driver.patch
📚 Learning: 2025-08-30T04:13:16.457Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-30T04:13:16.457Z
Learning: Armbian kernel configuration files like linux-filogic-current.config are autogenerated overlays on top of arch defconfig. Comments added manually will be lost during future updates by maintainers, and explicit "CONFIG_OPTION is not set" statements aren't needed for mutually exclusive options since these are overlay configs that only specify changes from the base configuration.

Applied to files:

  • config/kernel/linux-rockchip64-current.config
  • config/kernel/linux-rockchip64-edge.config
📚 Learning: 2025-09-27T21:47:58.020Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8678
File: config/kernel/linux-bcm2711-edge.config:859-861
Timestamp: 2025-09-27T21:47:58.020Z
Learning: In the Armbian build system, kernel configuration files in config/kernel/ are generated through an automated process: taking previous config → applying scripted changes from armbian-kernel.sh → running kernel's `make oldconfig` → processing by Armbian machinery back into config files. This automated process properly handles kernel configuration dependencies and reduces the likelihood of manual configuration errors.

Applied to files:

  • config/kernel/linux-rockchip64-current.config
  • config/kernel/linux-rockchip64-edge.config
📚 Learning: 2025-11-02T20:49:56.719Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8849
File: config/boards/radxa-e54c.csc:14-28
Timestamp: 2025-11-02T20:49:56.719Z
Learning: In Armbian board configuration files (config/boards/*.conf, *.csc, etc.), do not use kernel_config_set, kernel_config_set_m, kernel_config_set_y, or custom_kernel_config__* functions to modify kernel configuration. Kernel configuration is associated with LINUXFAMILY/BOARDFAMILY, not individual BOARD. Board-specific kernel modifications cause inconsistency in kernel packages published to the apt repository because boards within a family share the same kernel packages. Kernel configuration changes must be made in the appropriate kernel config file (e.g., config/kernel/linux-*-*.config) or in family configuration files (config/sources/families/*.conf, *.inc) instead.

Applied to files:

  • config/kernel/linux-rockchip64-current.config
  • config/kernel/linux-rockchip64-edge.config
📚 Learning: 2025-09-27T21:50:15.915Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8678
File: config/kernel/linux-sunxi64-current.config:94-94
Timestamp: 2025-09-27T21:50:15.915Z
Learning: When kernel config files are generated through Armbian's automated process (previous config → armbian-kernel.sh changes → make oldconfig → Armbian machinery processing), manual config file edits are not appropriate since they would be overwritten. Deprecated option handling should be implemented in the automated tooling instead.

Applied to files:

  • config/kernel/linux-rockchip64-current.config
  • config/kernel/linux-rockchip64-edge.config
📚 Learning: 2025-09-27T21:49:55.796Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8678
File: config/kernel/linux-sm8250-current.config:78-80
Timestamp: 2025-09-27T21:49:55.796Z
Learning: In the Armbian build system, kernel configuration files are generated through an automated process: taking previous config → applying scripted changes from armbian-kernel.sh → running kernel's `make oldconfig` → processing by Armbian machinery back into config files. This automated process properly handles kernel configuration dependencies and reduces the likelihood of manual configuration errors.

Applied to files:

  • config/kernel/linux-rockchip64-current.config
  • config/kernel/linux-rockchip64-edge.config
📚 Learning: 2025-09-27T21:50:04.845Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8678
File: config/kernel/linux-sm8250-edge.config:80-82
Timestamp: 2025-09-27T21:50:04.845Z
Learning: In the Armbian build system, kernel configuration files are generated through this automated process: taking previous config → applying scripted changes from armbian-kernel.sh → running kernel's `make oldconfig` → processing by Armbian machinery back into config files. This automated process properly handles kernel configuration dependencies and reduces the likelihood of manual configuration errors.

Applied to files:

  • config/kernel/linux-rockchip64-current.config
  • config/kernel/linux-rockchip64-edge.config
📚 Learning: 2025-09-22T21:52:01.225Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8661
File: lib/functions/compilation/armbian-kernel.sh:194-201
Timestamp: 2025-09-22T21:52:01.225Z
Learning: In lib/functions/compilation/armbian-kernel.sh, the kernel_config_modifying_hashes array is not universally required for all kernel configuration functions - some functions like armbian_kernel_config__netkit() operate without it, and adding entries with '=m' would be incorrect when the actual result might be '=y' for options already built-in.

Applied to files:

  • config/kernel/linux-rockchip64-current.config
📚 Learning: 2025-10-26T12:56:29.185Z
Learnt from: rpardini
Repo: armbian/build PR: 8820
File: config/sources/families/include/meson64_common.inc:51-53
Timestamp: 2025-10-26T12:56:29.185Z
Learning: In the Armbian build framework, scripts/config correctly handles kernel configuration option names both with and without the CONFIG_ prefix, so opts_m+=("CONFIG_RTL8822CS") and opts_m+=("RTL8822CS") are both valid and will work correctly.

Applied to files:

  • config/kernel/linux-rockchip64-current.config
📚 Learning: 2025-10-22T07:56:19.424Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8789
File: config/kernel/linux-sunxi64-edge.config:839-839
Timestamp: 2025-10-22T07:56:19.424Z
Learning: In Linux kernel configuration, some `=y` (builtin) options are infrastructure or feature flags that enable subsystems or features for modular drivers, rather than directly compiling code into the kernel. For example, in Armbian wireless configs, options like CONFIG_SPARD_WLAN_SUPPORT=y, CONFIG_SC23XX=y, CONFIG_WCN_BSP_DRIVER_BUILDIN=y, CONFIG_UNISOC_WIFI_PS=y are module infrastructure/feature enablers, while the actual drivers (CONFIG_WLAN_UWE5621=m, CONFIG_WLAN_UWE5622=m) remain as loadable modules. These infrastructure options don't cause kernel bloat.

Applied to files:

  • config/kernel/linux-rockchip64-current.config
📚 Learning: 2025-09-22T21:52:01.225Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8661
File: lib/functions/compilation/armbian-kernel.sh:194-201
Timestamp: 2025-09-22T21:52:01.225Z
Learning: The kernel_config_set_m function in lib/functions/compilation/armbian-kernel.sh preserves existing 'y' (built-in) settings and only sets options to 'm' (module) when they are not already built-in, achieving "prefer modules but allow built-ins" behavior.

Applied to files:

  • config/kernel/linux-rockchip64-current.config
📚 Learning: 2025-07-15T21:09:23.252Z
Learnt from: pyavitz
Repo: armbian/build PR: 8383
File: config/kernel/linux-sunxi64-edge.config:57-64
Timestamp: 2025-07-15T21:09:23.252Z
Learning: In Linux kernel configuration, when CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y is set, the ondemand governor is implicitly enabled by default, making the explicit CONFIG_CPU_FREQ_GOV_ONDEMAND=y line redundant. The make menuconfig tool automatically removes such redundant lines. This behavior applies to CPU frequency governor configurations in general - setting a default governor automatically enables that governor.

Applied to files:

  • config/kernel/linux-rockchip64-current.config
📚 Learning: 2025-09-14T06:19:06.828Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/kernel/linux-rockchip-vendor.config:0-0
Timestamp: 2025-09-14T06:19:06.828Z
Learning: CONFIG_ZSWAP has an implicit kernel-level dependency on CONFIG_SWAP, so when CONFIG_ZSWAP=y is set in Armbian overlay configs, CONFIG_SWAP gets automatically enabled during kernel build configuration processing, even if not explicitly specified in the overlay file.

Applied to files:

  • config/kernel/linux-rockchip64-current.config
📚 Learning: 2025-07-27T15:56:34.414Z
Learnt from: pyavitz
Repo: armbian/build PR: 8421
File: config/kernel/linux-sunxi64-edge.config:438-439
Timestamp: 2025-07-27T15:56:34.414Z
Learning: CONFIG_NET_SCH_DEFAULT is a boolean kernel configuration option (=y or =n) that enables/disables the ability to override the default network queueing discipline at runtime. When set to 'y', it allows setting the actual qdisc name via /proc/sys/net/core/default_qdisc at runtime, not in the kernel config file itself.

Applied to files:

  • config/kernel/linux-rockchip64-current.config
📚 Learning: 2025-08-30T06:56:33.372Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-30T06:56:33.372Z
Learning: In Armbian kernel configuration, the BTRFS configuration logic preserves existing settings (whether built-in 'y' or module 'm') and only sets BTRFS_FS to module when it was previously disabled or not set, achieving "allow but not require" flexibility while maintaining backward compatibility.

Applied to files:

  • config/kernel/linux-rockchip64-current.config
📚 Learning: 2025-08-11T22:00:13.411Z
Learnt from: rafayahmed317
Repo: armbian/build PR: 8484
File: config/kernel/linux-rk35xx-vendor.config:904-906
Timestamp: 2025-08-11T22:00:13.411Z
Learning: In the linux-rk35xx-vendor kernel, the LTE driver options (CONFIG_LTE, CONFIG_LTE_RM310, CONFIG_LTE_EM05) are defined as boolean in drivers/net/lte/Kconfig and cannot be built as modules - they must be either built-in (=y) or disabled.

Applied to files:

  • config/kernel/linux-rockchip64-current.config
📚 Learning: 2025-10-23T19:48:42.980Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8812
File: config/kernel/linux-sm8250-edge.config:498-501
Timestamp: 2025-10-23T19:48:42.980Z
Learning: For Armbian EDGE kernel configs, CONFIG_ATH12K=m alone is sufficient for PCI-based Wi-Fi 7 devices (e.g., WCN785x/QCN9274). A separate CONFIG_ATH12K_PCI option is not required, as confirmed by maintainer testing.

Applied to files:

  • config/kernel/linux-rockchip64-edge.config
📚 Learning: 2025-08-02T05:46:10.664Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-02T05:46:10.664Z
Learning: In the Armbian build system, the KERNEL_CONFIGURE=yes switch is deprecated. The recommended approach for kernel configuration is now to use the `kernel-config` build command, which provides a more structured way to configure kernel options.

Applied to files:

  • config/kernel/linux-rockchip64-edge.config
📚 Learning: 2025-03-31T12:57:13.880Z
Learnt from: libiunc
Repo: armbian/build PR: 8033
File: config/kernel/linux-starfive2-vendor.config:43-43
Timestamp: 2025-03-31T12:57:13.880Z
Learning: For StarFive2 platform kernel configurations, maintain alignment with vendor-provided configurations rather than modifying security settings like SECCOMP. This ensures hardware compatibility as intended by the manufacturer.

Applied to files:

  • config/kernel/linux-rockchip64-edge.config
📚 Learning: 2025-10-03T11:42:46.660Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8705
File: .github/workflows/rewrite-kernel-configs.yml:96-169
Timestamp: 2025-10-03T11:42:46.660Z
Learning: In the Armbian build repository's kernel config rewrite workflow (.github/workflows/rewrite-kernel-configs.yml), deletion of kernel config files does not need to be handled. The workflow intentionally only captures ACMR (added/copied/modified/renamed) changes and does not need to propagate deletions to the aggregator.

Applied to files:

  • config/kernel/linux-rockchip64-edge.config
🔇 Additional comments (11)
patch/kernel/archive/rockchip64-6.18/media-0006-media-verisilicon-AV1-Fix-tx-mode-bit-setting.patch (2)

42-54: LGTM - Correct TX mode mapping implementation.

The mapping function properly translates V4L2 AV1 TX modes to hardware-specific values:

  • V4L2_AV1_TX_MODE_ONLY_4X4ROCKCHIP_AV1_TX_MODE_ONLY_4X4 (0)
  • V4L2_AV1_TX_MODE_LARGESTROCKCHIP_AV1_TX_MODE_32x32 (3)
  • V4L2_AV1_TX_MODE_SELECTROCKCHIP_AV1_TX_MODE_SELECT (4)

The fallback to 32x32 mode at line 53 handles any unexpected enum values gracefully. This fixes the previous incorrect hardcoded logic that mapped ONLY_4X4 to SELECT.


69-72: LGTM - Clean integration of the new mapping.

The old conditional (ctrls->frame->tx_mode == 1) ? 3 : 4 incorrectly treated TX_MODE_ONLY_4X4 (0) as SELECT (4). The new implementation properly uses the mapping function to write the correct hardware TX mode value.

config/kernel/linux-rockchip64-current.config (1)

2822-2822: CONFIG_VSI_IOMMU enabled for Verisilicon IOMMU support.

This kernel config option enables the VSI IOMMU driver being added by this PR's patches. The driver provides vsi_iommu_restore_ctx() functionality used by the Verisilicon AV1 decoder (rockchip_vpu981_hw_av1_dec.c) to restore IOMMU context before decoding, which is necessary for Chromium to play 4K videos with 256M CMA as noted in the PR description.

config/kernel/linux-rockchip64-edge.config (1)

2836-2836: CONFIG_VSI_IOMMU consistently enabled in edge config.

This mirrors the same addition in the current config, ensuring the Verisilicon IOMMU driver is enabled for both kernel 6.18 (current) and 6.19 (edge) branches. This consistency is correct and necessary for the AV1 decoder patches to function across both supported kernel versions.

patch/kernel/archive/rockchip64-6.18/media-0005-media-verisilicon-AV1-Set-IDR-flag-for-intra_only-fr.patch (1)

20-28: LGTM! Correct fix for intra_only frame handling.

The change from !ctrls->frame->frame_type to IS_INTRA(ctrls->frame->frame_type) properly handles both KEY_FRAME (type 0) and INTRA_ONLY_FRAME (type 2) per the AV1 specification. This aligns with the commit message explaining that intra_only frames should also have the IDR flag set.

patch/kernel/archive/rockchip64-6.19/media-0007-add-verisilicon-AV1-iommu-driver.patch (2)

975-990: LGTM! Device tree integration for RK3588 Verisilicon IOMMU.

The device tree changes properly:

  • Link the av1d video codec to the new av1d_mmu IOMMU via the iommus property
  • Define the IOMMU node with appropriate compatible string, register range, interrupts, clocks, and power domain

933-951: LGTM! AV1 decoder IOMMU restoration integration.

The integration properly:

  • Retrieves the IOMMU domain for the device
  • Performs a NULL check before calling vsi_iommu_restore_ctx
  • Invokes restoration at the start of rockchip_vpu981_av1_dec_run to ensure correct IOMMU context for stateless decoding
patch/kernel/archive/rockchip64-6.19/media-0005-media-verisilicon-AV1-Set-IDR-flag-for-intra_only-fr.patch (1)

20-28: LGTM! Consistent with 6.18 version.

Same correct fix for intra_only frame handling as the 6.18 version. The IS_INTRA macro properly identifies both KEY_FRAME and INTRA_ONLY_FRAME types for IDR flag setting.

patch/kernel/archive/rockchip64-6.19/media-0006-media-verisilicon-AV1-Fix-tx-mode-bit-setting.patch (2)

42-54: LGTM! Correct TX mode mapping implementation.

The mapping function properly translates V4L2 AV1 TX modes to hardware-specific values:

  • V4L2_AV1_TX_MODE_ONLY_4X4ROCKCHIP_AV1_TX_MODE_ONLY_4X4 (0)
  • V4L2_AV1_TX_MODE_LARGESTROCKCHIP_AV1_TX_MODE_32x32 (3) - correctly maps "largest" to the maximum 32x32 transform size
  • V4L2_AV1_TX_MODE_SELECTROCKCHIP_AV1_TX_MODE_SELECT (4)

The default fallback to 32x32 is reasonable for unknown modes.


65-75: LGTM! Correct replacement of incomplete inline logic.

The old inline conditional (ctrls->frame->tx_mode == 1) ? 3 : 4 was incorrect - it mapped TX_MODE_ONLY_4X4 (0) to SELECT (4) instead of to 0. The new mapping function call properly handles all V4L2 TX modes.

patch/kernel/archive/rockchip64-6.18/media-0007-add-verisilicon-AV1-iommu-driver.patch (1)

552-576: Correct IOMMU attach_dev API for kernel 6.18.

The attach_dev callbacks correctly use the 2-parameter signature (domain, dev) without the old domain parameter, matching the kernel 6.18 IOMMU API. This differs appropriately from the 6.19 version which includes the old parameter.

Also applies to: 627-655

@github-actions github-actions bot added the Ready to merge Reviewed, tested and ready for merge label Jan 13, 2026
@github-actions
Copy link
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions bot removed the Needs review Seeking for review label Jan 13, 2026
@igorpecovnik igorpecovnik merged commit 73aab5f into armbian:main Jan 13, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

02 Milestone: First quarter release Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/large PR with 250 lines or more

Development

Successfully merging this pull request may close these issues.

3 participants