mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 00/13] drm/msm/dcp: Add Qualcomm DCP display support
@ 2026-10-15  7:38 Jayant Shekhar
  2026-10-15  7:38 ` [PATCH 01/13] dt-bindings: display: msm: Add Qualcomm DCP bindings Jayant Shekhar
                   ` (12 more replies)
  0 siblings, 13 replies; 27+ messages in thread
From: Jayant Shekhar @ 2026-10-15  7:38 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Sumit Semwal,
	Christian König, Philipp Stanner, Bjorn Andersson,
	Konrad Dybcio, Abel Vesa, Joerg Roedel (AMD),
	Will Deacon, Robin Murphy
  Cc: linux-arm-msm, dri-devel, freedreno, devicetree, linux-kernel,
	linux-media, linaro-mm-sig, iommu, Jayant Shekhar

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, representing the
firmware-owned pipeline and translating 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 DCP VirtIO-MMIO function, IOVA
  range, 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.

- VirtIO transport with 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 and 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 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
  VirtIO-MMIO host
  ├── iommus              VirtIO/HFI DMA context
  ├── iommu-ranges        IOVA window
  ├── interrupts          VirtIO + power notification
  ├── mboxes              dcp-power-tx
  └── dcp-subsystem
      ├── compatible       virtio,device34
      ├── iommus           framebuffer DMA context
      ├── port@1           DCP INTF1
      │    └── endpoint ────────────┐
      └── dsi@0                     │
           ├── port@0 ◄─────────────┘
           └── port@1             DSI output

Runtime Architecture
====================

  Linux DRM/KMS
  ├── planes, CRTCs, connector, encoder, DSI bridge
  ├── atomic state and framebuffer handling
  └── DCP VirtIO device driver
              |
              v
  Upstream VirtIO-MMIO transport
              |
              v
  DCP HFI protocol
  ├── capability and resource discovery
  ├── commands and responses
  └── VSYNC, frame-done, and error events
              |
       +------+-------+
       |              |
       v              v
  cmd/resp queues   IPCC mailbox
  HFI buffers       power notification
       |              |
       +------+-------+
              |
              v
       DCP firmware
       ├── display pipeline and VIG/DMA pipes
       ├── DSI PHY and controller
       └── display clocks and resource handling

Dependencies
============

The DT changes depend on the following series:

- VPU IOMMU IOVA handling:

  https://lore.kernel.org/all/20260926-vpu_iommu_iova_handling-v5-4-0322ca5dc10c@oss.qualcomm.com/

- Hawi device-tree support:

  https://lore.kernel.org/all/20260923-hawi-dt-post-v1-4-e41473b6298b@oss.qualcomm.com/
  https://lore.kernel.org/all/20260923-hawi-dt-post-v1-3-e41473b6298b@oss.qualcomm.com/

The VPU IOMMU series provides the IOVA handling required by the DCP VirtIO
transport. The Hawi DT series provides the platform nodes and IOMMU
descriptions consumed by this series.

