Skip to content

sm8550: rewrite current patchset, may need maintainers attention#9414

Open
EvilOlaf wants to merge 1 commit intoarmbian:mainfrom
EvilOlaf:sm8550-current-rewrite
Open

sm8550: rewrite current patchset, may need maintainers attention#9414
EvilOlaf wants to merge 1 commit intoarmbian:mainfrom
EvilOlaf:sm8550-current-rewrite

Conversation

@EvilOlaf
Copy link
Member

@EvilOlaf EvilOlaf commented Feb 18, 2026

Description

quite a messy rewrite but any maintainer for sm8550 can look for themselves: https://paste.armbian.com/inajoromes

This isn't actually meant to be merged, more like a heads-up to check if there are potential issues.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added Qualcomm Iris video decoder driver with full V4L2 and streaming support for SM8550.
    • Added new device drivers: RSInput gamepad, Chipone ICNA3512 LCD panel, Synaptics TD4328 LCD panel, HEROIC HTR3212 LED controller, SI-EN SN3112 PWM driver.
    • Added support for dynamic resolution changes and frame-type metadata handling in video decoder.
    • Added WiFi/Bluetooth MAC address generation from device serial number.
  • Bug Fixes

    • Fixed audio codec DAI operations and firmware loading paths.
    • Fixed MMC HS mode frequency limiting for platforms with level shifters.
    • Fixed DisplayPort PHY power state tracking and Type-C mux handling.
  • Performance Improvements

    • Added dynamic power scaling and clock management for video decoding workloads.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

📝 Walkthrough

Walkthrough

This patchset introduces a comprehensive Qualcomm Iris video decoder driver for SM8550 with HFI communication, power management, buffer handling, and V4L2 integration, alongside new hardware drivers for panels, LEDs, input devices, PWM controllers, and miscellaneous device tree and kernel subsystem updates.

Changes

Cohort / File(s) Summary
Iris Video Decoder Driver Core
drivers/media/platform/qcom/iris/iris_core.h, iris_probe.c, iris_vidc.c, iris_instance.h, iris_platform_*.c
Foundational driver scaffold with core state management, probe/device registration, V4L2 file operations, and per-instance lifecycle management for video decoding sessions.
Iris HFI (Host Firmware Interface)
drivers/media/platform/qcom/iris/iris_hfi_*.h, iris_hfi_*_command.c, iris_hfi_*_response.c, iris_hfi_*_defines.h, iris_hfi_*_packet.*
Complete HFI stack for Gen1/Gen2 firmware communication with command construction, response handling, packet definitions, and session lifecycle management (open, close, start, stop, drain).
Iris Firmware and Boot
drivers/media/platform/qcom/iris/iris_firmware.h, iris_firmware.c, iris_vpu_common.h, iris_vpu_common.c
Firmware loading/unloading via MDT loader and SCM, VPU boot sequence initialization, and interrupt/watchdog support.
Iris Power and Resource Management
drivers/media/platform/qcom/iris/iris_power.h, iris_power.c, iris_resources.h, iris_vpu2.c, iris_vpu3.c
Dynamic power scaling, clock/ICC bandwidth management, per-VPU frequency calculation hooks, and runtime PM integration for power-on/off sequences.
Iris Buffer and VB2 Management
drivers/media/platform/qcom/iris/iris_buffer.h, iris_buffer.c, iris_vb2.h, iris_vb2.c, iris_vpu_buffer.h
VB2 queue integration, internal/deferred buffer allocation/queuing/release, buffer size calculation, and V4L2 buffer lifecycle management (queue_setup, buf_init, buf_queue, start/stop streaming).
Iris Format and Control
drivers/media/platform/qcom/iris/iris_vdec.h, iris_vdec.c, iris_ctrls.h, iris_ctrls.c
Format negotiation (try_fmt, s_fmt, g_fmt, enum_fmt, enum_framesizes), V4L2 control operations, firmware capability exposure, and property setting to firmware.
Iris State Machine and Session Management
drivers/media/platform/qcom/iris/iris_state.h, iris_state.c, iris_utils.h, iris_utils.c
Instance state tracking (INIT, STREAMING, ERROR, DRAIN), sub-state machine (DRC, drain, pause), session lookup, response waiting, and allowed command gating.
Iris Dynamic Resolution and Events
drivers/media/platform/qcom/iris/iris_vidc.c, iris_vdec.c (resolution change paths)
Dynamic resolution change (DRC) handling, V4L2 event subscriptions (EOS, SOURCE_CHANGE, CTRL), selection ioctls, and capability queries.
DTS and Bindings
arch/arm64/boot/dts/qcom/sm8550.dtsi, Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml, Documentation/devicetree/bindings/mmc/sdhci-msm.yaml, Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
Device tree nodes for Iris video codec and UART15, plus DT binding documentation updates for iris, MMC level-shifter, and PHY mode-switch.
Panel Drivers
drivers/gpu/drm/panel/panel-chipone-icna3512.c, drivers/gpu/drm/panel/panel-synaptics-td4328.c, drivers/gpu/drm/panel/Kconfig, Makefile
New DRM panel drivers for Chipone ICNA3512 and Synaptics TD4328 with MIPI-DSI, backlight, and initialization sequences.
LED and Input Drivers
drivers/leds/leds-htr3212.c, drivers/input/joystick/rsinput.c, corresponding Kconfig/Makefile
HEROIC HTR3212 I2C LED driver and RSInput gamepad UART serdev driver with PWM and protocol handling.
Audio and Codec
sound/soc/codecs/aw88166.c, sound/soc/qcom/sc8280xp.c
AW88166 codec DAI ops refactoring with firmware loading, and SC8280XP primary I2S clock management.
PHY and Clock
drivers/phy/qualcomm/phy-qcom-qmp-combo.c, drivers/clk/qcom/gcc-sm8550.c
QMP combo PHY mode initialization (DP/USB/combo), Type-C mux registration, and UFS PHY GDSC flag updates.
MMC/SDHCI
drivers/mmc/host/sdhci-msm.c, drivers/mmc/host/sdhci-msm-downstream.c
Level-shifter support for SD cards with frequency capping, FIFO clock toggle, and extensive downstream driver implementation with CQE and QoS.
PWM and System
drivers/pwm/pwm-sn3112.c, drivers/pwm/pwm-fan.c, drivers/soc/qcom/socinfo.c, drivers/bluetooth/btqca.c
SN3112 PWM driver, fan speed initialization, and serial number-based MAC/BD address generation for Wi-Fi and Bluetooth.
Device Tree Platform
arch/arm64/boot/dts/qcom/qcs8550-ayn-odin2.dts, arch/arm64/boot/dts/qcom/pmk8550.dtsi
Complete Odin2 platform device tree with power, display, GPU, I2C, and PMK8550 PWM node.

