All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 00/31] shared pch display pll rework
Date: Wed,  5 Jun 2013 13:34:02 +0200	[thread overview]
Message-ID: <1370432073-27634-1-git-send-email-daniel.vetter@ffwll.ch> (raw)

Hi all,

So originally I've only set out to create a more paranoid version of Jesse's hw
state reconstruction for the shared pch display plls. But then I've noticed that
the current code still smells broken (very first patch) and decided that we
should abstract the refcounting and hw state readout/compare logic from the
platform details a bit, so that we can reuse it on e.g. Haswell.

Since it's tricky code, it's split up in a lot of rather small patches itching
forward towards the goal. In the end we have
- new vfuncs to hide the platform details for ->enable/disable/mode_set of a
  shared display pll.
- hw state readout and compare for both the display plls alone and their
  use by display pipes.

Not yet done is:
- Moving the pll selection logic into the compute config stage of the modeset
  sequence. So atomic modeset still needs more work, we only notice the lack of
  a suitable dpll in the mode_set stage.
- Seperating the platform logic to pick a suitable from the get refcounting.
  This might be needed for Haswell (but I'm not sure yet how to best map the
  different Haswell plls).
- Convert Haswell ddi pll code over to this so that fastboot/atomic modeset can
  work there, too.

Series contains a few parts:

- patch 1: Fixup modeset on a shared dpll - we could change the dpll config if
  it's in use by another pipe.
- patches 2-7: Prep work, improved assert checks and moving the current state
  into the pipe_config (but not yet taking advantage of that at all).
- patches 8-13: Refactor the shared dpll code and add ->enable/disable hooks.
- patches 14-17: Basic (i.e. on/off) state readout for shared dplls + a bit of
  follow-up cleanup.
- patches 18-22: hw state readout for the full register state and follow-up
  cleanups taking advantage of that. By this point fastboot has enough state
  recovered to correctly take over pch dplls from the bios. While doing so I've
  also aligned the ilk+ pch pll enable sequenc with the i9xx dpll enable
  sequence - too much cargo cult seems to have added a bit of cruft on the ilk
  paths.
- patches 23-29: Since I've banged my head badly against the lvds enabling
  sequence while developing the above I've figured I'll clean up that mess (and
  bake the hard-learned lessons into code with asserts). It also fixes the pll
  enabling sequence on vlv/i9xx, so at the end we no longer call an ->enable
  function anywhere from ->mode_set!
- patches 30-31: Two afterthoughts on top ;-)

Comments, flames, testing and review highly welcome.

Cheers, Daniel

Daniel Vetter (31):
  drm/i915: fix up pch pll handling in ->mode_set
  drm/i915: conditionally disable pch resources in ilk_crtc_disable
  drm/i915: lock down pch pll accouting some more
  drm/i915: s/pch_pll/shared_dpll/
  drm/i915: switch crtc->shared_dpll from a pointer to an enum
  drm/i915: move shared_dpll into the pipe config
  drm/i915: refactor PCH_DPLL_SEL #defines
  drm/i915: hw state readout for shared pch plls
  drm/i915: consolidate ->num_shared_dplls assignement
  drm/i915: metadata for shared dplls
  drm/i915: scrap register address storage
  drm/i915: enable/disable hooks for shared dplls
  drm/i915: drop crtc checking from assert_shared_dpll
  drm/i915: display pll hw state readout and checking
  drm/i915: extract readout_hw_state from setup_hw_state
  drm/i915: split up intel_modeset_check_state
  drm/i915: WARN on lack of shared dpll
  drm/i915: hw state readout and cross-checking for shared dplls
  drm/i915: fix up pch pll enabling for pixel multipliers
  drm/i915: simplify the reduced clock handling for pch plls
  drm/i915: consolidate pch pll enable sequence
  drm/i915: use sw tracked state to select shared dplls
  drm/i915: duplicate intel_enable_pll into i9xx and vlv versions
  drm/i915: asserts for lvds pre_enable
  drm/i915: move encoder pre enable hooks togther on ilk+
  drm/i915: hw state readout for i9xx dplls
  drm/i915: move i9xx dpll enabling into crtc enable function
  drm/i915: s/pre_pll/pre/ on the lvds port enable function
  drm/i915: clean up vlv ->pre_pll_enable and pll enable sequence
  drm/i915: Fix up cpt pixel multiplier enable sequence
  drm/i915: clear DPLL reg when disabling i9xx dplls

 drivers/gpu/drm/i915/i915_drv.c      |   7 -
 drivers/gpu/drm/i915/i915_drv.h      |  42 +-
 drivers/gpu/drm/i915/i915_reg.h      |  18 +-
 drivers/gpu/drm/i915/i915_ums.c      |   2 +-
 drivers/gpu/drm/i915/intel_display.c | 853 ++++++++++++++++++++---------------
 drivers/gpu/drm/i915/intel_drv.h     |  24 +-
 drivers/gpu/drm/i915/intel_lvds.c    |  21 +-
 7 files changed, 573 insertions(+), 394 deletions(-)

