1. 28 Mar, 2013 1 commit
  2. 27 Mar, 2013 1 commit
    • Daniel Vetter's avatar
      drm/i915: add pipe_config->has_pch_encoder · 5bfe2ac0
      Daniel Vetter authored
      
      This is used way too often in the enable/disable paths. And will
      be even more useful in the future.
      
      Note that correct semantics of this change highly depend upon
      correct updating of intel_crtc->config: Like with all other
      modeset state, we need to call ->disable with the old config,
      but ->mode_set and ->enable with the new config.
      
      v2: Do not yet use the flag in the ->disable callbacks - atm we don't
      yet have support for the information stored in the pipe_config in the
      hw state readout code, so this will be wrong at boot-up/resume.
      
      v3: Rebased on top of the hdmi/dp ddi encoder merging.
      
      v4: Fixup stupid rebase error which lead to a NULL vfunc deref.
      
      v5: On haswell the VGA port is on the PCH!
      
      v6: s/IS_HASWELL/HAS_DDI/, spotted by Paulo Zanoni. Also add a missing
      parameter name in a function declaration.
      
      v7: Don't forget to git add ...
      Reviewed-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      5bfe2ac0
  3. 25 Mar, 2013 1 commit
  4. 23 Mar, 2013 2 commits
  5. 17 Mar, 2013 1 commit
  6. 03 Mar, 2013 1 commit
  7. 20 Feb, 2013 1 commit
    • Paulo Zanoni's avatar
      drm/i915: rename sdvox_reg to hdmi_reg on HDMI context · b242b7f7
      Paulo Zanoni authored
      
      Some (but not all) of the HDMI registers can be used to control sDVO,
      so those registers have two names. IMHO, when we're talking about
      HDMI, we really should call the HDMI control register "hdmi_reg"
      instead of "sdvox_reg", otherwise we'll just confuse people reading
      our code (we now have platforms with HDMI but without SDVO). So now
      "struct intel_hdmi" has a member called "hdmi_reg" instead of
      "sdvox_reg".
      
      Also, don't worry: "struct intel_sdvo" still has a member called
      "sdvo_reg".
      
      v2: Rebase (v1 was sent in May 2012).
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b242b7f7
  8. 19 Feb, 2013 2 commits
  9. 13 Feb, 2013 1 commit
  10. 31 Jan, 2013 1 commit
    • Daniel Vetter's avatar
      drm/i915: dynamic Haswell display power well support · d6dd9eb1
      Daniel Vetter authored
      
      We can disable (almost) all the display hw if we only use pipe A, with
      the integrated edp transcoder on port A. Because we don't set the cpu
      transcoder that early (yet), we need to help us with a trick to simply
      check for any edp encoders.
      
      v2: Paulo Zanoni pointed out that we also need to configure the eDP
      cpu transcoder correctly.
      
      v3: Made by Paulo Zanoni
        - Rebase patch to be on top of "fix intel_init_power_wells" patch
        - Fix typos
        - Fix a small bug by adding a "connectors_active" check
        - Restore the initial code that unconditionally enables the power
          well when taking over from the BIOS
      
      v4: Made by Paulo Zanoni
        - One more typo spotted by Jani Nikula
      
      v5: Made by Paulo Zanoni
        - Rebase
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      d6dd9eb1
  11. 22 Jan, 2013 1 commit
  12. 10 Dec, 2012 1 commit
  13. 08 Dec, 2012 1 commit
    • Paulo Zanoni's avatar
      drm/i915: fix hsw_fdi_link_train "retry" code · 248138b5
      Paulo Zanoni authored
      
      We were previously doing exactly what the "mode set sequence for CRT"
      document mandates, but whenever we failed to train the link in the
      first tentative, all the other subsequent retries always failed. In
      one of my monitors that has 47 modes, I was usually getting around 3
      failures when running "testdisplay -a".
      
      After this patch, even if we fail in the first tentative, we can
      succeed in the next ones. So now when running "testdisplay -a" I see
      around 3 times the message "FDI link training done on step 1" and no
      failures.
      
      Notice that now the "retry" code looks a lot like the DP retry code.
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      248138b5
  14. 03 Dec, 2012 1 commit
    • Daniel Vetter's avatar
      drm/i915: fixup sparse warnings · 1a240d4d
      Daniel Vetter authored
      
      - __iomem where there is none (I love how we mix these things up).
      - Use gfp_t instead of an other plain type.
      - Unconfuse one place about enum pipe vs enum transcoder - for the pch
        transcoder we actually use the pipe enum. Fixup the other cases
        where we assign the pipe to the cpu transcoder with explicit casts.
      - Declare the mch_lock properly in a header.
      
      There is still a decent mess in intel_bios.c about __iomem, but heck,
      this is x86 and we're allowed to do that.
      
      Makes-sparse-happy: Chris Wilson <chris@chris-wilson.co.uk>
      [danvet: Use a space after the cast consistently and fix up the
      newly-added cast in i915_irq.c to properly use __iomem.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      1a240d4d
  15. 29 Nov, 2012 3 commits
  16. 21 Nov, 2012 2 commits
  17. 11 Nov, 2012 6 commits
    • Paulo Zanoni's avatar
      drm/i915: fix Haswell FDI link disable path · 1ad960f2
      Paulo Zanoni authored
      
      This covers the "Disable FDI" section from the CRT mode set sequence.
      This disables the FDI receiver and also the FDI pll.
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      1ad960f2
    • Paulo Zanoni's avatar
      drm/i915: fix Haswell FDI link training code · 04945641
      Paulo Zanoni authored
      
      This commit makes hsw_fdi_link_train responsible for implementing
      everything described in the "Enable and train FDI" section from the
      Hawell CRT mode set sequence documentation. We completely rewrite
      hsw_fdi_link_train to match the documentation and we also call it in
      the right place.
      
      This patch was initially sent as a series of tiny patches fixing every
      little problem of the function, but since there were too many patches
      fixing the same function it got a little difficult to get the "big
      picture" of how the function would be in the end, so here we amended
      all the patches into a single big patch fixing the whole function.
      
      Problems we fixed:
      
        1 - Train Haswell FDI at the right time.
      
          We need to train the FDI before enabling the pipes and planes, so
          we're moving the call from lpt_pch_enable to haswell_crtc_enable
          directly.
      
          We are also removing ironlake_fdi_pll_enable since the PLL
          enablement on Haswell is completely different and is also done
          during the link training steps.
      
        2 - Use the right FDI_RX_CTL register on Haswell
      
          There is only one PCH transcoder, so it's always _FDI_RXA_CTL.
          Using "pipe" here is wrong.
      
        3 - Don't rely on DDI_BUF_CTL previous values
      
          Just set the bits we want, everything else is zero. Also
          POSTING_READ the register before sleeping.
      
        4 - Program the FDI RX TUSIZE register on hsw_fdi_link_train
      
          According to the mode set sequence documentation, this is the
          right place. According to the FDI_RX_TUSIZE register description,
          this is the value we should set.
      
          Also remove the code that sets this register from the old
          location: lpt_pch_enable.
      
        5 - Properly program FDI_RX_MISC pwrdn lane values on HSW
      
        6 - Wait only 35us for the FDI link training
      
          First we wait 30us for the FDI receiver lane calibration, then we
          wait 5us for the FDI auto training time.
      
        7 - Remove an useless indentation level on hsw_fdi_link_train
      
          We already "break" when the link training succeeds.
      
        8 - Disable FDI_RX_ENABLE, not FDI_RX_PLL_ENABLE
      
          When we fail the training.
      
        9 - Change Haswell FDI link training error messages
      
          We shouldn't call DRM_ERROR when still looping through voltage
          levels since this is expected and not really a failure. So in this
          commit we adjust the error path to only DRM_ERROR when we really
          fail after trying everything.
      
          While at it, replace DRM_DEBUG_DRIVER with DRM_DEBUG_KMS since
          it's what we use everywhere.
      
        10 - Try each voltage twice at hsw_fdi_link_train
      
          Now with Daniel Vetter's suggestion to use "/2" instead of ">>1".
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      [danvet: Applied tiny bikesheds:
      - mention in comment that we test each voltage/emphasis level twice
      - realing arguments of the only untouched reg write, it spilled over
        the 80 char limit ...]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      04945641
    • Paulo Zanoni's avatar
      drm/i915: set the correct number of FDI lanes on Haswell · 349d7e5d
      Paulo Zanoni authored
      
      We had 2 places using X2 and one place using X1.
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      349d7e5d
    • Paulo Zanoni's avatar
      drm/i915: create the DDI encoder · 00c09d70
      Paulo Zanoni authored
      
      Now intel_ddi_init is just like intel_hdmi_init and intel_dp_init: it
      inits the encoder and then calls the proper init_connector functions.
      Notice that for non-eDP ports we call both HDMI and DP connector init,
      so we have 2 connectors attached to each DDI encoder.
      
      After this change, intel_hdmi_init and intel_dp_init are only called
      by Ivy Bridge and earlier, while hardware containing DDI outputs
      should call intel_ddi_init.
      
      Also added/removed quite a few "static" keywords due to the fact that
      some function pointers were moved from intel_dp.c and intel_hdmi.c to
      intel_ddi.c.
      
      DP finally works on Haswell now! \o/
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      00c09d70
    • Paulo Zanoni's avatar
      drm/i915: add intel_ddi_connector_get_hw_state · bcbc889b
      Paulo Zanoni authored
      
      We need this since now on DDI we will have 2 connectors on each
      encoder.
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      bcbc889b
    • Paulo Zanoni's avatar
      drm/i915: add port field to intel_digital_port · 174edf1f
      Paulo Zanoni authored
      
      Both "intel_dp" and "intel_hdmi" structs had a "port" field, which
      always had the same value. It makes more sense to move this to
      intel_digital_port, so we can know the port independently of the
      connector type.
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      174edf1f
  18. 26 Oct, 2012 8 commits
  19. 18 Oct, 2012 5 commits