Sequence Diagram

sequenceDiagram
    participant Client as V4L2 Client
    participant Core as Iris Core
    participant VPU as VPU/FW
    participant HFI as HFI Queue
    participant Firmware as Firmware

    Note over Client,Firmware: Iris Video Decoder Initialization Flow

    Client->>Core: iris_open()
    Core->>Core: iris_core_init()
    Core->>VPU: iris_fw_load()
    VPU->>Firmware: Load firmware via MDT
    Firmware-->>VPU: Firmware loaded
    VPU->>VPU: iris_vpu_boot_firmware()
    VPU-->>Core: Boot complete

    Core->>HFI: iris_hfi_core_init()
    HFI->>HFI: Initialize queues
    HFI-->>Core: Queues ready

    Core->>HFI: iris_hfi_isr_handler()
    HFI->>Firmware: Send SYS_INIT
    Firmware-->>HFI: SYS_INIT_DONE response
    HFI->>Core: Complete core_init_done

    Note over Client,Firmware: Stream Setup (per-session)

    Client->>Core: REQBUF for OUTPUT
    Core->>Core: iris_session_open()
    Core->>HFI: session_open()
    HFI->>Firmware: SESSION_INIT
    Firmware-->>HFI: SESSION_INIT_DONE
    HFI->>Core: Route to iris_inst

    Core->>Core: iris_set_properties()
    Core->>HFI: session_set_property()
    HFI->>Firmware: Property update
    Firmware-->>HFI: Property ACK

    Core->>Core: iris_alloc_and_queue_internal_bufs()
    HFI->>Firmware: SESSION_SET_BUFFERS (internal)

    Note over Client,Firmware: Streaming

    Client->>Core: STREAMON OUTPUT
    Core->>Core: iris_vdec_streamon_output()
    Core->>HFI: session_load_resources()
    HFI->>Firmware: LOAD_RESOURCES
    Firmware-->>HFI: LOAD_DONE

    Core->>HFI: session_start()
    HFI->>Firmware: SESSION_START
    Firmware-->>HFI: START_DONE
    Core->>Core: State→OUTPUT_STREAMING

    Client->>Core: QBUF (input buffer)
    Core->>HFI: session_empty_buffer()
    HFI->>Firmware: Input data
    Firmware->>Firmware: Decode
    Firmware->>HFI: FTB_DONE (output buffer)
    HFI->>Core: iris_hfi_gen2_response()
    Core->>Core: iris_vb2_buffer_done()
    Core-->>Client: Decoded frame ready
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes


Poem

🐰 A whisker-twitch of joy unfolds,
Video streams in iris gold,
Firmware boots, queues align,
Buffers dance in perfect time!
Panels glow, controllers hum,
SM8550's here—the codec's come!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: a rewrite of the sm8550 'current' patchset, which aligns with the comprehensive kernel patch updates across 54 patches.
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 size/large PR with 250 lines or more 02 Milestone: First quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Feb 18, 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: 6

@igorpecovnik
Copy link
Member

igorpecovnik commented Feb 18, 2026

I just had discussion with @Squishy123 and i advise him to focus to 6.18.y, make it current, and ditch the rest to ease maintenance burden. Patches are coming somewhere from https://github.com/ROCKNIX so i guess we don't want to change them unless really necessary.

There is only one device (Ayn Odin and its variants) behind this kernel.

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, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/large PR with 250 lines or more

Development

Successfully merging this pull request may close these issues.

2 participants