drm/msm: Add SDM845 DPU support
authorJeykumar Sankaran <jsanka@codeaurora.org>
Wed, 27 Jun 2018 19:26:09 +0000 (15:26 -0400)
committerSean Paul <seanpaul@chromium.org>
Thu, 26 Jul 2018 14:45:04 +0000 (10:45 -0400)
commit25fdd5933e4c0f5fe2ea5cd59994f8ac5fbe90ef
tree0da1ad5999deaee810a28b4bfa47d60d4822e00c
parent036bfeb33b89578ab924fa198213260659e08dc8
drm/msm: Add SDM845 DPU support

SDM845 SoC includes the Mobile Display Sub System (MDSS) which is a
top level wrapper consisting of Display Processing Unit (DPU) and
display peripheral modules such as Display Serial Interface (DSI)
and DisplayPort (DP).

MDSS functions essentially as a back-end composition engine. It blends
video and graphic images stored in the frame buffers and scans out the
composed image to a display sink (over DSI/DP).

The following diagram represents hardware blocks for a simple pipeline
(two planes are present on a given crtc which is connected to a DSI
connector):

       MDSS
      +---------------------------------+
      | +-----------------------------+ |
      | | DPU                         | |
      | |  +--------+  +--------+     | |
      | |  |  SSPP  |  |  SSPP  |     | |
      | |  +----+---+  +----+---+     | |
      | |       |           |         | |
      | |  +----v-----------v---+     | |
      | |  |  Layer Mixer (LM)  |     | |
      | |  +--------------------+     | |
      | |  +--------------------+     | |
      | |  |    PingPong (PP)   |     | |
      | |  +--------------------+     | |
      | |  +--------------------+     | |
      | |  |  INTERFACE (VIDEO) |     | |
      | |  +---+----------------+     | |
      | +------|----------------------+ |
      |        |                        |
      | +------|---------------------+  |
      | |      | DISPLAY PERIPHERALS |  |
      | |  +---v-+      +-----+      |  |
      | |  | DSI |      |  DP |      |  |
      | |  +-----+      +-----+      |  |
      | +----------------------------+  |
      +---------------------------------+

The number of DPU sub-blocks (i.e. SSPPs, LMs, PP blocks and INTFs)
depends on SoC capabilities.

Overview of DPU sub-blocks:
---------------------------
* Source Surface Processor (SSPP):
 Refers to any of hardware pipes like ViG, DMA etc. Only ViG pipes are
 capable of performing format conversion, scaling and quality improvement
 for source surfaces.

* Layer Mixer (LM):
 Blend source surfaces together (in requested zorder)

* PingPong (PP):
 This block controls frame done interrupt output, EOL and EOF generation,
 overflow/underflow control.

* Display interface (INTF):
 Timing generator and interface connecting the display peripherals.

DRM components mapping to DPU architecture:
------------------------------------------
PLANEs maps to SSPPs
CRTC maps to LMs
Encoder maps to PPs, INTFs

Data flow setup:
---------------
MDSS hardware can support various data flows (e.g.):
  - Dual pipe: Output from two LMs combined to single display.
  - Split display: Output from two LMs connected to two separate
                   interfaces.

The hardware capabilities determine the number of concurrent data paths
possible. Any control path (i.e. pipeline w/i DPU) can be routed to any
of the hardware data paths. A given control path can be triggered,
flushed and controlled independently.

Changes in v3:
- Move msm_media_info.h from uapi to dpu/ subdir
- Remove preclose callback dpu (it's handled in core)
- Fix kbuild warnings with parent_ops
- Remove unused functions from dpu_core_irq
- Rename mdss_phys to mdss
- Rename mdp_phys address space to mdp
- Drop _phys from vbif and regdma binding names

Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rajesh Yadav <ryadav@codeaurora.org>
Signed-off-by: Sravanthi Kollukuduru <skolluku@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
[robclark minor rebase]
Signed-off-by: Rob Clark <robdclark@gmail.com>
64 files changed:
drivers/gpu/drm/msm/Makefile
drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_dbg.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_dbg.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_formats.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_format.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_hwio.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_irq.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_irq.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_kms_utils.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_power_handle.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_power_handle.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.h [new file with mode: 0644]
drivers/gpu/drm/msm/disp/dpu1/msm_media_info.h [new file with mode: 0644]
drivers/gpu/drm/msm/msm_drv.c
drivers/gpu/drm/msm/msm_drv.h
drivers/gpu/drm/msm/msm_kms.h