1. 17 Dec, 2015 10 commits
  2. 16 Dec, 2015 16 commits
  3. 14 Dec, 2015 2 commits
  4. 12 Dec, 2015 1 commit
  5. 11 Dec, 2015 6 commits
  6. 10 Dec, 2015 5 commits
    • Rodrigo Vivi's avatar
      drm/i915: Fix random aux transactions failures. · 14e01889
      Rodrigo Vivi authored
      Mainly aux communications on sink_crc
      were failing a lot randomly on recent platforms.
      The first solution was to try to use intel_dp_dpcd_read_wake, but then
      it was suggested to move retries to drm level.
      
      Since drm level was already taking care of retries and didn't want
      to through random retries on that level the second solution was to
      put the retries at aux_transfer layer what was nacked.
      
      So I realized we had so many retries in different places and
      started to organize that a bit. During this organization I noticed
      that we weren't handing at all the case were the message size was
      zeroed. And this was exactly the case that was affecting sink_crc.
      
      Also we weren't respect BSPec who says this size message = 0 or > 20
      are forbidden.
      
      It is a fact that we still have no clue why we are getting this
      forbidden value there. But anyway we need to handle that for now
      so we return -EBUSY and drm level takes care of the retries that
      are already in place.
      
      v2: Print debug messsage when this case is reached as suggested
          by Jani.
      v3: This patch is crucial to make PSR test cases reliably working
          on SKL. So split this patch from the aux re-org series and add
          a FIXME as a promisse to continue that effort besides reminding
          to remove the sleep when that is merged.
      v4: Use a bigger usleep range so kernel doesn't need to be interrupted
          on a exact time, as suggested by Paulo.
          But anyway we should discuss the better time
          ranges on the EBUSY handle re-org at drm level since this one here
          is temporary.
      v5: s/1000,1500/1000, 1500/ (by Paulo).
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Tested-by: Daniel Stone <daniels@collabora.com> # SKL
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1449774747-2772-1-git-send-email-rodrigo.vivi@intel.com
      14e01889
    • Dave Gordon's avatar
      drm/i915: intel_ring_initialized() must be simple and inline · b0366a54
      Dave Gordon authored
      Based on Chris Wilson's patch from 6 months ago, rebased and adapted.
      
      The current implementation of intel_ring_initialized() is too heavyweight;
      it's a non-inlined function that chases several levels of pointers. This
      wouldn't matter too much if it were rarely called, but it's used inside
      the iterator test of for_each_ring() and is therefore called quite
      frequently. So let's make it simple and inline ...
      
      The idea here is to use ring->dev as an indicator showing which engines
      have been initialised and are therefore to be included in iterations that
      use for_each_ring(). This allows us to avoid multiple memory references
      and a (non-inlined) function call on each iteration of each such loop.
      
      	Fixes regression from
      	commit 48d82387
      	Author: Oscar Mateo <oscar.mateo@intel.com>
      	Date:   Thu Jul 24 17:04:23 2014 +0100
      
      	    drm/i915/bdw: Generic logical ring init and cleanup
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDave Gordon <david.s.gordon@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1449586956-32360-2-git-send-email-david.s.gordon@intel.com
      b0366a54
    • Takashi Iwai's avatar
      drm/i915: Add reverse mapping between port and intel_encoder · 0bdf5a05
      Takashi Iwai authored
      This patch adds a reverse mapping from a digital port number to
      intel_encoder object containing the corresponding intel_digital_port.
      It simplifies the query of the encoder a lot.
      
      Note that, even if it's a valid digital port, the dig_port_map[] might
      point still to NULL -- usually it implies a DP MST port.  Due to this
      fact, the NULL check in each place has no WARN_ON() and just skips the
      port.  Once when the situation changes in future, we might introduce
      WARN_ON() for a more strict check.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      0bdf5a05
    • Takashi Iwai's avatar
      drm/i915: Add get_eld audio component · cae666ce
      Takashi Iwai authored
      Implement a new i915_audio_component_ops, get_eld().  It's called by
      the audio driver to fetch the current audio status and ELD of the
      given HDMI/DP port.  It returns the size of expected ELD bytes if it's
      valid, zero if no valid ELD is found, or a negative error code.  The
      current state of audio on/off is stored in the given pointer, too.
      
      Note that the returned size isn't limited to the given max bytes.  If
      the size is greater than the max bytes, it means that only a part of
      ELD has been copied back.
      
      For achieving this implementation, a new field audio_connector is
      added to struct intel_digital_port.  It points to the connector
      assigned to the given digital port.  It's set/reset at each audio
      enable/disable call in intel_audio.c, and protected with av_mutex.
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      cae666ce
    • Maarten Lankhorst's avatar
      drm/i915: Do a better job at disabling primary plane in the noatomic case. · 54a41961
      Maarten Lankhorst authored
      When disable_noatomic is called plane_mask is not correct yet, and
      plane_state->visible = true is left as true after disabling the primary
      plane.
      
      Other planes are already disabled as part of crtc sanitization, only the
      primary is left active. But the plane_mask is not updated here. It gets
      updated during fb takeover in modeset_gem_init, or set to the new value
      on resume.
      
      This means that to disable the primary plane 1 << drm_plane_index(primary)
      needs to be used.
      
      Afterwards because the crtc is no longer active it's forbidden to keep
      plane_state->visible set, or a WARN_ON in
      intel_plane_atomic_calc_changes triggers. There are other code points
      that rely on accurate plane_state->visible too, so make sure the bool is
      cleared.
      
      The other planes are already disabled in intel_sanitize_crtc, so they
      don't have to be handled here.
      
      Cc: stable@vger.kernel.org #v4.3, v4.2?
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92655Tested-by: default avatarTomas Mezzadra <tmezzadra@gmail.com>
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/5652DB88.9070208@linux.intel.comSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      54a41961