1. 10 12月, 2012 1 次提交
  2. 08 12月, 2012 1 次提交
    • P
      drm/i915: fix hsw_fdi_link_train "retry" code · 248138b5
      Paulo Zanoni 提交于
      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: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      248138b5
  3. 22 11月, 2012 2 次提交
  4. 12 11月, 2012 6 次提交
    • P
      drm/i915: fix Haswell FDI link disable path · 1ad960f2
      Paulo Zanoni 提交于
      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: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1ad960f2
    • P
      drm/i915: fix Haswell FDI link training code · 04945641
      Paulo Zanoni 提交于
      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: NPaulo 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: NDaniel Vetter <daniel.vetter@ffwll.ch>
      04945641
    • P
      drm/i915: set the correct number of FDI lanes on Haswell · 349d7e5d
      Paulo Zanoni 提交于
      We had 2 places using X2 and one place using X1.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      349d7e5d
    • P
      drm/i915: create the DDI encoder · 00c09d70
      Paulo Zanoni 提交于
      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: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      00c09d70
    • P
      drm/i915: add intel_ddi_connector_get_hw_state · bcbc889b
      Paulo Zanoni 提交于
      We need this since now on DDI we will have 2 connectors on each
      encoder.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bcbc889b
    • P
      drm/i915: add port field to intel_digital_port · 174edf1f
      Paulo Zanoni 提交于
      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: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      174edf1f
  5. 26 10月, 2012 8 次提交
  6. 19 10月, 2012 6 次提交
  7. 18 10月, 2012 3 次提交
  8. 12 10月, 2012 1 次提交
  9. 11 10月, 2012 1 次提交
  10. 10 10月, 2012 5 次提交
  11. 06 9月, 2012 2 次提交
    • D
      85234cdc
    • D
      drm/i915/hdmi: convert to encoder->disable/enable · 5ab432ef
      Daniel Vetter 提交于
      I've picked hdmi as the first encoder to convert because it's rather
      simple:
      - no cloning possible
      - no differences between prepare/commit and dpms off/on switching.
      
      A few changes are required to do so:
      - Split up the dpms code into an enable/disable function and wire it
        up with the intel encoder.
      - Noop out the existing encoder prepare/commit functions used by the
        crtc helper - our crtc enable/disable code now calls back into the
        encoder enable/disable code at the right spot.
      - Create new helper functions to handle dpms changes.
      - Add intel_encoder->connectors_active to better track dpms state. Atm
        this is unused, but it will be useful to correctly disable the
        entire display pipe for cloned configurations. Also note that for
        now this is only useful in the dpms code - thanks to the crtc
        helper's dpms confusion across a modeset operation we can't (yet)
        rely on this having a sensible value in all circumstances.
      - Rip out the encoder helper dpms callback, if this is still getting
        called somewhere we have a bug. The slight issue with that is that
        the crtc helper abuses dpms off to disable unused functions. Hence
        we also need to implement a default encoder disable function to do
        just that with the new encoder->disable callback.
      - Note that we drop the cpt modeset verification in the commit
        callback, too. The right place to do this would be in the crtc's
        enable function, _after_ all the encoders are set up. But because
        not all encoders are converted yet, we can't do that. Hence disable
        this check temporarily as a minor concession to bisectability.
      
      v2: Squash the dpms mode to only the supported values -
      connector->dpms is for internal tracking only, we can hence avoid
      needless state-changes a bit whithout causing harm.
      
      v3: Apply bikeshed to disable|enable_ddi, suggested by Paulo Zanoni.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5ab432ef
  12. 17 8月, 2012 1 次提交
  13. 11 8月, 2012 1 次提交
  14. 10 8月, 2012 2 次提交