[Intel-gfx] [RFC 00/30] Haswell clocking+HDMI+DP+eDP fixes

Paulo Zanoni przanoni at gmail.com
Wed Aug 29 00:06:31 CEST 2012


From: Paulo Zanoni <paulo.r.zanoni at intel.com>

Hi

I've been working on this patch series for some time, and even though it's not
100% bug free yet, I feel it's ready to get some feedback, so I'm sending it as
an RFC. The ultimate goal is to make clocking+HDMI+DP+eDP work flawlessly and
without hanging the machine.

What's the current dinq status?
  - Only HDMI works, but it only uses WRPLL1 for everything, so dual screen
    doesn't exactly work everywhere.
  - DP and eDP patches were sent a long time ago, but they were dropped for not
    being the ideal solution. Also, code to properly detect if the monitor on a
    given port is DP or HDMI was never written.
  - We have problems dealing with the port/pipe clocks and newer SDVs completely
    freeze when booting.
  - We are nowhere near to being compliant with the "mode set/unset sequences"
    our documentation provides. And not following the mode set sequence is the
    cause of all the current issues we have.

This patch series is still based on dinq and not on Daniel's modeset-rework
patches. I did this because then I could be 100% sure that any problems were
actually introduced by me and not by the modeset-rework branch. I know I will
have to rewrite these patches on top of the modeset-rework branch, but, well,
it's the path I chose and I knew this (in addition, I get to learn more about
both worlds).

What does the patch series do?

  - The first 5 patches try to fix our clock handing and HDMI "mode unset". The
    patches are mixed because the goal of the "mode unset" changes is to give
    back the PLLs used so the clocking code can use it. I already discussed
    these with Daniel and it seems we'll still change these patches even more.
  - Then there is the DP series. Since DP and HDMI mode set/unset sequences are
    almost the same (they even share the same registers), I just made the HDMI
    code also work with DP instead of adding new DP-specific functions. It's a
    slow series where we add DP support to many functions without actually ever
    exposing DP by calling intel_dp_init.
  - Then there are the 2 patches that enable eDP. The second one actually starts
    exposing eDP on port A. I'm sure I'm still missing some bits of the eDP
    enablement, but at least my eDP panel works now.
  - Then the last patches make the DDI code properly detect if DP or HDMI is
    connected and make things work as expected. The big problem here is that DP
    and HDMI share the same registers, so you just can't call intel_dp_init and
    intel_hdmi_init passing the same port as the port argument. What I did here
    was to split intel_{dp,hdmi}_init_connector from intel_{dp,hdmi}_init, and
    created DDI's own encoder. So the legacy code still have an 1:1
    encoder:connector relationship, but the DDI encoder has 2 connectors: a DP
    connector and an HDMI connector.

What is still missing?

  - I still need to write a few more assertions and warnings in case things are
    not as we expect. Also, more debug output will be helpful.
  - As I already said, there are still some bugs when disabling things.

Comments, suggestions? Which color should we paint this?

Paulo Zanoni (30):
  drm/i915: rewrite the LCPLL code
  drm/i915: disable DDI pipes and ports when initializing
  drm/i915: wait for idle DDI_BUF_CTL after disabling it
  drm/i915: implement DDI disable function
  drm/i915: implement intel_ddi_pll_mode_set
  drm/i915: extract intel_ddi_enable pipe from intel_ddi_mode_set
  drm/i915: make intel_ddi_enable_pipe work on DP
  drm/i915: don't sleep after selecting the DDI pipe clock
  drm/i915: add DP support to intel_ddi_pll_mode_set
  drm/i915: add DP support to intel_ddi_disable_port
  drm/i915: add DP support to intel_ddi_mode_set
  drm/i915: add basic Haswell DP link train bits
  drm/i915: add intel_ddi_commit
  drm/i915: fix Haswell M/N registers
  drm/i915: fix DP AUX register definitions on Haswell
  drm/i915: disable DDI on intel_dp_link_down
  drm/i915: add intel_ddi_prepare_link_retrain
  drm/i915: add DP support to intel_ddi_disable
  drm/i915: add Haswell DP encoder_helper function definitions
  drm/i915: add TRANSCODER_EDP
  drm/i915: enable eDP on Haswell
  drm/i915: don't run PCH code on non-PCH ports
  drm/i915: init DP on port B
  drm/i915: simplify assignments inside intel_dp.c
  drm/i915: add intel_dp_to_dev and intel_hdmi_to_dev
  drm/i915: create intel_digital_port and use it
  drm/i915: remove encoder args from intel_{dp,hdmi}_add_properties
  drm/i915: split intel_hdmi_init into encoder and connector pieces
  drm/i915: split intel_dp_commit into encoder and connector pieces
  drm/i915: make DDI an encoder

 drivers/gpu/drm/i915/i915_drv.h      |   8 +
 drivers/gpu/drm/i915/i915_irq.c      |   7 +-
 drivers/gpu/drm/i915/i915_reg.h      |  79 ++--
 drivers/gpu/drm/i915/intel_ddi.c     | 705 +++++++++++++++++++++++++++++------
 drivers/gpu/drm/i915/intel_display.c | 150 +++++---
 drivers/gpu/drm/i915/intel_dp.c      | 407 ++++++++++++++------
 drivers/gpu/drm/i915/intel_drv.h     |  64 +++-
 drivers/gpu/drm/i915/intel_hdmi.c    | 121 +++---
 drivers/gpu/drm/i915/intel_sprite.c  |   6 +-
 9 files changed, 1177 insertions(+), 370 deletions(-)

-- 
1.7.11.2




More information about the Intel-gfx mailing list