1. 11 2月, 2016 1 次提交
  2. 12 1月, 2016 2 次提交
  3. 04 1月, 2016 1 次提交
  4. 11 12月, 2015 1 次提交
  5. 10 12月, 2015 1 次提交
  6. 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
  7. 11 11月, 2015 1 次提交
  8. 06 10月, 2015 1 次提交
  9. 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
  10. 30 9月, 2015 2 次提交
  11. 08 9月, 2015 1 次提交
  12. 01 9月, 2015 1 次提交
  13. 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
  14. 15 8月, 2015 2 次提交
  15. 14 8月, 2015 2 次提交
  16. 11 8月, 2015 1 次提交
  17. 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
  18. 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
  19. 08 5月, 2015 1 次提交
  20. 16 4月, 2015 1 次提交
  21. 13 4月, 2015 2 次提交
  22. 10 4月, 2015 1 次提交
  23. 27 3月, 2015 1 次提交
  24. 26 3月, 2015 1 次提交
  25. 20 3月, 2015 2 次提交
  26. 18 3月, 2015 1 次提交
  27. 31 1月, 2015 1 次提交
  28. 27 1月, 2015 5 次提交
    • M
      drm/i915: Add atomic_get_property entrypoint for connectors (v2) · 2545e4a6
      Matt Roper 提交于
      Even though we only support atomic plane updates at the moment, we still
      need to add an .atomic_get_property() entrypoint for connectors before
      we allow the driver to flip on the DRIVER_ATOMIC bit.  As soon as that
      bit gets set, the DRM core will start adding atomic connector properties
      (in addition to the plane properties we care about at the moment), so we
      need to be able to handle the new way the DRM core will interact with
      us.
      
      For simplicity, we just lookup driver-specific connector properties in
      the usual shadow array maintained by the core.  Once we get real atomic
      modeset support for crtc's and planes, this code should be re-written to
      pull the data out of crtc/connector state structures.
      
      v2: Fix intel_dvo and intel_dsi that I missed on the first pass (Ander)
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NAnder Conselvan de Oliveira <conselvan2@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2545e4a6
    • M
      drm/i915: Setup dummy atomic state for connectors (v3) · c6f95f27
      Matt Roper 提交于
      We want to enable/test plane updates via the atomic interface, but as
      soon as we flip DRIVER_ATOMIC on, the DRM core will take some atomic
      codepaths to lookup properties during drmModeGetConnector() and some of
      those codepaths unconditionally dereference connector->state
      (specifically when looking up the CRTC ID property in
      drm_atomic_connector_get_property()).  Create a dummy connector state
      for each connector at init time to ensure the DRM core doesn't try to
      dereference a NULL connector->state.  The actual connector properties
      will never be updated or contain useful information, but since we're
      doing this specifically for testing/debug of the plane operations (and
      only when a specific kernel module option is given), that shouldn't
      really matter.
      
      Once we start creating connector states, the DRM core will want to be
      able to clean them up for us.  We also need to hook up the destruction
      entrypoint to the core's helper.
      
      v2: Squash in the patch to set the state destruction hook (Ander & Bob)
      
      v3: Only create dummy connector states when we're actually faking
          atomic support.  (Ander)
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NAnder Conselvan de Oliveira <conselvan2@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c6f95f27
    • A
      drm/i915: Make intel_crtc->config a pointer · 6e3c9717
      Ander Conselvan de Oliveira 提交于
      To match the semantics of drm_crtc->state, which this will eventually
      become. The allocation of the memory for config will be fixed in a
      followup patch. By adding the extra _config field to intel_crtc it was
      possible to generate this entire patch with the cocci script below.
      
      @@ @@
      struct intel_crtc {
      ...
      -struct intel_crtc_state config;
      +struct intel_crtc_state _config;
      +struct intel_crtc_state *config;
      ...
      }
      @@ struct intel_crtc *crtc; @@
      -memset(&crtc->config, 0, sizeof(crtc->config));
      +memset(crtc->config, 0, sizeof(*crtc->config));
      @@ @@
      __intel_set_mode(...) {
      <...
      -to_intel_crtc(crtc)->config = *pipe_config;
      +(*(to_intel_crtc(crtc)->config)) = *pipe_config;
      ...>
      }
      @@ @@
      intel_crtc_init(...) {
      ...
      WARN_ON(drm_crtc_index(&intel_crtc->base) != intel_crtc->pipe);
      +intel_crtc->config = &intel_crtc->_config;
      return;
      ...
      }
      @@ struct intel_crtc *crtc; @@
      -&crtc->config
      +crtc->config
      @@ struct intel_crtc *crtc; identifier member; @@
      -crtc->config.member
      +crtc->config->member
      @@ expression E; @@
      -&(to_intel_crtc(E)->config)
      +to_intel_crtc(E)->config
      @@ expression E; identifier member; @@
      -to_intel_crtc(E)->config.member
      +to_intel_crtc(E)->config->member
      
      v2: Clarify manual changes by splitting them into another patch. (Matt)
          Improve cocci script to generate even more of the changes. (Ander)
      Signed-off-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6e3c9717
    • A
      drm/i915: Embedded struct drm_crtc_state in intel_crtc_state · 2d112de7
      Ander Conselvan de Oliveira 提交于
      And get rid of the duplicate mode structures. This patch was generated
      with the following semantic patch:
      
      @@ @@
      struct intel_crtc_state {
      +struct drm_crtc_state base;
      +
      ...
      -struct drm_display_mode requested_mode;
      -struct drm_display_mode adjusted_mode;
      ...
      }
      @@ struct intel_crtc_state *state; @@
      -state->adjusted_mode
      +state->base.adjusted_mode
      @@ struct intel_crtc_state *state; @@
      -state->requested_mode
      +state->base.mode
      @@ struct intel_crtc_state state; @@
      -state.adjusted_mode
      +state.base.adjusted_mode
      @@ struct intel_crtc_state state; @@
      -state.requested_mode
      +state.base.mode
      @@ struct drm_crtc *crtc; @@
      -to_intel_crtc(crtc)->config.adjusted_mode
      +to_intel_crtc(crtc)->config.base.adjusted_mode
      @@ identifier member; expression E; @@
      -PIPE_CONF_CHECK_FLAGS(adjusted_mode.member, E);
      +PIPE_CONF_CHECK_FLAGS(base.adjusted_mode.member, E);
      @@ identifier member; @@
      -PIPE_CONF_CHECK_I(adjusted_mode.member);
      +PIPE_CONF_CHECK_I(base.adjusted_mode.member);
      @@ identifier member; @@
      -PIPE_CONF_CHECK_CLOCK_FUZZY(adjusted_mode.member);
      +PIPE_CONF_CHECK_CLOCK_FUZZY(base.adjusted_mode.member);
      
      v2: Completely generate the patch with cocci. (Ander)
      Signed-off-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2d112de7
    • A
      drm/i915: Rename struct intel_crtc_config to intel_crtc_state · 5cec258b
      Ander Conselvan de Oliveira 提交于
      The objective is to make this structure usable with the atomic helpers,
      so let's start with the rename. Patch generated with coccinelle:
      
      @@ @@
      -struct intel_crtc_config {
      +struct intel_crtc_state {
      ...
      }
      @@ @@
      -struct intel_crtc_config
      +struct intel_crtc_state
      
      v2: Completely generate the patch with cocci. (Ander)
      Signed-off-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5cec258b
  29. 09 12月, 2014 1 次提交