[PATCH v3 00/21] drm/msm/dcp: Add Qualcomm DCP display support
From: Jayant Shekhar
Date: Thu Nov 26 2026 - 01:29:39 EST
On Qualcomm platforms using the Display Co-Processor (DCP), firmware owns
and programs the display hardware. Linux cannot directly access the display
controller, DSI controller or PHY, display clocks, or related pipeline
registers.
This series adds the DCP display-function driver as an MSM DRM/KMS backend.
It discovers display capabilities through HFI over VirtIO and translates
DRM atomic operations into firmware commands, while preserving the existing
MSM DRM device and userspace interfaces.
The series adds:
- HFI protocol definitions, packet helpers, command/response handling,
capability discovery, and asynchronous display-event processing.
- DRM planes, CRTCs, encoder, DSI host/bridge, and KMS integration for
firmware-owned display resources.
- HFI-based DSI mode validation, display power/session management, bridge
configuration, and DCS transfers.
- A DCP VirtIO function driver that carries HFI traffic over VirtIO queues
and handles the DMA/IOMMU needs of the display function.
- Device-tree bindings for the DCP display function, framebuffer IOMMU
context, INTF graph, DSI host indices, and downstream display connections.
- Hawi device-tree integration for the DCP display function.
The Qualcomm-specific VirtIO host transport is submitted separately. It
handles IPCC power notification and VirtIO-MMIO register access; this series
contains the DCP function driver and display stack. The function driver
currently validates its parent transport using the device-tree compatible.
DCP is integrated as an MSM KMS backend rather than a separate DRM device.
Firmware reports available display resources and owns the display pipeline;
Linux retains standard DRM/KMS atomic, framebuffer, bridge, and event
handling.
The initial implementation supports the DSI output described below.
Split-pipe, multirect, cursor-pipe, partial-update, DisplayPort, and
writeback support are deferred.
Tested on the Qualcomm Hawi MTP with an NT37801 DSC command-mode panel:
- Display console at 1440x3200.
- Panel initialization and DCS transfers complete successfully.
Device-tree topology
===================
qcom,dcp-virtio (companion host series)
└── display-subsystem (DCP display function)
├── framebuffer IOMMU context
├── port@N ────────────────────────> downstream display endpoint
└── dsi@N
└── DSI peripheral
The INTF graph endpoint connects directly to the downstream display
endpoint. Firmware-internal paths, including the INTF-to-DSI connection,
are discovered and managed by firmware rather than described in DT.
Runtime architecture
====================
Linux DRM/KMS
└── MSM DCP KMS backend
├── planes, CRTCs, encoder, and DSI bridge
└── HFI command and event handling
│
│ VirtIO queues
▼
VirtIO core / DCP function driver
│
▼
Qualcomm VirtIO host transport
(companion series: IPCC and MMIO)
│
▼
DCP firmware
├── display pipeline and resources
├── DSI controller and PHY
└── display clocks
Probe and initialization
========================
Qualcomm host transport initializes power notification
│
▼
Host registers the VirtIO device
│
▼
VirtIO core binds the DCP function driver
│
▼
Initialize HFI queues; send DEVICE_INIT; query capabilities
│
▼
Register the MSM DRM/KMS backend
The host must complete its power-notification sequence before accessing
VirtIO-MMIO registers. Once the VirtIO device is registered, the DCP
function driver initializes HFI, discovers firmware resources, and exposes
the display backend to MSM DRM.
Dependencies
============
- The VPU IOMMU series provides IOVA handling required for firmware-visible
DMA mappings:
https://lore.kernel.org/all/20260926-vpu_iommu_iova_handling-v5-4-0322ca5dc10c@xxxxxxxxxxxxxxxx/
- The separate Qualcomm DCP VirtIO host-transport series provides the
IPCC-aware host required to expose the DCP function device.
Signed-off-by: Jayant Shekhar <jayant.shekhar@xxxxxxxxxxxxxxxx>
---
Changes in v3:
- Split the patches into two independent series: one for the Qualcomm VirtIO
transport and one for the DCP display driver. (Dmitry)
- Fold the DSI-host schema into the DCP binding, rename the transport child
to display-subsystem, and clarify the shared interface-index namespace
and IOVA cell format. (Dmitry)
- Model the Linux DSI connection as a generic DRM bridge and use
struct drm_dsc_config rather than duplicating DSC fields. (Dmitry)
- Move mode-dependent DSC setup and HFI mode validation into atomic check,
and send display-disable and post-disable HFI commands from their
corresponding DRM callbacks. (Dmitry)
- Remove redundant NULL, framebuffer, and vblank-state checks; use
struct drm_rect for mixer ROIs; and enforce blend-stage limits
through normalized_zpos. (Dmitry)
- Remove the portrait-specific width/height cap swap; check max_width
directly and leave full mode validation to firmware. (Dmitry)
- Reduce atomic-check diagnostics to debug-level logging and document
fullscreen-plane handling. (Dmitry)
- Split the Qualcomm VirtIO host transport into a separate series,
use VIRTIO_ID_VENDOR and validate the parent DT compatible for DCP. (Dmitry)
- Clarify that DCP uses firmware-delivered display events and has no
host-visible display IRQ. (Dmitry)
- Remove redundant/unused Hawi pinctrl states and clean up the
DTS formatting. (Dmitry)
Changes in v2:
- Compared with v1, the series is split into smaller patches. (Dmitry)
- Reworked the VirtIO transport integration so the Qualcomm
`qcom,dcp-virtio` wrapper performs the required IPCC power
notification before accessing the VirtIO MMIO registers and
registering the virtio_device. The transport registers the device
directly.
- Reworked the DT topology so the DCP INTF output connects directly to
the panel endpoint. The firmware-internal INTF-to-DSI path is no
described in DT. (Dmitry)
- Updated the DCP VirtIO binding to document the Qualcomm VirtIO
transport and VirtIO MMIO register layout, Qualcomm power-notify
interrupt, IOMMU contexts, mailbox, and firmware-visible IOVA
range. (Dmitry)
- Removed the interrupt-names property and used the defined interrupt
ordering for the VirtIO and power-notify interrupts. (Dmitry)
- Added panel bridge and component integration so panel bridges are
resolved through the DCP DSI host before DRM registration. (Dmitry)
- Tracked CRTCs using firmware display IDs instead of DRM CRTC
iteration order. (Dmitry)
- Moved DSI DCS-buffer mapping into KMS hardware initialization,
after the IOMMU VM became available, with rollback unmapping on
failure and before VM teardown.
- Reworked IPCC resource handling to use managed IRQ and mailbox
cleanup. (Dmitry)
- Moved IRQ-wake handling to the suspend and resume paths. (Dmitry)
- Removed the ipcc_valid state and made IPCC initialization and teardown
follow the channel lifetime. (Dmitry)
- Embedded the HFI capability cache and removed unused capability fields,
feature flags, and callback state. (Dmitry)
- Removed VirtIO config-change capability re-query handling because
capabilities are consumed during initialization.
- Removed the temporary self-component shim and registered DCP DSI hosts
as components. (Dmitry)
- Added optional GPU component matching for the display-only DCP DRM
device. (Dmitry)
- Made HFI packet-ID allocation atomic across wraparound using cmpxchg().
(Dmitry)
- Updated bandwidth aggregation to ignore invisible planes and planes
without framebuffers. (Dmitry)
- Moved DSI topology values into atomic bridge state while keeping static
panel configuration separate from per-commit state. (Dmitry)
- Removed the unused DP catalog and resource path. (Dmitry)
- Removed unused HFI hotplug and error callback plumbing. (Dmitry)
- Simplified HFI buffer release paths for callers already holding the
command lock. (Dmitry)
- Exported the generic MSM GPU-component matching helper for the DCP
backend.
- Replaced deprecated DRM logging macros with DRM device logging helpers.
(Dmitry)
- Removed unused includes and fixed indentation, naming, logging, and
error-handling issues. (Dmitry)
- Removed status in DT bindings and commit subject. (Krzysztof)
- Documented the DSI host DT ABI: DSI hosts use the generic dsi@N node
naming convention, and their reg properties identify the corresponding
DCP output index. (Krzysztof)
- Fixed the Assisted-by trailer order. (Dmitry, Krzysztof)
- Link to v1: https://patch.msgid.link/20261015-jshekhar-drm-msm-dcp-v1-v1-0-48aad0fe4f72@xxxxxxxxxxxxxxxx
- Link to v2: https://lore.kernel.org/dri-devel/20261026-jshekhar-dcp-hlos-v2-0-7cf014efdee1@xxxxxxxxxxxxxxxx/
To: Rob Clark <robin.clark@xxxxxxxxxxxxxxxx>
To: Dmitry Baryshkov <lumag@xxxxxxxxxx>
To: Abhinav Kumar <abhinav.kumar@xxxxxxxxx>
To: Jessica Zhang <jesszhan0024@xxxxxxxxx>
To: Sean Paul <sean@xxxxxxxxxx>
To: Marijn Suijten <marijn.suijten@xxxxxxxxxxxxxx>
To: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
To: Maxime Ripard <mripard@xxxxxxxxxx>
To: Thomas Zimmermann <tzimmermann@xxxxxxx>
To: David Airlie <airlied@xxxxxxxxx>
To: Simona Vetter <simona@xxxxxxxx>
To: Rob Herring <robh@xxxxxxxxxx>
To: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>
To: Conor Dooley <conor+dt@xxxxxxxxxx>
To: Jayant Shekhar <jayant.shekhar@xxxxxxxxxxxxxxxx>
To: Sumit Semwal <sumit.semwal@xxxxxxxxxx>
To: Christian König <christian.koenig@xxxxxxx>
To: Philipp Stanner <phasta@xxxxxxxxxx>
To: Bjorn Andersson <andersson@xxxxxxxxxx>
To: Konrad Dybcio <konradybcio@xxxxxxxxxx>
To: Abel Vesa <abelvesa@xxxxxxxxxx>
To: Flemin Jose <flemin.jose@xxxxxxxxxxxxxxxx>
To: Mahadevan P <mahap@xxxxxxxxxxxxxxxx>
Cc: linux-arm-msm@xxxxxxxxxxxxxxx
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Cc: freedreno@xxxxxxxxxxxxxxxxxxxxx
Cc: devicetree@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-media@xxxxxxxxxxxxxxx
Cc: linaro-mm-sig@xxxxxxxxxxxxxxxx
---
Jayant Shekhar (21):
dt-bindings: display: msm: Add Qualcomm DCP
drm/msm/dcp: Add HFI packet helpers
drm/msm/dcp: Add HFI device definitions
drm/msm/dcp: Add HFI display definitions
drm/msm/dcp: Add HFI panel definitions
drm/msm/dcp: Add HFI VirtIO transport
drm/msm/dcp: Handle asynchronous HFI responses
drm/msm/dcp: Add generic HFI display commands
drm/msm/dcp: Add HFI DSI and panel commands
drm/msm/dcp: Add DCP CRTCs
drm/msm/dcp: Add DCP planes
drm/msm/dcp: Route HFI display events
drm/msm/dcp: Add DCP encoder
drm/msm/dcp: Add DCP DSI host and panel support
drm/msm/dcp: Integrate the DSI bridge with KMS
drm/msm/dcp: Register DCP display pipeline
drm/msm: Export GPU component matching helper
drm/msm/dcp: Add DCP VirtIO driver
drm/msm: Support KMS backends without a display IRQ
drm/msm: Register the DCP backend
arm64: dts: qcom: hawi: Add DCP support
.../devicetree/bindings/display/msm/qcom,dcp.yaml | 159 +++
arch/arm64/boot/dts/qcom/hawi-mtp.dts | 108 ++
arch/arm64/boot/dts/qcom/hawi.dtsi | 45 +
drivers/gpu/drm/msm/Kconfig | 26 +
drivers/gpu/drm/msm/Makefile | 20 +
drivers/gpu/drm/msm/dcp/dcp_crtc.c | 721 ++++++++++++
drivers/gpu/drm/msm/dcp/dcp_crtc.h | 85 ++
drivers/gpu/drm/msm/dcp/dcp_dpu_kms.c | 708 ++++++++++++
drivers/gpu/drm/msm/dcp/dcp_dpu_kms.h | 60 +
drivers/gpu/drm/msm/dcp/dcp_drv.c | 193 ++++
drivers/gpu/drm/msm/dcp/dcp_drv.h | 43 +
drivers/gpu/drm/msm/dcp/dcp_dsi_bridge.c | 988 +++++++++++++++++
drivers/gpu/drm/msm/dcp/dcp_dsi_bridge.h | 71 ++
drivers/gpu/drm/msm/dcp/dcp_dsi_config.h | 67 ++
drivers/gpu/drm/msm/dcp/dcp_encoder.c | 29 +
drivers/gpu/drm/msm/dcp/dcp_encoder.h | 16 +
drivers/gpu/drm/msm/dcp/dcp_hfi.h | 264 +++++
drivers/gpu/drm/msm/dcp/dcp_hfi_core.c | 1150 ++++++++++++++++++++
drivers/gpu/drm/msm/dcp/dcp_hfi_crtc.c | 191 ++++
drivers/gpu/drm/msm/dcp/dcp_hfi_dsi.c | 166 +++
drivers/gpu/drm/msm/dcp/dcp_hfi_dsi_config.c | 597 ++++++++++
drivers/gpu/drm/msm/dcp/dcp_hfi_encoder.c | 60 +
drivers/gpu/drm/msm/dcp/dcp_hfi_kms.c | 325 ++++++
drivers/gpu/drm/msm/dcp/dcp_hfi_plane.c | 63 ++
drivers/gpu/drm/msm/dcp/dcp_hfi_priv.h | 47 +
drivers/gpu/drm/msm/dcp/dcp_plane.c | 1042 ++++++++++++++++++
drivers/gpu/drm/msm/dcp/dcp_plane.h | 36 +
drivers/gpu/drm/msm/dcp/dcp_plane_state.h | 37 +
drivers/gpu/drm/msm/dcp/dcp_virtio.c | 310 ++++++
drivers/gpu/drm/msm/dcp/dcp_virtio.h | 12 +
drivers/gpu/drm/msm/dcp/hfi/hfi_commands_device.h | 78 ++
drivers/gpu/drm/msm/dcp/hfi/hfi_commands_display.h | 105 ++
.../drm/msm/dcp/hfi/hfi_commands_display_events.h | 90 ++
drivers/gpu/drm/msm/dcp/hfi/hfi_commands_panel.h | 27 +
drivers/gpu/drm/msm/dcp/hfi/hfi_defs_common.h | 182 ++++
drivers/gpu/drm/msm/dcp/hfi/hfi_defs_device.h | 61 ++
drivers/gpu/drm/msm/dcp/hfi/hfi_defs_display.h | 464 ++++++++
.../gpu/drm/msm/dcp/hfi/hfi_defs_display_color.h | 247 +++++
drivers/gpu/drm/msm/dcp/hfi/hfi_defs_panel.h | 287 +++++
.../gpu/drm/msm/dcp/hfi/hfi_pack_unpack_common.h | 79 ++
drivers/gpu/drm/msm/dcp/hfi/hfi_packer.c | 106 ++
drivers/gpu/drm/msm/dcp/hfi/hfi_packer.h | 65 ++
drivers/gpu/drm/msm/dcp/hfi/hfi_packet.h | 76 ++
.../gpu/drm/msm/dcp/hfi/hfi_properties_device.h | 102 ++
.../gpu/drm/msm/dcp/hfi/hfi_properties_display.h | 480 ++++++++
drivers/gpu/drm/msm/dcp/hfi/hfi_properties_panel.h | 198 ++++
drivers/gpu/drm/msm/dcp/hfi/hfi_unpacker.c | 157 +++
drivers/gpu/drm/msm/dcp/hfi/hfi_unpacker.h | 77 ++
drivers/gpu/drm/msm/dcp/hfi/hfi_utils.c | 62 ++
drivers/gpu/drm/msm/dcp/hfi/hfi_utils.h | 56 +
drivers/gpu/drm/msm/msm_drv.c | 8 +-
drivers/gpu/drm/msm/msm_drv.h | 10 +
drivers/gpu/drm/msm/msm_kms.c | 2 +-
53 files changed, 10654 insertions(+), 4 deletions(-)
---
base-commit: 9437046953b2fb3bf55b36582450ea0267df82a7
change-id: 20261112-jshekhar-v3-dcp-e89cf035074b
prerequisite-patch-id: eecfd66a55b8f2b7b2fc7d76d815facca0489d00
prerequisite-message-id: <20261126-jshekhar-qcom-virtio-dcp-v1-0-7b49bda74916@xxxxxxxxxxxxxxxx>
prerequisite-patch-id: 43f30570f31419a014962e6012f98f5b341d46bc
prerequisite-patch-id: 08ffd8da137637eda4fa6d64a4a7fc5a24ea80a6
prerequisite-patch-id: eca5d1310fd57c909cedf1668e075acb966db4ba
Best regards,
--
Jayant Shekhar <jayant.shekhar@xxxxxxxxxxxxxxxx>