1. 18 10月, 2012 1 次提交
  2. 06 9月, 2012 7 次提交
    • D
      drm/i915: improve modeset state checking after dpms calls · b980514c
      Daniel Vetter 提交于
      Now that we have solid modeset state tracking and checking code in
      place, we can do the Full Monty also after dpms calls.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b980514c
    • D
      drm/i915: s/intel_encoder_disable/intel_encoder_noop · 1f703855
      Daniel Vetter 提交于
      Because that's what it is. Unfortunately we can't rip this out because
      the fb helper has an incetious relationship with the crtc helper - it
      likes to call disable_unused_functions, among other things.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1f703855
    • D
      drm/i915: check connector hw/sw state · 0a91ca29
      Daniel Vetter 提交于
      Atm we can only check the connector state after a dpms call - while
      doing modeset with the copy&pasted crtc helper code things are too
      ill-defined for proper checking. But the idea is very much to call
      this check from the modeset code, too.
      
      v2: Fix dpms check and don't presume that if the hw isn't on that it
      must not be linked up with an encoder (it could simply be switched off
      with the dpms state).
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0a91ca29
    • D
      drm/i915/crt: implement get_hw_state · e403fc94
      Daniel Vetter 提交于
      Note that even though this connector is cloneable we still can use the
      exact same test to check whether the connector is on or whether the
      encoder is enabled - both the dpms code and the encoder disable/enable
      frob the exact same hw state.
      
      For dvo/sdvo outputs, this will be different.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e403fc94
    • D
      drm/i915: rip out encoder->prepare/commit · c9deac97
      Daniel Vetter 提交于
      With the new infrastructure we're doing this when enabling/disabling
      the entire display pipe.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c9deac97
    • D
      drm/i915: convert dpms functions of dvo/sdvo/crt · b2cabb0e
      Daniel Vetter 提交于
      Yeah, big patch but I couldn't come up with a neat idea of how to
      split it up further, that wouldn't break dpms on cloned configs
      somehow. But the changes in dvo/sdvo/crt are all pretty much
      orthonogal, so it's not too bad a patch.
      
      These are the only encoders that support cloning, which requires a few
      special changes compared to the previous patches.
      - Compute the desired state of the display pipe by walking all
        connected encoders and checking whether any has active connectors.
        To make this clearer, drop the old mode parameter to the crtc dpms
        function and rename it to intel_crtc_update_dpms.
      - There's the curious case of intel_crtc->dpms_mode. With the previous
        patches to remove the overlay pipe A code and to rework the load
        detect pipe code, the big users are gone. We still keep it to avoid
        enabling the pipe twice, but we duplicate this logic with
        crtc->active, too. Still, leave this for now and just push a fake
        dpms mode into it that reflects the state of the display pipe.
      
      Changes in the encoder dpms functions:
      - We clamp the dpms state to the supported range right away. This is
        escpecially important for the VGA outputs, where only older hw
        supports the intermediate states. This (and the crt->adpa_reg patch)
        allows us to unify the crt dpms code again between all variants
        (gmch, vlv and pch).
      - We only enable/disable the output for dvo/sdvo and leave the encoder
        running. The encoder will be disabled/enabled when we switch the
        state of the entire output pipeline (which will happen right away
        for non-cloned setups). This way the duplication is reduced and
        strange interaction when disabling output ports at the wrong time
        avoided.
      
      The dpms code for all three types of connectors contains a bit of
      duplicated logic, but I think keeping these special cases separate is
      simpler: CRT is the only one that hanldes intermediate dpms state
      (which requires extra logic to enable/disable things in the right
      order), and introducing some abstraction just to share the code
      between dvo and sdvo smells like overkill. We can do that once someone
      bothers to implement cloning for the more modern outputs. But I doubt
      that this will ever happen.
      
      v2: s/crtc/crt/_set_dpms, noticed by Paulo Zanoni.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b2cabb0e
    • D
      drm/i915/crt: convert to encoder disable/enable · 2124604b
      Daniel Vetter 提交于
      CRT is the first output which can be cloned, hence we cannot (yet)
      move the dpms handling over to disable/enable. This requires some more
      smarts in intel_crtc_dpms first to set the display pipe status
      depening upon encoder->connectors_active of all connected encoders.
      
      Because that will happen in a separate step, don't touch the dpms
      functions, yet.
      
      v2: Be careful about clearing the _DISABLE flags for intermediate dpms
      modes - otherwise we might clobber the crt state when another (cloned)
      connector gets enabled.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2124604b
  3. 17 8月, 2012 3 次提交
  4. 26 7月, 2012 2 次提交
    • D
      drm/i915: add inte_crt->adpa_reg · 540a8950
      Daniel Vetter 提交于
      With the base addresses shifting around, this is easier to handle.
      Also move to the real reg offset on vlv.
      Acked-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      540a8950
    • D
      drm/i915: simplify possible_clones computation · 66a9278e
      Daniel Vetter 提交于
      Intel hw only has one MUX for encoders, so outputs are either not
      cloneable or all in the same group of cloneable outputs. This neatly
      simplifies the code and allows us to ditch some ugly if cascades in
      the dp and hdmi init code (well, we need these if cascades for other
      stuff still, but that can be taken care of in follow-up patches).
      
      Note that this changes two things:
      - dvo can now be cloned with sdvo, but dvo is gen2 whereas sdvo is
        gen3+, so no problem. Note that the old code had a bug and didn't
        allow cloning crt with dvo (but only the other way round).
      - sdvo-lvds can now be cloned with sdvo-non-tv. Spec says this won't
        work, but the only reason I've found is that you can't use the
        panel-fitter (used for lvds upscaling) with anything else. But we
        don't use the panel fitter for sdvo-lvds. Imo this part of Bspec is
        a) rather confusing b) mostly as a guideline to implementors (i.e.
        explicitly stating what is already implicit from the spec, without
        always going into the details of why). So I think we can ignore this
        - worst case we'll get a bug report from a user with with sdvo-lvds
        and sdvo-tmds and have to add that special case back in.
      
      Because sdvo lvds is a bit special explain in comments why sdvo LVDS
      outputs can be cloned, but native LVDS and eDP can't be cloned - we
      use the panel fitter for the later, but not for sdvo.
      
      Note that this also uncoditionally initializes the panel_vdd work used
      by eDP. Trying to be clever doesn't buy us anything (but strange bugs)
      and this way we can kill the is_edp check.
      
      v2: Incorporate review from Paulo
      - Add in a missing space.
      - Pimp comment message to address his concerns.
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      66a9278e
  5. 20 7月, 2012 2 次提交
  6. 21 6月, 2012 1 次提交
  7. 20 6月, 2012 1 次提交
  8. 16 6月, 2012 1 次提交
    • D
      drm/i915/crt: Do not rely upon the HPD presence pin · aaa37730
      Daniel Vetter 提交于
      VGA hotplug detection "works" by measuring the resistance across
      certain pins. A lot of kvm switches fumble this and wire up cheap
      resistors with the wrong resistance or don't bother at all.
      
      To accomodate these, also try to detect a connected monitor by trying
      to grab the edid. Contrary to !HAS_HOTPLUG platforms we don't bother
      with an actual load-detection cycle when the output is life - that
      would be actual work to implement because things moved around. This is
      the big difference to Chris Wilson's original approach:
      
      commit 9e612a00
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Thu May 31 13:08:53 2012 +0100
      
          drm/i915/crt: Do not rely upon the HPD presence pin
      
      This blew up on Linus' machine because it errornously detected a vga
      screen (without and edid and hence only the default modes), leading to
      it's prompt removal:
      
      commit 8f53369b
      Author: Linus Torvalds <torvalds@linux-foundation.org>
      Date:   Fri Jun 8 14:53:06 2012 -0700
      
          Revert "drm/i915/crt: Do not rely upon the HPD presence pin"
      
      Some digging around in Bspec shows the reason why load detect doesn't work on
      newer chips - the legacy VGA load detect bit isn't wired up any longer:
      
      Public Snb Bspec, Vol3 Part1, 1.1.1 ST00 Input Status 0, bit4:
      
      "RGB Comparator / Sense. This bit is here for compatibility and will
      always return one. Monitor detection must be done be done through the
      programming of registers in the MMIO space.
      0 = Below threshold
      1 = Above threshold"
      
      v2: Add a comment in the code that load detect on hotplug capable
      machines is broken and pimp the commit message with a quote of Bspec
      to show why.
      Reported-and-tested-by: NMatthieu LAVIE <boiteamadmax@hotmail.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50501Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      aaa37730
  9. 09 6月, 2012 1 次提交
    • L
      Revert "drm/i915/crt: Do not rely upon the HPD presence pin" · 8f53369b
      Linus Torvalds 提交于
      This reverts commit 9e612a00.
      
      It incorrectly finds VGA connectors where none are attached, apparently
      not noticing that nothing replied to the EDID queries, and happily using
      the default EDID modes that have nothing to do with actual hardware.
      
      That in turn then causes X to fall down to the lowest common
      denominator, which is usually the default 1024x768 mode that is in the
      default EDID and pretty much anything supports).
      
      I'd suggest that if not relying on the HDP pin, the code should at least
      check whether it gets valid EDID data back, rather than just assume
      there's something on the VGA connector.
      
      Cc: Dave Airlie <airlied@linux.ie>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8f53369b
  10. 31 5月, 2012 1 次提交
  11. 20 5月, 2012 1 次提交
  12. 22 4月, 2012 1 次提交
  13. 18 4月, 2012 1 次提交
  14. 10 4月, 2012 1 次提交
  15. 28 3月, 2012 1 次提交
    • D
      drm/i915/intel_i2c: refactor using intel_gmbus_get_adapter · 3bd7d909
      Daniel Kurtz 提交于
      Instead of letting other modules directly access the ->gmbus array,
      introduce intel_gmbus_get_adapter() for looking up an i2c_adapter
      for a given gmbus port identifier.  This will enable later refactoring
      of the gmbus port list.
      
      Note: Before requesting an adapter for a given gmbus port number, the
      driver must first check its validity using i2c_intel_gmbus_is_port_valid().
      If this check fails, a call to intel_gmbus_get_adapter() will WARN_ON and
      return NULL.  This is relevant for parts of the driver that read a port
      from VBIOS, which might be improperly initialized and contain an invalid
      port.  In these cases, the driver must fall back to using a safer default
      port.
      Signed-off-by: NDaniel Kurtz <djkurtz@chromium.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3bd7d909
  16. 11 2月, 2012 1 次提交
  17. 13 1月, 2012 1 次提交
  18. 21 10月, 2011 1 次提交
  19. 20 9月, 2011 1 次提交
  20. 05 6月, 2011 1 次提交
  21. 11 5月, 2011 2 次提交
  22. 06 4月, 2011 1 次提交
  23. 08 2月, 2011 1 次提交
  24. 26 1月, 2011 1 次提交
  25. 12 1月, 2011 1 次提交
    • D
      drm/i915/crt: Check for a analog monitor in case of DVI-I · f5afcd3d
      David Müller 提交于
      Since Linux 2.6.36 the digital output on my system (855GME + DVI-I) is
      not working any longer. The analog output is always activated
      regardless of the type of monitor attached.
      
      The culprit seems to be intel_crt_detect_ddc(), which returns true as
      soon as an ACK from the EDID device is received. Obviously this
      approach does not work with DVI-I where the analog and digital outputs
      share a common DDC bus.
      
      In a similar manner to the shared DDC wire, ala the "Mac Mini Hack", we
      need an additional check to make sure that there really is an analog
      device attached to the DDC.
      Signed-off-by: NDavid Müller <d.mueller@elsoft.ch>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: stable@kernel.org
      f5afcd3d
  26. 19 11月, 2010 4 次提交