1. 11 Jun, 2014 2 commits
    • Atilla Filiz's avatar
      iio:imu:mpu6050: Fixed segfault in Invensens MPU driver due to null dereference · 07ad1908
      Atilla Filiz authored
      commit b9b3a418 upstream.
      
      The driver segfaults when the kernel boots with device tree as the
      platform data is then not present and the pointer is deferenced without
      checking it is not null.  This patch introduces such a check avoiding the
      crash.
      Signed-off-by: default avatarAtilla Filiz <atilla.filiz@essensium.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      07ad1908
    • Egbert Eich's avatar
      drm/i915: Break encoder->crtc link separately in intel_sanitize_crtc() · b70dd2ea
      Egbert Eich authored
      commit 7f1950fb upstream.
      
      Depending on the SDVO output_flags SDVO may have multiple connectors
      linking to the same encoder (in intel_connector->encoder->base).
      Only one of those connectors should be active (ie link to the encoder
      thru drm_connector->encoder).
      If intel_connector_break_all_links() is called from intel_sanitize_crtc()
      we may break the crtc connection of an encoder thru an inactive connector
      in which case intel_connector_break_all_links() will not be called again
      for the active connector if this happens to come later in the list due to:
          if (connector->encoder->base.crtc != &crtc->base)
                                       continue;
      in intel_sanitize_crtc().
      This will however leave the drm_connector->encoder linkage for this
      active connector in place. Subsequently this will cause multiple
      warnings in intel_connector_check_state() to trigger and the driver
      will eventually die in drm_encoder_crtc_ok() (because of crtc == NULL).
      
      To avoid this remove intel_connector_break_all_links() and move its
      code to its two calling functions: intel_sanitize_crtc() and
      intel_sanitize_encoder().
      This allows to implement the link breaking more flexibly matching
      the surrounding code: ie. in intel_sanitize_crtc() we can break the
      crtc link separatly after the links to the encoders have been
      broken which avoids above problem.
      
      This regression has been introduced in:
      
      commit 24929352
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Mon Jul 2 20:28:59 2012 +0200
      
          drm/i915: read out the modeset hw state at load and resume time
      
      so goes back to the very beginning of the modeset rework.
      
      v2: This patch takes care of the concernes voiced by Chris Wilson
      and Daniel Vetter that only breaking links if the drm_connector
      is linked to an encoder may miss some links.
      v3: move all encoder handling to encoder loop as suggested by
      Daniel Vetter.
      Signed-off-by: default avatarEgbert Eich <eich@suse.de>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      b70dd2ea
  2. 10 Jun, 2014 38 commits