Signed-off-by: Jayant Shekhar <jayant.shekhar@oss.qualcomm.com>
Assisted-by: LLM
---
Jayant Shekhar (13):
      dt-bindings: display: msm: Add Qualcomm DCP bindings
      drm/msm/dcp: Add HFI protocol definitions
      drm/msm/dcp: Add HFI transport over VirtIO
      drm/msm/dcp: Add IPCC power notification
      drm/msm/dcp: Add HFI display command implementations
      drm/msm/dcp: Add planes, CRTCs, and HFI event routing
      drm/msm/dcp: Add DCP encoder
      drm/msm/dcp: Add DSI bridge
      drm/msm/dcp: Register DCP display pipeline
      drm/msm/dcp: Add VirtIO transport and platform driver
      drm/msm: Support KMS backends without a display IRQ
      drm/msm: Register the DCP backend
      arm64: dts: qcom: hawi: Add DCP support

 .../bindings/display/msm/qcom,dcp-dsi.yaml         |   75 ++
 .../bindings/display/msm/qcom,dcp-virtio.yaml      |  113 ++
 .../devicetree/bindings/display/msm/qcom,dcp.yaml  |  119 ++
 arch/arm64/boot/dts/qcom/hawi-mtp.dts              |  131 ++-
 arch/arm64/boot/dts/qcom/hawi.dtsi                 |   59 +
 drivers/gpu/drm/msm/Kconfig                        |   25 +
 drivers/gpu/drm/msm/Makefile                       |   21 +
 drivers/gpu/drm/msm/dcp/dcp_crtc.c                 |  747 ++++++++++++
 drivers/gpu/drm/msm/dcp/dcp_crtc.h                 |  104 ++
 drivers/gpu/drm/msm/dcp/dcp_dpu_kms.c              |  659 +++++++++++
 drivers/gpu/drm/msm/dcp/dcp_dpu_kms.h              |   51 +
 drivers/gpu/drm/msm/dcp/dcp_drv.c                  |  245 ++++
 drivers/gpu/drm/msm/dcp/dcp_drv.h                  |   50 +
 drivers/gpu/drm/msm/dcp/dcp_dsi_bridge.c           | 1140 ++++++++++++++++++
 drivers/gpu/drm/msm/dcp/dcp_dsi_bridge.h           |   69 ++
 drivers/gpu/drm/msm/dcp/dcp_dsi_panel.h            |   77 ++
 drivers/gpu/drm/msm/dcp/dcp_encoder.c              |   31 +
 drivers/gpu/drm/msm/dcp/dcp_encoder.h              |   16 +
 drivers/gpu/drm/msm/dcp/dcp_hfi.h                  |  273 +++++
 drivers/gpu/drm/msm/dcp/dcp_hfi_core.c             | 1219 ++++++++++++++++++++
 drivers/gpu/drm/msm/dcp/dcp_hfi_crtc.c             |  191 +++
 drivers/gpu/drm/msm/dcp/dcp_hfi_dsi.c              |  253 ++++
 drivers/gpu/drm/msm/dcp/dcp_hfi_dsi_panel.c        |  601 ++++++++++
 drivers/gpu/drm/msm/dcp/dcp_hfi_encoder.c          |   64 +
 drivers/gpu/drm/msm/dcp/dcp_hfi_kms.c              |  451 ++++++++
 drivers/gpu/drm/msm/dcp/dcp_hfi_plane.c            |   64 +
 drivers/gpu/drm/msm/dcp/dcp_hfi_priv.h             |   74 ++
 drivers/gpu/drm/msm/dcp/dcp_ipcc.c                 |  212 ++++
 drivers/gpu/drm/msm/dcp/dcp_ipcc.h                 |   56 +
 drivers/gpu/drm/msm/dcp/dcp_plane.c                | 1077 +++++++++++++++++
 drivers/gpu/drm/msm/dcp/dcp_plane.h                |   61 +
 drivers/gpu/drm/msm/dcp/dcp_virtio.c               |  302 +++++
 drivers/gpu/drm/msm/dcp/dcp_virtio.h               |   22 +
 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            |   79 ++
 drivers/gpu/drm/msm/dcp/hfi/hfi_utils.h            |   56 +
 drivers/gpu/drm/msm/msm_drv.c                      |    2 +
 drivers/gpu/drm/msm/msm_drv.h                      |    8 +
 drivers/gpu/drm/msm/msm_kms.c                      |    2 +-
 56 files changed, 11678 insertions(+), 2 deletions(-)
---
base-commit: 08d7e5910b32af25b08b1b16ff89883a38908c72
change-id: 20261014-jshekhar-drm-msm-dcp-v1-cb2b2ad9485b

Best regards,
--  
Jayant Shekhar <jayant.shekhar@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2026-10-21 12:05 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-15  7:38 [PATCH 00/13] drm/msm/dcp: Add Qualcomm DCP display support Jayant Shekhar
2026-10-15  7:38 ` [PATCH 01/13] dt-bindings: display: msm: Add Qualcomm DCP bindings Jayant Shekhar
2026-10-15 10:50   ` Krzysztof Kozlowski
2026-10-15 12:17   ` Dmitry Baryshkov
2026-10-21  8:45     ` Jayant Shekhar
2026-10-21 11:39       ` Jayant Shekhar
2026-10-15  7:38 ` [PATCH 02/13] drm/msm/dcp: Add HFI protocol definitions Jayant Shekhar
2026-10-15  7:38 ` [PATCH 03/13] drm/msm/dcp: Add HFI transport over VirtIO Jayant Shekhar
2026-10-15 12:36   ` Dmitry Baryshkov
2026-10-15  7:38 ` [PATCH 04/13] drm/msm/dcp: Add IPCC power notification Jayant Shekhar
2026-10-15 12:42   ` Dmitry Baryshkov
2026-10-15  7:38 ` [PATCH 05/13] drm/msm/dcp: Add HFI display command implementations Jayant Shekhar
2026-10-15  7:38 ` [PATCH 06/13] drm/msm/dcp: Add planes, CRTCs, and HFI event routing Jayant Shekhar
2026-10-15 13:18   ` Dmitry Baryshkov
2026-10-15  7:38 ` [PATCH 07/13] drm/msm/dcp: Add DCP encoder Jayant Shekhar
2026-10-15 12:44   ` Dmitry Baryshkov
2026-10-15  7:38 ` [PATCH 08/13] drm/msm/dcp: Add DSI bridge Jayant Shekhar
2026-10-15 12:56   ` Dmitry Baryshkov
2026-10-15  7:38 ` [PATCH 09/13] drm/msm/dcp: Register DCP display pipeline Jayant Shekhar
2026-10-21 12:05   ` Krzysztof Kozlowski
2026-10-21 12:05   ` Krzysztof Kozlowski
2026-10-15  7:38 ` [PATCH 10/13] drm/msm/dcp: Add VirtIO transport and platform driver Jayant Shekhar
2026-10-15 13:06   ` Dmitry Baryshkov
2026-10-15  7:38 ` [PATCH 11/13] drm/msm: Support KMS backends without a display IRQ Jayant Shekhar
2026-10-15  7:38 ` [PATCH 12/13] drm/msm: Register the DCP backend Jayant Shekhar
2026-10-15  7:38 ` [PATCH 13/13] arm64: dts: qcom: hawi: Add DCP support Jayant Shekhar
2026-10-15 10:52   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®