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/43] [RFC] modeset rework, part 1
Date: Tue, 3 Jul 2012 11:27:52 +0200 [thread overview]
Message-ID: <1341307715-3886-1-git-send-email-daniel.vetter@ffwll.ch> (raw)
Hi all,
This patch bomb is just the prep work for the actual rework ;-)
The goal of this little adventure is to move away from the crtc helper code,
which has the fundamental assumption that encoders and crtc can be
enabled/disabled in any order, as long as we take care of depencies.
Our hw works differently. We already have tons of ugly cases where crtc code
enable encoder hw (or encoder->mode_set enables stuff that should only be
enabled in enocder->commit) to work around these issues. But on the disable side
we can't pull off similar tricks - there we actually need to rework the modeset
sequence that controls all this.
Quick summary of the changes in here - the patches that actually introduce a new
concept all have rather extensive commit messages to explain things:
- Add new encoder->enable/disable functions which are directly called from the
crtc->enable/disable function. This ensures that the encoder's can be
enabled/disabled at a very specific in the modeset sequence, controlled by our
platform specific code.
- Rework the dpms code - our code has mostly 1:1 connector:encoder mappings and
does support cloning on on a few encoders, so we can simplify things quite a
bit. Also only ever disable/enable the entire output pipeline - this ensures
that we obey the right sequence of enabling/disabling things. For cloneable
encoders this requires a bit of special handling to ensure that outputs can
still be disabled individually, but it simplifies the common case quite a bit.
- Add infrastructure to read out the current hw state. No amount of careful
ordering will help us if we brick the hw on the first modesetup. Which could
happen if we just randomly disable things, oblivious to the state set up by
the bios. Hence we need to be able to read that out. As a benefit, we grow a
few generic functions useful to cross-check our modeset code with actual hw
state.
- A few little changes/cleanups in a few encoders to make the above less
onerous.
Things that are still needed:
- Reworking the modeset code - the current copy&pasted code still pretty much
works like the crtc helper and doesn't disable things correctly yet.
- Once the above is in place, add new hooks to enable special connectors at the
right place. I'm thinking of encoder->pre_enable and encoder->post_disable,
which would each run after/before the plane/pipe/plls.
- Actually fix the cpu edp bugs (and port the hsw dp code) with the new hooks.
And further out, i.e. auxiliary benefits:
- Fix up our confusion in the resume path - we enable a few encoders by accident
when restoring registers.
- Clean things up by moving a few of the existing hacks around, e.g. the edp pll
enabling or the lvds/pll enabling.
- fastboot - the hw state readout code is neat prep work for that, the patch
itself lists some of the missing bits.
- Fixing all the bugs turned up by the more stringent cross-checking the new
code allows - the last patch in this series gives a glimpse, but I plan to add
much more after the modeset sequence has saner semantics.
Patch series lightly tested, atm I'm beating on it with my machines. Due to lack
of hw, I'm looking for people with TV out and dvo encoders ...
Comments, flames, ideas and rants highly welcome. I hope that I can send out and
RFC with the new modeset code in a few days at most.
Cheers, Daniel
Daniel Vetter (43):
drm/i915: introduce for_each_encoder_on_crtc
drm/i915: add crtc->enable/disable vfuncs insted of dpms
drm/i915: rip out crtc prepare/commit indirection
drm/i915: add direct encoder disable/enable infrastructure
drm/i915: add missing gen2 pipe A quirk entries
drm/i915: rip out the overlay pipe A workaround
drm/i915: prepare load-detect pipe code for dpms changes
drm/i915/hdmi: convert to encoder->disable/enable
drm/i915/tv: convert to encoder enable/disable
drm/i915/lvds: ditch ->prepare special case
drm/i915/lvds: convert to encoder disable/enable
drm/i915/dp: convert to encoder disable/enable
drm/i915: create VLV_DSIPLAY_BASE #define
drm/i915: group ADPA #defines together
drm/i915: add inte_crt->adpa_reg
drm/i915/crt: convert to encoder disable/enable
drm/i915/sdvo: convert to encoder disabl/enable
drm/i915: simplify dvo dpms interface
drm/i915: simplify possible_clones computation
drm/i915: add port parameter to intel_hdmi_init
drm/i915: convert dpms functions of dvo/sdvo/crt
drm/i915: rip out encoder->disable/enable checks
drm/i915: clean up encoder_prepare/commit
drm/fb helper: don't call drm_crtc_helper_set_config
drm: remove the list_head from drm_mode_set
drm/i915: copy&paste drm_crtc_helper_set_config
drm/i915: call set_base directly
drm/i915: inline intel_best_encoder
drm/i915: copy&paste drm_crtc_helper_set_mode
drm/i915: simplify intel_crtc_prepare_encoders
drm/i915: rip out encoder->prepare/commit
drm/i915: call crtc functions directly
drm/i915: WARN when trying to enabled an unused crtc
drm/i915: Add interfaces to read out encoder/connector hw state
drm/i915/dp: implement get_hw_state
drm/i915/hdmi: implement get_hw_state
drm/i915/tv: implement get_hw_state
drm/i915/lvds: implement get_hw_state
drm/i915/crt: implement get_hw_state
drm/i915/sdvo: implement get_hw_state
drm/i915/dvo: implement get_hw_state
drm/i915: read out the modeset hw state at load and resume time
drm/i915: check connector hw/sw state
drivers/gpu/drm/drm_fb_helper.c | 2 +-
drivers/gpu/drm/i915/dvo.h | 15 +-
drivers/gpu/drm/i915/dvo_ch7017.c | 21 +-
drivers/gpu/drm/i915/dvo_ch7xxx.c | 17 +-
drivers/gpu/drm/i915/dvo_ivch.c | 23 +-
drivers/gpu/drm/i915/dvo_sil164.c | 20 +-
drivers/gpu/drm/i915/dvo_tfp410.c | 18 +-
drivers/gpu/drm/i915/i915_drv.c | 3 +-
drivers/gpu/drm/i915/i915_drv.h | 8 +-
drivers/gpu/drm/i915/i915_reg.h | 52 +-
drivers/gpu/drm/i915/intel_crt.c | 157 ++++--
drivers/gpu/drm/i915/intel_ddi.c | 59 ++-
drivers/gpu/drm/i915/intel_display.c | 1006 ++++++++++++++++++++++++++--------
drivers/gpu/drm/i915/intel_dp.c | 178 ++++---
drivers/gpu/drm/i915/intel_drv.h | 64 ++-
drivers/gpu/drm/i915/intel_dvo.c | 105 +++-
drivers/gpu/drm/i915/intel_hdmi.c | 203 ++++---
drivers/gpu/drm/i915/intel_lvds.c | 91 ++--
drivers/gpu/drm/i915/intel_overlay.c | 58 +--
drivers/gpu/drm/i915/intel_sdvo.c | 178 +++++--
drivers/gpu/drm/i915/intel_tv.c | 56 ++-
include/drm/drm_crtc.h | 2 -
22 files changed, 1645 insertions(+), 691 deletions(-)
--
1.7.7.6
next reply other threads:[~2012-07-03 10:34 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 9:27 Daniel Vetter [this message]
2012-07-03 9:27 ` [PATCH 01/43] drm/i915: introduce for_each_encoder_on_crtc Daniel Vetter
2012-07-04 21:29 ` Paulo Zanoni
2012-07-05 7:50 ` [PATCH] " Daniel Vetter
2012-07-05 13:08 ` Daniel Vetter
2012-07-03 9:27 ` [PATCH 02/43] drm/i915: add crtc->enable/disable vfuncs insted of dpms Daniel Vetter
2012-07-03 9:27 ` [PATCH 03/43] drm/i915: rip out crtc prepare/commit indirection Daniel Vetter
2012-07-03 9:27 ` [PATCH 04/43] drm/i915: add direct encoder disable/enable infrastructure Daniel Vetter
2012-07-03 9:27 ` [PATCH 05/43] drm/i915: add missing gen2 pipe A quirk entries Daniel Vetter
2012-07-03 9:27 ` [PATCH 06/43] drm/i915: rip out the overlay pipe A workaround Daniel Vetter
2012-07-03 9:27 ` [PATCH 07/43] drm/i915: prepare load-detect pipe code for dpms changes Daniel Vetter
2012-07-03 9:28 ` [PATCH 08/43] drm/i915/hdmi: convert to encoder->disable/enable Daniel Vetter
2012-07-26 17:12 ` Paulo Zanoni
2012-07-03 9:28 ` [PATCH 09/43] drm/i915/tv: convert to encoder enable/disable Daniel Vetter
2012-07-03 9:28 ` [PATCH 10/43] drm/i915/lvds: ditch ->prepare special case Daniel Vetter
2012-07-03 9:28 ` [PATCH 11/43] drm/i915/lvds: convert to encoder disable/enable Daniel Vetter
2012-07-03 9:28 ` [PATCH 12/43] drm/i915/dp: " Daniel Vetter
2012-07-03 9:28 ` [PATCH 13/43] drm/i915: create VLV_DSIPLAY_BASE #define Daniel Vetter
2012-07-03 9:28 ` [PATCH 14/43] drm/i915: group ADPA #defines together Daniel Vetter
2012-07-03 9:28 ` [PATCH 15/43] drm/i915: add inte_crt->adpa_reg Daniel Vetter
2012-07-03 9:28 ` [PATCH 16/43] drm/i915/crt: convert to encoder disable/enable Daniel Vetter
2012-07-03 9:28 ` [PATCH 17/43] drm/i915/sdvo: convert to encoder disabl/enable Daniel Vetter
2012-07-03 9:28 ` [PATCH 18/43] drm/i915: simplify dvo dpms interface Daniel Vetter
2012-07-03 9:28 ` [PATCH 19/43] drm/i915: simplify possible_clones computation Daniel Vetter
2012-07-03 9:28 ` [PATCH 20/43] drm/i915: add port parameter to intel_hdmi_init Daniel Vetter
2012-07-03 9:28 ` [PATCH 21/43] drm/i915: convert dpms functions of dvo/sdvo/crt Daniel Vetter
2012-07-03 9:28 ` [PATCH 22/43] drm/i915: rip out encoder->disable/enable checks Daniel Vetter
2012-07-03 9:28 ` [PATCH 23/43] drm/i915: clean up encoder_prepare/commit Daniel Vetter
2012-07-03 9:28 ` [PATCH 24/43] drm/fb helper: don't call drm_crtc_helper_set_config Daniel Vetter
2012-07-03 9:28 ` [PATCH 25/43] drm: remove the list_head from drm_mode_set Daniel Vetter
2012-07-03 9:28 ` [PATCH 26/43] drm/i915: copy&paste drm_crtc_helper_set_config Daniel Vetter
2012-07-03 9:28 ` [PATCH 27/43] drm/i915: call set_base directly Daniel Vetter
2012-07-03 9:28 ` [PATCH 28/43] drm/i915: inline intel_best_encoder Daniel Vetter
2012-07-03 9:28 ` [PATCH 29/43] drm/i915: copy&paste drm_crtc_helper_set_mode Daniel Vetter
2012-07-25 21:14 ` Paulo Zanoni
2012-07-03 9:28 ` [PATCH 30/43] drm/i915: simplify intel_crtc_prepare_encoders Daniel Vetter
2012-07-03 9:28 ` [PATCH 31/43] drm/i915: rip out encoder->prepare/commit Daniel Vetter
2012-07-03 9:28 ` [PATCH 32/43] drm/i915: call crtc functions directly Daniel Vetter
2012-07-03 9:28 ` [PATCH 33/43] drm/i915: WARN when trying to enabled an unused crtc Daniel Vetter
2012-07-03 9:28 ` [PATCH 34/43] drm/i915: Add interfaces to read out encoder/connector hw state Daniel Vetter
2012-07-03 9:28 ` [PATCH 35/43] drm/i915/dp: implement get_hw_state Daniel Vetter
2012-07-03 9:28 ` [PATCH 36/43] drm/i915/hdmi: " Daniel Vetter
2012-07-03 9:28 ` [PATCH 37/43] drm/i915/tv: " Daniel Vetter
2012-07-03 9:28 ` [PATCH 38/43] drm/i915/lvds: " Daniel Vetter
2012-07-03 9:28 ` [PATCH 39/43] drm/i915/crt: " Daniel Vetter
2012-07-03 9:28 ` [PATCH 40/43] drm/i915/sdvo: " Daniel Vetter
2012-07-03 9:28 ` [PATCH 41/43] drm/i915/dvo: " Daniel Vetter
2012-07-03 9:28 ` [PATCH 42/43] drm/i915: read out the modeset hw state at load and resume time Daniel Vetter
2012-07-03 9:28 ` [PATCH 43/43] drm/i915: check connector hw/sw state 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=1341307715-3886-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 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).