1. 18 4月, 2013 18 次提交
  2. 09 4月, 2013 4 次提交
  3. 07 4月, 2013 2 次提交
    • B
      drm/i915: PCH_NOP · 40c7ead9
      Ben Widawsky 提交于
      Given certain fusing options discussed in the previous patch, it's
      possible to end up with platforms that normally have PCH but that PCH
      doesn't actually exist. In many cases, this is easily remedied with
      setting 0 pipes. This covers the other corners.
      
      Requiring this is a symptom of improper code splitting (using
      HAS_PCH_SPLIT instead of proper GEN checking, basically). I do not want
      to fix this.
      
      v2: Remove PCH reflck after change in previous patch (Daniel)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      40c7ead9
    • B
      drm/i915: Support PCH no display · e3c74757
      Ben Widawsky 提交于
      GEN supports a fusing option which subtracts the PCH display (making the
      CPU display also useless). In this configuration MMIO which gets decoded
      to a certain range will hang the CPU.
      
      For us, this is sort of the equivalent of having no pipes, and we can
      easily modify some code to not do certain things with no pipes.
      
      v2: Moved the num pipes check up in the call chain, and removed extra
      checks noted by Daniel. For more details, see:
      http://lists.freedesktop.org/archives/intel-gfx/2013-March/025746.html
      
      v3: Drop the intel_setup_overlay check (Daniel)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e3c74757
  4. 06 4月, 2013 7 次提交
  5. 03 4月, 2013 9 次提交
    • D
      drm/i915: create pipe_config->dpll for clock state · f47709a9
      Daniel Vetter 提交于
      Clock computations and handling are highly encoder specific, both in
      the optimal clock selection and also in which clocks to use and when
      sharing of clocks is possible.
      
      So the best place to do this is somewhere in the encoders, with a
      generic fallback for those encoders without special needs. To facility
      this, add a pipe_config->clocks_set boolean.
      
      This patch here is only prep work, it simply sets the computed clock
      values in pipe_config->dpll, and uses that data in the hw clock
      setting functions.
      
      Haswell code isn't touched, simply because Haswell clocks work much
      different and need their own infrastructure (with probably a
      Haswell-specific config->ddi_clock substruct).
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f47709a9
    • D
      drm/i915: hw readout support for ->has_pch_encoders · 88adfff1
      Daniel Vetter 提交于
      Now we can ditch the checks in the Haswell disable code.
      
      v2: add support for Haswell
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      88adfff1
    • D
      drm/i915: add hw state readout/checking for pipe_config · 0e8ffe1b
      Daniel Vetter 提交于
      We need to be able to read out the hw state code for a bunch
      of reasons:
      - Correctly disabling boot-up/resume state.
      - Pure paranoia.
      
      Since not all of the pipe configuration is e.g. relevant for
      fastboot (or at least we can allow some wiggle room in some
      parameters, like the clocks), we need to add a strict_checking
      parameter to intel_pipe_config_compare for fastboot.
      
      For now intel_pipe_config_compare should be fully paranoid and
      check everything that the hw state readout code supports. Which
      for this infrastructure code is nothing.
      
      I've gone a bit overboard with adding 3 get_pipe_config functions:
      The ilk version will differ with the next patch, so it's not too
      onerous.
      
      v2: Don't check the hw config if the pipe is off, since an enabled,
      but dpms off crtc will obviously have tons of difference with the hw
      state.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0e8ffe1b
    • D
      drm/i915: rip out superflous is_dp&is_cpu_edp tracking · 8b47047b
      Daniel Vetter 提交于
      The only exception left is is_cpu_edp in the haswell modeset code.
      We need that to assign the cpu transcoder, but we might want to
      move that eventually into the encoder, too.
      
      \o/-by: Jesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8b47047b
    • D
      drm/i915: remove leaky eDP functions · 947978fa
      Daniel Vetter 提交于
      Jesse Barnes noticed in his review of my DP cleanup series that
      intel_edp_target_clock is now unused. Checking related code I've
      noticed that also intel_edp_link_config is long unused.
      
      Kill them both.
      
      Wrt leaky eDP functions used in the common crtc code, the only thing
      still left is intel_encoder_is_pch_edp. That one is just due to the
      massive confusion between eDP vs. DP and port A vs. port D. Crtc code
      should at most concern itself with the later, never with the former.
      
      But that's material for another patch series.
      
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      947978fa
    • D
      drm/i915: track dp target_clock in pipe_config · df92b1e6
      Daniel Vetter 提交于
      We need it in the fdi m_n computation, which nicely kills almost
      all ugly special cases in there.
      
      It looks like we also need this to handle 12bpc hdmi correctly.
      
      Eventually it might be better to switch things around and put the
      target clock into adjusted_mode->clock and create a new pipe_config
      parameter for the port link clock.
      
      v2: Add a massive comment in the code to explain this mess.
      
      v3: s/dp_target_clock/pixel_target_clock in anticipation of the hdmi
      use-case.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      df92b1e6
    • D
      drm/i915: move dp_m_n computation to dp_encoder->compute_config · 03afc4a2
      Daniel Vetter 提交于
      We need a flag to designate dp encoders and the dp link m_n parameters
      in the pipe config for that. And now that the pipe bpp computations
      have been moved up and stored in the pipe config, too, we can do this
      without losing our sanity.
      
      v2: Rebased on top of Takashi Iwai's fix to (again) fix the target
      clock handling for eDP. Luckily the new code is sane enough and just
      does the right thing!
      
      v3: Move ->has_dp_encoder to this patch (Jesse).
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      03afc4a2
    • D
      drm/i915: clear up the fdi/dp set_m_n confusion · 6cf86a5e
      Daniel Vetter 提交于
      There's a rather decent confusion going on around transcoder m_n
      values. So let's clarify:
      - All dp encoders need this, either on the pch transcoder if it's a
        pch port, or on the cpu transcoder/pipe if it's a cpu port.
      - fdi links need to have the right m_n values for the fdi link set in
        the cpu transcoder.
      
      To handle the pch vs transcoder stuff a bit better, extract transcoder
      set_m_n helpers. To make them simpler, set intel_crtc->cpu_transcoder
      als in ironlake_crtc_mode_set, so that gen5+ (where the cpu m_n
      registers are all at the same offset) can use it.
      
      Haswell modeset is decently confused about dp vs. edp vs. fdi. dp vs.
      edp works exactly the same as dp (since there's no pch dp any more),
      so use that as a check. And only set up the fdi m_n values if we
      really have a pch encoder present (which means we have a VGA encoder).
      
      On ilk+ we've called ironlake_set_m_n both for cpu_edp and for pch
      encoders. Now that dp_set_m_n handles all dp links (thanks to the
      pch encoder check), we can ditch the cpu_edp stuff from the
      fdi_set_m_n function.
      
      Since the dp_m_n values are not readily available, we need to
      carefully coax the edp values out of the encoder. Hence we can't (yet)
      kill this superflous complexity.
      
      v2: Rebase on top of the ivb fdi B/C check patch - we need to properly
      clear intel_crtc->fdi_lane, otherwise those checks will misfire.
      
      v3: Rebased on top of a s/IS_HASWELL/HAS_DDI/ patch from Paulo Zanoni.
      
      v4: Drop the addition of has_dp_encoder, it's in the wrong patch (Jesse).
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6cf86a5e
    • D
      drm/i915: Fix sdvo connector get_hw_state function · bd6946e8
      Daniel Vetter 提交于
      The active output is only the currently selected one, which does not
      imply that it's actually enabled. Since we don't use the sdvo encoder
      side dpms support, we need to check whether the chip-side sdvo port is
      enabled instead.
      
      v2: Fix up Bugzilla links.
      
      v3: Simplify logic a bit (Chris).
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60138
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63031
      Cc: Egbert Eich <eich@pdx.freedesktop.org>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Tested-by: Egbert Eich <eich@pdx.freedesktop.org> (v2)
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bd6946e8