1. 06 8月, 2016 1 次提交
  2. 04 8月, 2016 1 次提交
  3. 02 8月, 2016 1 次提交
  4. 07 7月, 2016 1 次提交
  5. 04 7月, 2016 1 次提交
  6. 30 6月, 2016 1 次提交
  7. 24 6月, 2016 2 次提交
  8. 19 6月, 2016 1 次提交
  9. 30 5月, 2016 1 次提交
  10. 05 5月, 2016 1 次提交
  11. 04 5月, 2016 2 次提交
  12. 05 4月, 2016 1 次提交
    • L
      drm/i915: Fix race condition in intel_dp_destroy_mst_connector() · 9e60290d
      Lyude 提交于
      After unplugging a DP MST display from the system, we have to go through
      and destroy all of the DRM connectors associated with it since none of
      them are valid anymore. Unfortunately, intel_dp_destroy_mst_connector()
      doesn't do a good enough job of ensuring that throughout the destruction
      process that no modesettings can be done with the connectors. As it is
      right now, intel_dp_destroy_mst_connector() works like this:
      
      * Take all modeset locks
      * Clear the configuration of the crtc on the connector, if there is one
      * Drop all modeset locks, this is required because of circular
        dependency issues that arise with trying to remove the connector from
        sysfs with modeset locks held
      * Unregister the connector
      * Take all modeset locks, again
      * Do the rest of the required cleaning for destroying the connector
      * Finally drop all modeset locks for good
      
      This only works sometimes. During the destruction process, it's very
      possible that a userspace application will attempt to do a modesetting
      using the connector. When we drop the modeset locks, an ioctl handler
      such as drm_mode_setcrtc has the oppurtunity to take all of the modeset
      locks from us. When this happens, one thing leads to another and
      eventually we end up committing a mode with the non-existent connector:
      
      	[drm:intel_dp_link_training_clock_recovery [i915]] *ERROR* failed to enable link training
      	[drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7cf0001f
      	[drm:intel_dp_start_link_train [i915]] *ERROR* failed to start channel equalization
      	[drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7cf0001f
      	[drm:intel_mst_pre_enable_dp [i915]] *ERROR* failed to allocate vcpi
      
      And in some cases, such as with the T460s using an MST dock, this
      results in breaking modesetting and/or panicking the system.
      
      To work around this, we now unregister the connector at the very
      beginning of intel_dp_destroy_mst_connector(), grab all the modesetting
      locks, and then hold them until we finish the rest of the function.
      
      CC: stable@vger.kernel.org
      Signed-off-by: NLyude <cpaul@redhat.com>
      Signed-off-by: NRob Clark <rclark@redhat.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1458155884-13877-1-git-send-email-cpaul@redhat.com
      (cherry picked from commit 1f771755)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      9e60290d
  13. 17 3月, 2016 1 次提交
    • L
      drm/i915: Fix race condition in intel_dp_destroy_mst_connector() · 1f771755
      Lyude 提交于
      After unplugging a DP MST display from the system, we have to go through
      and destroy all of the DRM connectors associated with it since none of
      them are valid anymore. Unfortunately, intel_dp_destroy_mst_connector()
      doesn't do a good enough job of ensuring that throughout the destruction
      process that no modesettings can be done with the connectors. As it is
      right now, intel_dp_destroy_mst_connector() works like this:
      
      * Take all modeset locks
      * Clear the configuration of the crtc on the connector, if there is one
      * Drop all modeset locks, this is required because of circular
        dependency issues that arise with trying to remove the connector from
        sysfs with modeset locks held
      * Unregister the connector
      * Take all modeset locks, again
      * Do the rest of the required cleaning for destroying the connector
      * Finally drop all modeset locks for good
      
      This only works sometimes. During the destruction process, it's very
      possible that a userspace application will attempt to do a modesetting
      using the connector. When we drop the modeset locks, an ioctl handler
      such as drm_mode_setcrtc has the oppurtunity to take all of the modeset
      locks from us. When this happens, one thing leads to another and
      eventually we end up committing a mode with the non-existent connector:
      
      	[drm:intel_dp_link_training_clock_recovery [i915]] *ERROR* failed to enable link training
      	[drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7cf0001f
      	[drm:intel_dp_start_link_train [i915]] *ERROR* failed to start channel equalization
      	[drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7cf0001f
      	[drm:intel_mst_pre_enable_dp [i915]] *ERROR* failed to allocate vcpi
      
      And in some cases, such as with the T460s using an MST dock, this
      results in breaking modesetting and/or panicking the system.
      
      To work around this, we now unregister the connector at the very
      beginning of intel_dp_destroy_mst_connector(), grab all the modesetting
      locks, and then hold them until we finish the rest of the function.
      
      CC: stable@vger.kernel.org
      Signed-off-by: NLyude <cpaul@redhat.com>
      Signed-off-by: NRob Clark <rclark@redhat.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1458155884-13877-1-git-send-email-cpaul@redhat.com
      1f771755
  14. 09 3月, 2016 1 次提交
  15. 11 2月, 2016 1 次提交
  16. 12 1月, 2016 2 次提交
  17. 04 1月, 2016 1 次提交
  18. 11 12月, 2015 1 次提交
  19. 10 12月, 2015 1 次提交
  20. 20 11月, 2015 1 次提交
    • L
      drm/i915: Fix oops caused by fbdev initialization failure · 54632abe
      Lukas Wunner 提交于
      intelfb_create() is called once on driver initialization. If it fails,
      ifbdev->helper.fbdev, ifbdev->fb or ifbdev->fb->obj may be NULL.
      
      Further up in the call stack, intel_fbdev_initial_config() calls
      intel_fbdev_fini() to tear down the ifbdev on failure. This calls
      intel_fbdev_destroy() which dereferences ifbdev->fb. Fix the ensuing
      oops.
      
      Also check in these functions if ifbdev is not NULL to avoid oops:
      
      i915_gem_framebuffer_info() is called on access to debugfs file
      "i915_gem_framebuffer" and dereferences ifbdev, ifbdev->helper.fb
      and ifbdev->helper.fb->obj.
      
      intel_connector_add_to_fbdev() / intel_connector_remove_from_fbdev()
      are called when registering / unregistering an mst connector and
      dereference ifbdev.
      
      v3: Drop additional null pointer checks in intel_fbdev_set_suspend(),
          intel_fbdev_output_poll_changed() and intel_fbdev_restore_mode()
          since they already check if ifbdev is not NULL, which is sufficient
          now that intel_fbdev_fini() is called on initialization failure.
          (Requested by Daniel Vetter <daniel.vetter@ffwll.ch>)
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Link: http://patchwork.freedesktop.org/patch/msgid/d05f0edf121264a9d0adb8ca713fd8cc4ae068bf.1447938059.git.lukas@wunner.deSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      54632abe
  21. 11 11月, 2015 1 次提交
  22. 06 10月, 2015 1 次提交
  23. 02 10月, 2015 1 次提交
    • D
      drm/dp/mst: split connector registration into two parts (v2) · d9515c5e
      Dave Airlie 提交于
      In order to cache the EDID properly for tiled displays, we
      need to retrieve it before we register the connector with
      userspace, otherwise userspace can call get resources
      and try and get the edid before we've even cached it.
      
      This fixes some problems when hotplugging mst monitors,
      with X/mutter running. As mutter seems to get 0 modes
      for one of the monitors in the tile.
      
      v2: fix warning in radeon
      handle tile setting in cached path rather than
      get edid path.
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      d9515c5e
  24. 30 9月, 2015 2 次提交
  25. 08 9月, 2015 1 次提交
  26. 01 9月, 2015 1 次提交
  27. 26 8月, 2015 1 次提交
    • V
      drm/i915: Put back lane_count into intel_dp and add link_rate too · 901c2daf
      Ville Syrjälä 提交于
      With MST there won't be a crtc assigned to the main link encoder, so
      trying to dig up the pipe_config from there is a recipe for an oops.
      
      Instead store the parameters (lane_count and link_rate) in the encoder,
      and use those values during link training etc. Since those parameters
      are now assigned only when the link is actually enabled,
      .compute_config() won't clobber them as it did before.
      
      Hardware state readout is still bonkers though as we don't transfer the
      link parameters from pipe_config intel_dp. We should do that during
      encoder sanitation. But since we don't even do a proper job of reading
      out the main link encoder state for MST there's littel point in
      worrying about this now.
      
      Fixes a regression with MST caused by:
       commit 90a6b7b0
       Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
       Date:   Mon Jul 6 16:39:15 2015 +0300
      
          drm/i915: Move intel_dp->lane_count into pipe_config
      
      v2: Different apporoach that should keep intel_dp_check_mst_status()
          somewhat less oopsy
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reported-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Tested-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      901c2daf
  28. 15 8月, 2015 2 次提交
  29. 14 8月, 2015 2 次提交
  30. 11 8月, 2015 1 次提交
  31. 04 8月, 2015 1 次提交
    • D
      drm/i915: Fixup dp mst encoder selection · 459485ad
      Daniel Vetter 提交于
      In
      
      commit 8c7b5ccb
      Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Date:   Tue Apr 21 17:13:19 2015 +0300
      
          drm/i915: Use atomic helpers for computing changed flags
      
      we've switched over to the atomic version to compute the
      crtc->encoder->connector routing from the i915 variant. That one
      relies upon the ->best_encoder callback, but the i915-private version
      relied upon intel_find_encoder. Which didn't matter except for dp mst,
      where the encoder depends upon the selected crtc.
      
      Fix this functional bug by implemented a correct atomic-state based
      encoder selector for dp mst.
      
      Note that we can't get rid of the legacy best_encoder callback since
      the fbdev emulation uses that still. That means it's incorrect there
      still, but that's been the case ever since i915 dp mst support was
      merged so not a regression. Best to fix that by converting fbdev over
      to atomic too.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Reviewed-by: NAnder Conselvan de Oliveira <conselvan2@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      459485ad
  32. 22 7月, 2015 2 次提交
    • D
      drm: gc now dead mode_group code · 3fdefa39
      Daniel Vetter 提交于
      Two nice things here:
      - drm_dev_register will truly register everything in the right order
        if the driver doesn't have a ->load callback. Before this we had to
        init the primary mode_group after the device nodes where already
        registered.
      
      - Less things to keep track of when reworking the connector locking,
        yay!
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      3fdefa39
    • D
      drm/i915: Take all modeset locks for DP MST hotplug · 8bb4da1d
      Daniel Vetter 提交于
      While auditing various users of the connector/encoder lists I realized
      that the atomic code is a very prolific user of them. And it only ever
      grabs the mode_config->connection_mutex, but not the
      mode_config->mutex like all the other code walking encoder/connector
      lists.
      
      The problem is that we can't grab the mode_config.mutex late in atomic
      code since that would lead to locking inversions. And we don't want to
      grab it unconditionally like the legacy set_config modeset path since
      that would render all the fine-grained locking moot.
      
      Instead just grab more locks in the dp mst hotplug code. Note that
      drm_connector_init (which is the one adding the connector to these
      lists) already uses drm_modeset_lock_all.
      
      The other reason for grabbing all locks is that the dpms off in the
      unplug function amounts to a modeset, so better to take all required
      locks for that.
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      8bb4da1d
  33. 08 5月, 2015 1 次提交