Re: [PATCH v2 00/23] drm/msm/dcp: Add Qualcomm DCP display support
From: Dmitry Baryshkov
Date: Tue Oct 27 2026 - 08:06:19 EST
On Mon, Oct 26, 2026 at 11:51:10AM +0530, Jayant Shekhar wrote:
> On Qualcomm platforms using the Display Co-Processor (DCP), the display
> hardware is owned and programmed by firmware. Linux does not access the
> display controller, DSI controller, DSI PHY, display clocks, or other
> display pipeline registers.
>
> The display pipeline must nevertheless be exposed through the DRM/KMS
> interfaces so userspace can perform modesetting, framebuffer updates,
> panel control, and page flips.
>
> This series adds a DCP KMS backend to MSM DRM. It represents the
> firmware-owned display pipeline and translates DRM operations into HFI
> commands.
>
> DCP communicates with Linux over VirtIO and uses the HFI protocol for
> command and response handling, capability discovery, and display events.
>
> This series adds:
>
> - Device-tree bindings for the Qualcomm DCP VirtIO transport wrapper,
> firmware-visible IOVA ranges, separate transport and framebuffer IOMMU
> contexts, IPCC power notification, interrupts, and the external DSI
> display graph.
>
> - HFI protocol definitions and packet helpers for capability discovery,
> modesetting, plane and CRTC configuration, DSI, and panel control.
>
> - A Qualcomm DCP transport wrapper which initializes the IPCC channel,
> sends the required power notification, and registers the DCP VirtIO
> device directly. The wrapper also implements the MMIO transport and
> keeps VirtIO queue activity ordered with DCP power transitions.
>
> - VirtIO command and response queues. HFI command, response, and
> capability buffers are allocated through the DMA API in the address
> space visible to DCP firmware.
>
> - Synchronous command tracking, asynchronous response dispatch, timeout
> handling, and queue teardown synchronization for safe device removal.
>
> - Capability discovery for displays, CRTCs, mixers, VIG and DMA pipes,
> DSI interfaces, and panel resources.
>
> - DRM planes and CRTCs using the standard atomic-state model. DRM state is
> translated into HFI properties for layer configuration, mixer limits,
> bandwidth and clock properties, frame sequencing, and triggering.
>
> - An MSM KMS backend, DCP encoder, and DSI bridge. The backend reuses the
> existing MSM DRM device, GEM and framebuffer handling, atomic commit
> infrastructure, encoder, bridge, and connector support.
>
> - Asynchronous VSYNC, frame-scan completion, and error events propagated to
> DRM for vblank and page-flip completion.
>
> - IPCC power notifications to wake DCP firmware and coordinate HFI queue
> activity across firmware power transitions.
>
> DCP is integrated as an MSM KMS backend rather than a separate DRM device.
> This preserves the userspace-visible MSM DRM device and allows Linux to
> retain normal DRM/KMS semantics while display hardware remains owned by
> firmware.
>
> The initial implementation supports the DSI output described below and
> uses resources reported by firmware. 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
> ├── transport IOMMU context
> ├── firmware-visible iommu-ranges
> ├── VirtIO and power-notify interrupts
> ├── dcp-power-tx mailbox
> └── dcp-subsystem
> ├── compatible = "virtio,device34"
> ├── framebuffer IOMMU context
> ├── port@0
> │ └── endpoint ─────────────── panel endpoint
> └── dsi@0
> └── panel@0
>
> The DCP INTF endpoint connects directly to the panel endpoint. Firmware
> internal paths, including the INTF-to-DSI connection, are not described in
> the device tree.
>
> Runtime Architecture
> ====================
>
> Linux DRM/KMS
> └── DCP MSM KMS backend
> ├── planes, CRTCs, encoder, connector, and DSI bridge
> └── DRM atomic state and commit handling
> │
> ▼
> DCP VirtIO function driver
> │
> ▼
> VirtIO core
> │
> ▼
> qcom,dcp-virtio transport wrapper
> ├── IPCC initialization and power notification
> ├── MMIO register access
> ├── VirtIO queue setup and interrupt handling
> ├── VirtIO device registration
> └── suspend/resume power sequencing
> │
> ▼
> DCP firmware
> ├── HFI command and response handling
> ├── display pipeline and VIG/DMA pipes
> ├── DSI PHY and controller
> └── display clocks and resource handling
Going through the series, I have come with the quite generic comment.
Please split the series into two independent parts:
- Documentation/devicetree/bindings/virtio/qcom,dcp-virtio.yaml
drivers/virtio/virtio_dcp_*.[ch]
Driver for the DCP + IPCC VirtIO host. The driver should not know
anything about the display interface.
- Documentation/devicetree/bindings/display/msm
drivers/gpu/drm/msm/dcp
The actual driver for the DCP display engines. It must not know or
care at all about the particular VirtIO host (or SoC FWIW). It should
not use IPCC. If we pass it through to the VM via virtio-mmio or
virtio-pci it must work as is.
Possibly submit those as two separate series.
--
With best wishes
Dmitry