1. 28 8月, 2014 1 次提交
    • M
      drm/i915: Remove bogus __init annotation from DMI callbacks · bbe1c274
      Mathias Krause 提交于
      The __init annotations for the DMI callback functions are wrong as this
      code can be called even after the module has been initialized, e.g. like
      this:
      
        # echo 1 > /sys/bus/pci/devices/0000:00:02.0/remove
        # modprobe i915
        # echo 1 > /sys/bus/pci/rescan
      
      The first command will remove the PCI device from the kernel's device
      list so the second command won't see it right away. But as it registers
      a PCI driver it'll see it on the third command. If the system happens to
      match one of the DMI table entries we'll try to call a function in long
      released memory and generate an Oops, at best.
      
      Fix this by removing the bogus annotation.
      
      Modpost should have caught that one but it ignores section reference
      mismatches from the .rodata section. :/
      
      Fixes: 25e341cf ("drm/i915: quirk away broken OpRegion VBT")
      Fixes: 8ca4013d ("CHROMIUM: i915: Add DMI override to skip CRT...")
      Fixes: 425d244c ("drm/i915: ignore LVDS on intel graphics systems...")
      Signed-off-by: NMathias Krause <minipli@googlemail.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Duncan Laurie <dlaurie@chromium.org>
      Cc: Jarod Wilson <jarod@redhat.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>	# Can modpost be fixed?
      Cc: stable@vger.kernel.org
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      bbe1c274
  2. 18 8月, 2014 1 次提交
    • V
      drm/i915: Fix locking for intel_enable_pipe_a() · 208bf9fd
      Ville Syrjälä 提交于
      intel_enable_pipe_a() gets called with all the modeset locks already
      held (by drm_modeset_lock_all()), so trying to grab the same
      locks using another drm_modeset_acquire_ctx is going to fail miserably.
      
      Move most of the drm_modeset_acquire_ctx handling (init/drop/fini)
      out from intel_{get,release}_load_detect_pipe() into the callers
      (intel_{crt,tv}_detect()). Only the actual locking and backoff
      handling is left in intel_get_load_detect_pipe(). And in
      intel_enable_pipe_a() we just share the mode_config.acquire_ctx from
      drm_modeset_lock_all() which is already holding all the relevant locks.
      
      It's perfectly legal to lock the same ww_mutex multiple times using the
      same ww_acquire_ctx. drm_modeset_lock() will convert the returned
      -EALREADY into 0, so the caller doesn't need to do antyhing special.
      
      Fixes a hang on resume on my 830.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      208bf9fd
  3. 23 7月, 2014 1 次提交
  4. 11 7月, 2014 3 次提交
  5. 19 6月, 2014 1 次提交
  6. 05 6月, 2014 1 次提交
    • R
      drm: convert crtc and connection_mutex to ww_mutex (v5) · 51fd371b
      Rob Clark 提交于
      For atomic, it will be quite necessary to not need to care so much
      about locking order.  And 'state' gives us a convenient place to stash a
      ww_ctx for any sort of update that needs to grab multiple crtc locks.
      
      Because we will want to eventually make locking even more fine grained
      (giving locks to planes, connectors, etc), split out drm_modeset_lock
      and drm_modeset_acquire_ctx to track acquired locks.
      
      Atomic will use this to keep track of which locks have been acquired
      in a transaction.
      
      v1: original
      v2: remove a few things not needed until atomic, for now
      v3: update for v3 of connection_mutex patch..
      v4: squash in docbook
      v5: doc tweaks/fixes
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      51fd371b
  7. 04 6月, 2014 1 次提交
  8. 05 5月, 2014 1 次提交
    • D
      drm/i915/crt: Remove ->mode_set callback · 894ed1ec
      Daniel Vetter 提交于
      We only set a few bits in the ADPA register, which we then read back
      in the enable/disable hooks. So we can just move that bit of state
      computation code to the place where we need it since setting these
      bits without enabling the CRT encoder has no effects.
      
      The only exceptions are the hotplug bits since they affect the hotplug
      detection logic, but we already set those in the ->reset function and
      then never touch them.
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      894ed1ec
  9. 04 4月, 2014 1 次提交
  10. 11 3月, 2014 2 次提交
  11. 08 3月, 2014 2 次提交
  12. 06 3月, 2014 2 次提交
  13. 14 2月, 2014 1 次提交
    • I
      drm/i915: add unregister callback to connector · 4932e2c3
      Imre Deak 提交于
      Since
      
      commit d9255d57
      Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Date:   Thu Sep 26 20:05:59 2013 -0300
      
      it became clear that we need to separate the unload sequence into two
      parts:
      
      1. remove all interfaces through which new operations on some object
         (crtc, encoder, connector) can be started and make sure all pending
         operations are completed
      2. do the actual tear down of the internal representation of the above
         objects
      
      The above commit achieved this separation for connectors by splitting
      out the sysfs removal part from the connector's destroy callback and
      doing this removal before calling drm_mode_config_cleanup() which does
      the actual tear-down of all the drm objects.
      
      Since we'll have to customize the interface removal part for different
      types of connectors in the upcoming patches, add a new unregister
      callback and move the interface removal part to it.
      
      No functional change.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NAntti Koskipää <antti.koskipaa@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4932e2c3
  14. 25 1月, 2014 1 次提交
    • D
      drm/i915: Shuffle modeset reset handling around · 754970ee
      Daniel Vetter 提交于
      Currently we're doing the reset handling a bit late, and we're doing
      it both in the driver load code and on resume. This makes it unusable
      for e.g. resetting the panel power sequence state like Paulo wants to.
      
      Instead of adding yet another single-use callback shuffle things
      around:
      - Output handling code is responsible to reset/init all state on its
        own at driver load time.
      - We call the reset functions much earlier, before we start using any
        of the modeset code.
      
      Compared to Paulo's new ->resume callback the only difference in
      placement is that ->reset is still called without dev->struct_mutex
      held. Which is imo a feature.
      
      v2: Rebase on top of the now merge dinq.
      
      Cc: Paulo Zanoni <przanoni@gmail.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      754970ee
  15. 28 11月, 2013 1 次提交
  16. 09 11月, 2013 1 次提交
  17. 01 11月, 2013 1 次提交
    • L
      i915: fix compiler warning · 0baab4fd
      Linus Torvalds 提交于
      The last i915 drm update brought with it this annoying warning
      
        drivers/gpu/drm/i915/intel_crt.c: In function ‘intel_crt_get_config’:
        drivers/gpu/drm/i915/intel_crt.c:110:21: warning: unused variable ‘dev’ [-Wunused-variable]
          struct drm_device *dev = encoder->base.dev;
                             ^
      
      introduced by commit 7195a50b ("drm/i915: Add HSW CRT output readout
      support").
      
      Remove the offending pointless variable.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0baab4fd
  18. 29 10月, 2013 1 次提交
  19. 17 10月, 2013 1 次提交
  20. 01 10月, 2013 4 次提交
  21. 17 9月, 2013 1 次提交
    • V
      drm/i915: Fix port_clock and adjusted_mode.clock readout all over · 18442d08
      Ville Syrjälä 提交于
      Now that adjusted_mode.clock no longer contains the pixel_multiplier, we
      can kill the get_clock() callback and instead do the clock readout
      in get_pipe_config().
      
      Also i9xx_crtc_clock_get() can now extract the frequency of the PCH
      DPLL, so use it to populate port_clock accurately for PCH encoders.
      For DP in port A the encoder is still responsible for filling in
      port_clock. The FDI adjusted_mode.clock extraction is kept in place
      for some extra sanity checking, but we no longer need to pretend it's
      also the port_clock.
      
      In the encoder get_config() functions fill out adjusted_mode.clock
      based on port_clock and other details such as the DP M/N values,
      HDMI 12bpc and SDVO pixel_multiplier. For PCH encoders we will then
      do an extra sanity check to make sure the dotclock we derived from
      the FDI configuratiuon matches the one we derive from port_clock.
      
      DVO doesn't exist on PCH platforms, so it doesn't need to anything
      but assign adjusted_mode.clock=port_clock. And DDI is HSW only, so
      none of the changes apply there.
      
      v2: Use hdmi_reg color format to detect 12bpc HDMI case
      v3: Set adjusted_mode.clock for LVDS too
      v4: Rename ironlake_crtc_clock_get to ironlake_pch_clock_get,
          eliminate the useless link_freq variable.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      18442d08
  22. 11 9月, 2013 1 次提交
  23. 03 9月, 2013 1 次提交
  24. 05 8月, 2013 1 次提交
  25. 24 7月, 2013 1 次提交
  26. 01 6月, 2013 1 次提交
  27. 21 5月, 2013 1 次提交
    • J
      drm/i915: add encoder get_config function v5 · 045ac3b5
      Jesse Barnes 提交于
      We can use this for fetching encoder specific pipe_config state, like
      mode flags, adjusted clock, etc.
      
      Just used for mode flags atm, so we can check the pipe config state at
      mode set time.
      
      v2: get_config when checking hw state too
      v3: fix DVO and LVDS mode flags (Ville)
          get SDVO DTD for flag fetch (Ville)
      v4: use input timings (Ville)
          correct command used (Ville)
          remove gen4 check (Ville)
      v5: get DDI flag config too
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v4)
      Tested-by: Paulo Zanoni <przanoni@gmail.com> (the new hsw ddi stuff)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      045ac3b5
  28. 11 5月, 2013 1 次提交
  29. 24 4月, 2013 1 次提交
  30. 18 4月, 2013 1 次提交
    • E
      drm/i915: (re)init HPD interrupt storm statistics · 821450c6
      Egbert Eich 提交于
      When an encoder is shared on several connectors there is only
      one hotplug line, thus this line needs to be shared among these
      connectors.
      If HPD detect only works reliably on a subset of those connectors,
      we want to poll the others. Thus we need to make sure that storm
      detection doesn't mess up the settings for those connectors.
      Therefore we store the settings in the intel_connector struct and
      restore them from there.
      If nothing is set but the encoder has a hpd_pin set we assume this
      connector is hotplug capable.
      On init/reset we make sure the polled state of the connectors
      is (re)set to the default value, the HPD interrupts are marked
      enabled.
      Signed-off-by: NEgbert Eich <eich@suse.de>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      821450c6
  31. 28 3月, 2013 2 次提交