[PATCH 00/22] drm/msm: Enable DT support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patchset adds the last bits needed for getting the MSM display
bindings in correct shape, and as an example, adds display support for
MSM8916.

One problem with the MDP5 driver was that device hierarchy didn't match
with the hardware. All MDP5 based display blocks contain a top-level
MDSS wrapper hardware that manages IRQs, power and some clocks for
the sub-blocks (MDP5, DSI, HDMI, eDP etc) within it. The driver stuffs
this functionality within the MDP5 driver itself, which results in
probably not the cleanest design, and forces us to repeat some
resources (like, power domain, some top level clocks) across all the
sub-blocks. This is fixed by creating separate MDP5 and MDSS platform
devices, and making each piece manage its own resources. MDP4 still
continues to have the flat device hierarchy.

The second problem was the non-standard connector and gpu DT properites.
The former was needed to bind all the external components (DSI, HDMI etc)
before we started with intializing modeset. This is fixed by representing
the MDP interface outputs as ports, and linking them to the ports of the
encoders they are connected to. The 'gpu' property is removed in a
hack-ish way. The driver contains a list of all the compatible strings
for gpus, and searches the entire OF firmware for a matching node. Once
we know what's the right way to link the gpu and display nodes together
(if needed at all), we can add the required binding.

The device hierarchy for MDP5 platforms fits well for runtime PM
adaptation too. Although, for it to work correctly, all the encoder
drivers need to adapt to runtime PM too. With that in place, we still
hit issues in some usecases where the entire register context isn't
correctly restored during resume. It finally boils down to the helpers
we use for implementing atomic_commit. This will take some more time
to solve. For now, we just enable runtime PM early and leave it enabled.
This is necessary for MDP5 based SoCs since Qcom GDSCs are tied to power
domains. This will be fixed once we get all paths working properly with
runtime PM.	

This patchset will break bisectability, in the sense that both the
downstream and proposed DT bindings won't work if we apply only a partial
set of patches. With this series applied, only the proposed bindings will
work. Downstream dtsi files from older kernels will have to be adapted
slightly to get it running with these changes.

This series depends on two patchsets posted before:

drm/msm DT prep work:
http://www.spinics.net/lists/dri-devel/msg110197.html

ADV7533 support+DT bindings:
http://www.spinics.net/lists/linux-arm-msm/msg21085.html

Archit Taneja (22):
  drm/msm: Drop the id_table in platform_driver
  drm/msm: Remove unused fields
  drm/msm: Get irq number within kms driver itself
  drm/msm/mdp5: Add MDSS top level driver
  drm/msm/mdp5: Create a separate MDP5 device
  drm/msm/mdp5: Prepare new kms_init funcs
  drm/msm/mdp5: Use the new hierarchy and drop old irq management
  drm/msm/mdp5: Remove old kms init/destroy funcs
  drm/msm/mdp5: Use updated MDP5 register names
  drm/msm/mdp5: Update the register offsets of MDP5 sub-blocks
  drm/msm: Call pm_runtime_enable/disable for newly created devices
  drm/msm/mdp5: Add missing mdp5_enable/disable calls
  drm/msm: Create separate funcs for adding display/gpu components
  drm/msm: Add display components by parsing MDP ports
  drm/msm: Add components for MDP5
  drm/msm: Drop the gpu binding
  drm/msm/mdp5: Update compatible strings for MDSS/MDP5
  dt-bindings: msm/mdp4: Create a separate binding doc for MDP4
  dt-bindings: msm/mdp5: Add MDP5 display bindings
  dt-bindings: msm/mdp: Provide details on MDP interface ports
  arm64: dts: msm8916: Add display support
  arm64: dts: apq8016-sbc: Add HDMI display support

 .../devicetree/bindings/display/msm/mdp.txt        |  57 ----
 .../devicetree/bindings/display/msm/mdp4.txt       | 112 ++++++++
 .../devicetree/bindings/display/msm/mdp5.txt       | 160 +++++++++++
 arch/arm64/boot/dts/qcom/apq8016-sbc-soc-pins.dtsi |  48 ++++
 arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi          |  82 ++++++
 arch/arm64/boot/dts/qcom/msm8916.dtsi              | 120 ++++++++
 drivers/gpu/drm/msm/Makefile                       |   1 +
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c            |  19 +-
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h            |   2 +
 drivers/gpu/drm/msm/mdp/mdp5/mdp5.xml.h            | 203 ++++++-------
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c            | 113 ++++----
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c    |  14 +-
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_ctl.c            |  26 +-
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c        |  10 +-
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c            | 125 +-------
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c            | 320 +++++++++++++--------
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h            |  15 +-
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_mdss.c           | 235 +++++++++++++++
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_smp.c            |  22 +-
 drivers/gpu/drm/msm/msm_drv.c                      | 201 ++++++++++---
 drivers/gpu/drm/msm/msm_drv.h                      |   7 +
 drivers/gpu/drm/msm/msm_kms.h                      |   8 +-
 22 files changed, 1361 insertions(+), 539 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/msm/mdp.txt
 create mode 100644 Documentation/devicetree/bindings/display/msm/mdp4.txt
 create mode 100644 Documentation/devicetree/bindings/display/msm/mdp5.txt
 create mode 100644 drivers/gpu/drm/msm/mdp/mdp5/mdp5_mdss.c

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux