[PATCH 00/11] Subject: [PATCH 00/11] Add DRM support for Amlogic S4

Ao Xu ao.xu at amlogic.com
Thu Feb 5 03:56:29 PST 2026


Hi neil, martin, jerome

This email proposes a refactoring of the Meson DRM driver to adopt a
component-based pipeline management model, inspired by the ARM Komeda DRM
driver.

The current Meson DRM implementation tightly couples drm_plane and
drm_crtc logic with specific hardware blocks (OSD MIF, AFBC, scaler,
blend, postblend), which makes it increasingly difficult to scale to
newer SoCs.

The attached /vpu-block/ file describes the proposed VPU block pipeline.

This implement introduces a generic pipeline framework where:

- Hardware blocks (MIF, AFBC, SCALER, BLEND, POSTBLEND) are modeled as
   independent components with well-defined capabilities.

- drm_plane and drm_crtc are responsible only for building and validating
   a pipeline, not for directly programming hardware registers.
- Per-block atomic state is separated from SoC-specific register layouts,
   similar to Komeda's component_state and pipeline_state model.

This is achieved by introducing four core objects, as shown in the 
attached class-diagram document.

- meson_vpu_block
- meson_vpu_block_state
- meson_pipeline
- meson_pipeline_state


The atomic flow is structured as shown in the attached commit-flow document.

The intention of this proposal is not to change hardware behavior, but to
gradually restructure the driver to improve maintainability, scalability,
and correctness of atomic state handling across different Meson SoCs.

This is an initial proposal intended to gather feedback on the overall
architecture before converting existing code paths incrementally.

Comments and suggestions are very welcome.

Thanks,


在 2025/1/10 18:10, Neil Armstrong 写道:
> [You don't often get email from neil.armstrong at linaro.org. Learn why 
> this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> [ EXTERNAL EMAIL ]
>
> Hi,
>
> On 10/01/2025 06:39, Ao Xu via B4 Relay wrote:
>> This patch series adds DRM support for the Amlogic S4-series SoCs.
>> Compared to the Amlogic G12-series, the S4-series introduces the 
>> following changes:
>>
>> 1 The S4-series splits the HIU into three separate components: 
>> `sys_ctrl`, `pwr_ctrl`, and `clk_ctrl`.
>>    As a result, VENC and VCLK drivers are updated with S4-specific 
>> compatible strings to accommodate these changes.
>> 2 The S4-series secures access to HDMITX DWC and TOP registers,
>>    requiring modifications to the driver to handle this new access 
>> method.
>> 3 The register addresses for the video1 and video2 planes have been 
>> updated in the S4 hardware,
>>    and the DRM driver has been adapted accordingly.
>> 4 The OSD, VIU, and VPP components remain unchanged and are 
>> consistent with the G12-series.
>
> Thanks a lot for this high quality changeset, happy to see DRM support 
> for a new SoC !
>
> I'll review it carefully next week.
>
> Neil
>
>>
>> Signed-off-by: Ao Xu <ao.xu at amlogic.com>
>> ---
>> Ao Xu (11):
>>        dt-bindings: display: meson-dw-hdmi: Add compatible for S4 
>> HDMI controller
>>        dt-bindings: display: meson-vpu: Add compatible for S4 display 
>> controller
>>        drm: meson: add S4 compatible for DRM driver
>>        drm: meson: add primary and overlay plane support for S4
>>        drm: meson: update VIU and VPP support for S4
>>        drm: meson: add meson_dw_hdmi support for S4
>>        drm: meson: change api call parameter
>>        drm: meson: add hdmitx vmode timing support for S4
>>        drm: meson: add vpu clk setting for S4
>>        drm: meson: add CVBS support for S4
>>        arm64: dts: amlogic: s4: add DRM support [1/1]
>>
>>   .../bindings/display/amlogic,meson-dw-hdmi.yaml    |    1 +
>>   .../bindings/display/amlogic,meson-vpu.yaml        |   48 +-
>>   .../boot/dts/amlogic/meson-s4-s805x2-aq222.dts     |   39 +
>>   arch/arm64/boot/dts/amlogic/meson-s4.dtsi          |  121 +++
>>   drivers/gpu/drm/meson/meson_crtc.c                 |   90 +-
>>   drivers/gpu/drm/meson/meson_drv.c                  |  127 ++-
>>   drivers/gpu/drm/meson/meson_drv.h                  |    6 +
>>   drivers/gpu/drm/meson/meson_dw_hdmi.c              |  244 ++++-
>>   drivers/gpu/drm/meson/meson_dw_hdmi.h              |  126 +++
>>   drivers/gpu/drm/meson/meson_encoder_cvbs.c         |   10 +
>>   drivers/gpu/drm/meson/meson_encoder_hdmi.c         |   19 +-
>>   drivers/gpu/drm/meson/meson_overlay.c              |    7 +-
>>   drivers/gpu/drm/meson/meson_plane.c                |   24 +-
>>   drivers/gpu/drm/meson/meson_registers.h            |   17 +
>>   drivers/gpu/drm/meson/meson_vclk.c                 | 1018 
>> ++++++++++++++------
>>   drivers/gpu/drm/meson/meson_venc.c                 |  346 ++++++-
>>   drivers/gpu/drm/meson/meson_venc.h                 |    4 +-
>>   drivers/gpu/drm/meson/meson_viu.c                  |    9 +-
>>   drivers/gpu/drm/meson/meson_vpp.c                  |   12 +-
>>   19 files changed, 1865 insertions(+), 403 deletions(-)
>> ---
>> base-commit: 6ecd20965bdc21b265a0671ccf36d9ad8043f5ab
>> change-id: 20250110-drm-s4-c96c88be52e4
>>
>> Best regards,
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vpu-block.png
Type: image/png
Size: 38906 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20260205/a0a874a0/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: class-diagram.png
Type: image/png
Size: 135461 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20260205/a0a874a0/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: commit-flow.png
Type: image/png
Size: 51324 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20260205/a0a874a0/attachment-0002.png>


More information about the linux-amlogic mailing list