linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Archit Taneja <architt@codeaurora.org>
To: robdclark@gmail.com
Cc: robh@kernel.org, linux-arm-msm@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	Archit Taneja <architt@codeaurora.org>
Subject: [PATCH 00/22] drm/msm: Enable DT support
Date: Thu, 16 Jun 2016 17:06:25 +0530	[thread overview]
Message-ID: <1466077007-26792-1-git-send-email-architt@codeaurora.org> (raw)

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

             reply	other threads:[~2016-06-16 11:36 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 11:36 Archit Taneja [this message]
2016-06-16 11:36 ` [PATCH 01/22] drm/msm: Drop the id_table in platform_driver Archit Taneja
2016-06-16 11:36 ` [PATCH 02/22] drm/msm: Remove unused fields Archit Taneja
2016-06-16 11:36 ` [PATCH 03/22] drm/msm: Get irq number within kms driver itself Archit Taneja
2016-06-16 11:36 ` [PATCH 04/22] drm/msm/mdp5: Add MDSS top level driver Archit Taneja
2016-06-16 11:36 ` [PATCH 05/22] drm/msm/mdp5: Create a separate MDP5 device Archit Taneja
2016-06-16 11:36 ` [PATCH 06/22] drm/msm/mdp5: Prepare new kms_init funcs Archit Taneja
2016-06-16 11:36 ` [PATCH 07/22] drm/msm/mdp5: Use the new hierarchy and drop old irq management Archit Taneja
2016-06-16 11:36 ` [PATCH 08/22] drm/msm/mdp5: Remove old kms init/destroy funcs Archit Taneja
2016-06-16 11:36 ` [PATCH 09/22] drm/msm/mdp5: Use updated MDP5 register names Archit Taneja
2016-06-16 11:36 ` [PATCH 10/22] drm/msm/mdp5: Update the register offsets of MDP5 sub-blocks Archit Taneja
2016-06-16 11:36 ` [PATCH 11/22] drm/msm: Call pm_runtime_enable/disable for newly created devices Archit Taneja
2016-06-16 11:36 ` [PATCH 12/22] drm/msm/mdp5: Add missing mdp5_enable/disable calls Archit Taneja
2016-06-16 11:36 ` [PATCH 13/22] drm/msm: Create separate funcs for adding display/gpu components Archit Taneja
2016-06-16 11:36 ` [PATCH 14/22] drm/msm: Add display components by parsing MDP ports Archit Taneja
2016-06-16 11:36 ` [PATCH 15/22] drm/msm: Add components for MDP5 Archit Taneja
2016-06-16 11:36 ` [PATCH 16/22] drm/msm: Drop the gpu binding Archit Taneja
2016-06-16 11:36 ` [PATCH 17/22] drm/msm/mdp5: Update compatible strings for MDSS/MDP5 Archit Taneja
2016-06-16 11:36 ` [PATCH 18/22] dt-bindings: msm/mdp4: Create a separate binding doc for MDP4 Archit Taneja
2016-06-20 12:53   ` Rob Herring
2016-06-16 11:36 ` [PATCH 19/22] dt-bindings: msm/mdp5: Add MDP5 display bindings Archit Taneja
2016-06-20 12:57   ` Rob Herring
2016-06-16 11:36 ` [PATCH 20/22] dt-bindings: msm/mdp: Provide details on MDP interface ports Archit Taneja
2016-06-20 13:01   ` Rob Herring
2016-06-16 11:36 ` [PATCH 21/22] arm64: dts: msm8916: Add display support Archit Taneja
2016-06-20 13:04   ` Rob Herring
2016-06-20 13:47     ` Archit Taneja
2016-06-16 11:36 ` [PATCH 22/22] arm64: dts: apq8016-sbc: Add HDMI " Archit Taneja
2016-06-23 14:13 ` [PATCH v2 00/25] drm/msm: Enable DT support Archit Taneja
2016-06-23 14:13   ` [PATCH v2 01/25] drm/msm: Drop the id_table in platform_driver Archit Taneja
2016-06-23 14:13   ` [PATCH v2 02/25] drm/msm: Remove unused fields Archit Taneja
2016-06-23 14:13   ` [PATCH v2 03/25] drm/msm: Get irq number within kms driver itself Archit Taneja
2016-06-23 14:13   ` [PATCH v2 04/25] drm/msm/mdp5: Add MDSS top level driver Archit Taneja
2016-06-23 14:13   ` [PATCH v2 05/25] drm/msm/mdp5: Create a separate MDP5 device Archit Taneja
2016-06-23 14:13   ` [PATCH v2 06/25] drm/msm/mdp5: Prepare new kms_init funcs Archit Taneja
2016-06-23 14:13   ` [PATCH v2 07/25] drm/msm/mdp5: Use the new hierarchy and drop old irq management Archit Taneja
2016-06-23 14:13   ` [PATCH v2 08/25] drm/msm/mdp5: Remove old kms init/destroy funcs Archit Taneja
2016-06-23 14:13   ` [PATCH v2 09/25] drm/msm/mdp5: Use updated MDP5 register names Archit Taneja
2016-06-23 14:13   ` [PATCH v2 10/25] drm/msm/mdp5: Update the register offsets of MDP5 sub-blocks Archit Taneja
2016-06-23 14:13   ` [PATCH v2 11/25] drm/msm: Call pm_runtime_enable/disable for newly created devices Archit Taneja
2016-06-23 14:13   ` [PATCH v2 12/25] drm/msm/mdp5: Add missing mdp5_enable/disable calls Archit Taneja
2016-06-23 14:13   ` [PATCH v2 13/25] drm/msm: Create separate funcs for adding display/gpu components Archit Taneja
2016-06-23 14:13   ` [PATCH v2 14/25] drm/msm: Add display components by parsing MDP ports Archit Taneja
2016-06-23 14:13   ` [PATCH v2 15/25] drm/msm: Add components for MDP5 Archit Taneja
2016-06-23 14:13   ` [PATCH v2 16/25] drm/msm: Drop the gpu binding Archit Taneja
2016-06-23 14:13   ` [PATCH v2 17/25] drm/msm/mdp5: Update compatible strings for MDSS/MDP5 Archit Taneja
2016-07-11  8:39     ` Matthias Brugger
2016-07-11 11:33       ` Rob Clark
2016-06-23 14:13   ` [PATCH v2 18/25] drm/msm/dsi: Don't get DSI index from DT Archit Taneja
2016-06-23 14:45     ` Rob Herring
2016-06-24  5:00       ` Archit Taneja
2016-06-23 14:13   ` [PATCH v2 19/25] dt-bindings: msm/mdp4: Create a separate binding doc for MDP4 Archit Taneja
2016-06-23 14:13   ` [PATCH v2 20/25] dt-bindings: msm/mdp5: Add MDP5 display bindings Archit Taneja
2016-06-23 14:13   ` [PATCH v2 21/25] dt-bindings: msm/mdp: Provide details on MDP interface ports Archit Taneja
2016-06-23 14:13   ` [PATCH v2 22/25] dt-bindings: msm/dsi: Remove unused properties Archit Taneja
2016-08-26  4:55     ` Archit Taneja
2016-06-23 14:13   ` [PATCH v2 23/25] dt-bindings: display/msm: Remove power domain property from encoder nodes Archit Taneja
2016-08-26  4:55     ` Archit Taneja
2016-06-23 14:13   ` [PATCH v2 24/25] arm64: dts: msm8916: Add display support Archit Taneja
2016-08-26  4:57     ` Archit Taneja
2016-08-26 12:12       ` Rob Herring
     [not found]     ` <1466691210-22779-25-git-send-email-architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-08-26  5:33       ` Andy Gross
     [not found]   ` <1466691210-22779-1-git-send-email-architt-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-06-23 14:13     ` [PATCH v2 25/25] arm64: dts: apq8016-sbc: Add HDMI " Archit Taneja
2016-08-26  4:58       ` Archit Taneja
2016-08-26  5:34       ` Andy Gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466077007-26792-1-git-send-email-architt@codeaurora.org \
    --to=architt@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).