-- 
1.7.11.7

             reply	other threads:[~2013-06-05 11:34 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05 11:34 Daniel Vetter [this message]
2013-06-05 11:34 ` [PATCH 01/31] drm/i915: fix up pch pll handling in ->mode_set Daniel Vetter
2013-06-05 11:34 ` [PATCH 02/31] drm/i915: conditionally disable pch resources in ilk_crtc_disable Daniel Vetter
2013-06-05 11:34 ` [PATCH 03/31] drm/i915: lock down pch pll accouting some more Daniel Vetter
2013-06-07 16:32   ` Ville Syrjälä
2013-06-07 20:03     ` Daniel Vetter
2013-06-07 20:46       ` Ville Syrjälä
2013-06-07 21:13         ` Daniel Vetter
2013-06-10 10:11           ` Ville Syrjälä
2013-06-10 14:34             ` Daniel Vetter
2013-06-10 14:47               ` Ville Syrjälä
2013-06-10 15:28                 ` [PATCH] " Daniel Vetter
2013-06-07 21:09     ` Daniel Vetter
2013-06-05 11:34 ` [PATCH 04/31] drm/i915: s/pch_pll/shared_dpll/ Daniel Vetter
2013-06-05 11:34 ` [PATCH 05/31] drm/i915: switch crtc->shared_dpll from a pointer to an enum Daniel Vetter
2013-06-07 16:48   ` Ville Syrjälä
2013-06-07 21:10     ` [PATCH] " Daniel Vetter
2013-06-05 11:34 ` [PATCH 06/31] drm/i915: move shared_dpll into the pipe config Daniel Vetter
2013-06-07 17:03   ` Ville Syrjälä
2013-06-07 21:10     ` [PATCH] " Daniel Vetter
2013-06-05 11:34 ` [PATCH 07/31] drm/i915: refactor PCH_DPLL_SEL #defines Daniel Vetter
2013-06-05 11:34 ` [PATCH 08/31] drm/i915: hw state readout for shared pch plls Daniel Vetter
2013-06-07 17:23   ` Ville Syrjälä
2013-06-07 20:11     ` Daniel Vetter
2013-06-07 21:11     ` [PATCH] " Daniel Vetter
2013-06-05 11:34 ` [PATCH 09/31] drm/i915: consolidate ->num_shared_dplls assignement Daniel Vetter
2013-06-05 11:34 ` [PATCH 10/31] drm/i915: metadata for shared dplls Daniel Vetter
2013-06-05 11:34 ` [PATCH 11/31] drm/i915: scrap register address storage Daniel Vetter
2013-06-05 11:34 ` [PATCH 12/31] drm/i915: enable/disable hooks for shared dplls Daniel Vetter
2013-06-05 11:34 ` [PATCH 13/31] drm/i915: drop crtc checking from assert_shared_dpll Daniel Vetter
2013-06-05 11:34 ` [PATCH 14/31] drm/i915: display pll hw state readout and checking Daniel Vetter
2013-06-12 13:31   ` Damien Lespiau
2013-06-12 13:39     ` Ville Syrjälä
2013-06-12 13:49       ` Damien Lespiau
2013-06-05 11:34 ` [PATCH 15/31] drm/i915: extract readout_hw_state from setup_hw_state Daniel Vetter
2013-06-12 13:32   ` Damien Lespiau
2013-06-12 14:26   ` Daniel Vetter
2013-06-05 11:34 ` [PATCH 16/31] drm/i915: split up intel_modeset_check_state Daniel Vetter
2013-06-12 13:33   ` Damien Lespiau
2013-06-05 11:34 ` [PATCH 17/31] drm/i915: WARN on lack of shared dpll Daniel Vetter
2013-06-12 13:38   ` Damien Lespiau
2013-06-05 11:34 ` [PATCH 18/31] drm/i915: hw state readout and cross-checking for shared dplls Daniel Vetter
2013-06-12 15:04   ` Damien Lespiau
2013-06-05 11:34 ` [PATCH 19/31] drm/i915: fix up pch pll enabling for pixel multipliers Daniel Vetter
2013-06-12 15:12   ` Damien Lespiau
2013-06-12 19:34     ` Daniel Vetter
2013-06-05 11:34 ` [PATCH 20/31] drm/i915: simplify the reduced clock handling for pch plls Daniel Vetter
2013-06-13 11:26   ` Damien Lespiau
2013-06-13 11:35     ` Daniel Vetter
2013-06-13 12:32       ` Damien Lespiau
2013-06-13 14:33         ` Daniel Vetter
2013-06-05 11:34 ` [PATCH 21/31] drm/i915: consolidate pch pll enable sequence Daniel Vetter
2013-06-24 14:30   ` Damien Lespiau
2013-06-05 11:34 ` [PATCH 22/31] drm/i915: use sw tracked state to select shared dplls Daniel Vetter
2013-06-12 15:20   ` Damien Lespiau
2013-06-05 11:34 ` [PATCH 23/31] drm/i915: duplicate intel_enable_pll into i9xx and vlv versions Daniel Vetter
2013-06-05 15:12   ` Jani Nikula
2013-06-05 22:52     ` [PATCH] " Daniel Vetter
2013-06-05 11:34 ` [PATCH 24/31] drm/i915: asserts for lvds pre_enable Daniel Vetter
2013-06-13 20:26   ` Imre Deak
2013-06-13 20:46     ` Daniel Vetter
2013-06-14 10:45       ` Imre Deak
2013-06-16 19:42     ` [PATCH] " Daniel Vetter
2013-06-05 11:34 ` [PATCH 25/31] drm/i915: move encoder pre enable hooks togther on ilk+ Daniel Vetter
2013-06-05 11:34 ` [PATCH 26/31] drm/i915: hw state readout for i9xx dplls Daniel Vetter
2013-06-05 11:34 ` [PATCH 27/31] drm/i915: move i9xx dpll enabling into crtc enable function Daniel Vetter
2013-06-05 15:13   ` Jani Nikula
2013-06-06  8:20     ` [PATCH] " Daniel Vetter
2013-06-14 16:02   ` [PATCH 27/31] " Imre Deak
2013-06-16 19:15     ` Daniel Vetter
2013-06-16 19:24     ` [PATCH] " Daniel Vetter
2013-06-05 11:34 ` [PATCH 28/31] drm/i915: s/pre_pll/pre/ on the lvds port " Daniel Vetter
2013-06-15  8:32   ` Imre Deak
2013-06-26 10:02     ` Daniel Vetter
2013-06-05 11:34 ` [PATCH 29/31] drm/i915: clean up vlv ->pre_pll_enable and pll enable sequence Daniel Vetter
2013-06-06  8:22   ` [PATCH] " Daniel Vetter
2013-07-11 14:11     ` Imre Deak
2013-07-11 20:13       ` Daniel Vetter
2013-07-12 16:27       ` Daniel Vetter
2013-06-05 11:34 ` [PATCH 30/31] drm/i915: Fix up cpt pixel multiplier " Daniel Vetter
2013-06-05 11:34 ` [PATCH 31/31] drm/i915: clear DPLL reg when disabling i9xx dplls Daniel Vetter
2013-06-07 17:46 ` [PATCH 00/31] shared pch display pll rework Ville Syrjälä
2013-06-10 15:57   ` Ville Syrjälä
2013-06-10 18:16     ` Daniel Vetter

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=1370432073-27634-1-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.