Devicetree
 help / color / mirror / Atom feed
* [PATCH v3 00/21] drm/msm/dcp: Add Qualcomm DCP display support
@ 2026-11-26  6:29 Jayant Shekhar
  2026-11-26  6:29 ` [PATCH v3 01/21] dt-bindings: display: msm: Add Qualcomm DCP Jayant Shekhar
                   ` (20 more replies)
  0 siblings, 21 replies; 39+ messages in thread
From: Jayant Shekhar @ 2026-11-26  6:29 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, Flemin Jose, Mahadevan P
  Cc: Jayant Shekhar, linux-arm-msm, dri-devel, freedreno, devicetree,
	linux-kernel, linux-media, linaro-mm-sig, Dmitry Baryshkov

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@oss.qualcomm.com/

- 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@oss.qualcomm.com>
---
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@oss.qualcomm.com
- Link to v2: https://lore.kernel.org/dri-devel/20261026-jshekhar-dcp-hlos-v2-0-7cf014efdee1@oss.qualcomm.com/

To: Rob Clark <robin.clark@oss.qualcomm.com>
To: Dmitry Baryshkov <lumag@kernel.org>
To: Abhinav Kumar <abhinav.kumar@linux.dev>
To: Jessica Zhang <jesszhan0024@gmail.com>
To: Sean Paul <sean@poorly.run>
To: Marijn Suijten <marijn.suijten@somainline.org>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Maxime Ripard <mripard@kernel.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
To: David Airlie <airlied@gmail.com>
To: Simona Vetter <simona@ffwll.ch>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Jayant Shekhar <jayant.shekhar@oss.qualcomm.com>
To: Sumit Semwal <sumit.semwal@linaro.org>
To: Christian König <christian.koenig@amd.com>
To: Philipp Stanner <phasta@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konradybcio@kernel.org>
To: Abel Vesa <abelvesa@kernel.org>
To: Flemin Jose <flemin.jose@oss.qualcomm.com>
To: Mahadevan P <mahap@oss.qualcomm.com>
Cc: linux-arm-msm@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org

---
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@oss.qualcomm.com>
prerequisite-patch-id: 43f30570f31419a014962e6012f98f5b341d46bc
prerequisite-patch-id: 08ffd8da137637eda4fa6d64a4a7fc5a24ea80a6
prerequisite-patch-id: eca5d1310fd57c909cedf1668e075acb966db4ba

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


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

end of thread, other threads:[~2026-11-26  7:10 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26  6:29 [PATCH v3 00/21] drm/msm/dcp: Add Qualcomm DCP display support Jayant Shekhar
2026-11-26  6:29 ` [PATCH v3 01/21] dt-bindings: display: msm: Add Qualcomm DCP Jayant Shekhar
2026-11-26  6:44   ` sashiko-bot
2026-11-26  6:29 ` [PATCH v3 02/21] drm/msm/dcp: Add HFI packet helpers Jayant Shekhar
2026-11-26  6:52   ` sashiko-bot
2026-11-26  6:29 ` [PATCH v3 03/21] drm/msm/dcp: Add HFI device definitions Jayant Shekhar
2026-11-26  6:29 ` [PATCH v3 04/21] drm/msm/dcp: Add HFI display definitions Jayant Shekhar
2026-11-26  6:29 ` [PATCH v3 05/21] drm/msm/dcp: Add HFI panel definitions Jayant Shekhar
2026-11-26  6:40   ` sashiko-bot
2026-11-26  6:29 ` [PATCH v3 06/21] drm/msm/dcp: Add HFI VirtIO transport Jayant Shekhar
2026-11-26  6:51   ` sashiko-bot
2026-11-26  6:29 ` [PATCH v3 07/21] drm/msm/dcp: Handle asynchronous HFI responses Jayant Shekhar
2026-11-26  6:49   ` sashiko-bot
2026-11-26  6:29 ` [PATCH v3 08/21] drm/msm/dcp: Add generic HFI display commands Jayant Shekhar
2026-11-26  6:45   ` sashiko-bot
2026-11-26  6:29 ` [PATCH v3 09/21] drm/msm/dcp: Add HFI DSI and panel commands Jayant Shekhar
2026-11-26  6:54   ` sashiko-bot
2026-11-26  6:29 ` [PATCH v3 10/21] drm/msm/dcp: Add DCP CRTCs Jayant Shekhar
2026-11-26  6:58   ` sashiko-bot
2026-11-26  6:29 ` [PATCH v3 11/21] drm/msm/dcp: Add DCP planes Jayant Shekhar
2026-11-26  7:02   ` sashiko-bot
2026-11-26  6:29 ` [PATCH v3 12/21] drm/msm/dcp: Route HFI display events Jayant Shekhar
2026-11-26  6:50   ` sashiko-bot
2026-11-26  6:29 ` [PATCH v3 13/21] drm/msm/dcp: Add DCP encoder Jayant Shekhar
2026-11-26  6:42   ` sashiko-bot
2026-11-26  6:29 ` [PATCH v3 14/21] drm/msm/dcp: Add DCP DSI host and panel support Jayant Shekhar
2026-11-26  7:06   ` sashiko-bot
2026-11-26  6:29 ` [PATCH v3 15/21] drm/msm/dcp: Integrate the DSI bridge with KMS Jayant Shekhar
2026-11-26  6:53   ` sashiko-bot
2026-11-26  6:29 ` [PATCH v3 16/21] drm/msm/dcp: Register DCP display pipeline Jayant Shekhar
2026-11-26  7:03   ` sashiko-bot
2026-11-26  6:29 ` [PATCH v3 17/21] drm/msm: Export GPU component matching helper Jayant Shekhar
2026-11-26  6:29 ` [PATCH v3 18/21] drm/msm/dcp: Add DCP VirtIO driver Jayant Shekhar
2026-11-26  7:07   ` sashiko-bot
2026-11-26  6:29 ` [PATCH v3 19/21] drm/msm: Support KMS backends without a display IRQ Jayant Shekhar
2026-11-26  6:29 ` [PATCH v3 20/21] drm/msm: Register the DCP backend Jayant Shekhar
2026-11-26  7:00   ` sashiko-bot
2026-11-26  6:29 ` [PATCH v3 21/21] arm64: dts: qcom: hawi: Add DCP support Jayant Shekhar
2026-11-26  7:10   ` sashiko-bot

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