1. 19 Sep, 2013 8 commits
    • Ben Widawsky's avatar
      drm/i915: Do remaps for all contexts · 3ccfd19d
      Ben Widawsky authored
      On both Ivybridge and Haswell, row remapping information is saved and
      restored with context. This means, we never actually properly supported
      the l3 remapping because our sysfs interface is asynchronous (and not
      tied to any context), and the known faulty HW would be reused by the
      next context to run.
      
      Not that due to the asynchronous nature of the sysfs entry, there is no
      point modifying the registers for the existing context. Instead we set a
      flag for all contexts to load the correct remapping information on the
      next run. Interested clients can use debugfs to determine whether or not
      the row has been remapped.
      
      One could propose at this point that we just do the remapping in the
      kernel. I guess since we have to maintain the sysfs interface anyway,
      I'm not sure how useful it is, and I do like keeping the policy in
      userspace; (it wasn't my original decision to make the
      interface the way it is, so I'm not attached).
      
      v2: Force a context switch when we have a remap on the next switch.
      (Ville)
      Don't let userspace use the interface with disabled contexts.
      
      v3: Don't force a context switch, just let it nop
      Improper context slice remap initialization, 1<<1 instead of 1<<i, but I
      rewrote it to avoid a second round of confusion.
      Error print moved to error path (All Ville)
      Added a comment on why the slice remap initialization happens.
      
      CC: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      3ccfd19d
    • Ben Widawsky's avatar
      drm/i915: Keep a list of all contexts · a33afea5
      Ben Widawsky authored
      I have implemented this patch before without creating a separate list
      (I'm having trouble finding the links, but the messages ids are:
      <1364942743-6041-2-git-send-email-ben@bwidawsk.net>
      <1365118914-15753-9-git-send-email-ben@bwidawsk.net>)
      
      However, the code is much simpler to just use a list and it makes the
      code from the next patch a lot more pretty.
      
      As you'll see in the next patch, the reason for this is to be able to
      specify when a context needs to get L3 remapping. More details there.
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      a33afea5
    • Ben Widawsky's avatar
      drm/i915: Make l3 remapping use the ring · c3787e2e
      Ben Widawsky authored
      Using LRI for setting the remapping registers allows us to stream l3
      remapping information. This is necessary to handle per context remaps as
      we'll see implemented in an upcoming patch.
      
      Using the ring also means we don't need to frob the DOP clock gating
      bits.
      
      v2: Add comment about lack of worry for concurrent register access
      (Daniel)
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      [danvet: Bikeshed the comment a bit by doing a s/XXX/Note - there's
      nothing to fix.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      c3787e2e
    • Ben Widawsky's avatar
      drm/i915: Add second slice l3 remapping · 35a85ac6
      Ben Widawsky authored
      Certain HSW SKUs have a second bank of L3. This L3 remapping has a
      separate register set, and interrupt from the first "slice". A slice is
      simply a term to define some subset of the GPU's l3 cache. This patch
      implements both the interrupt handler, and ability to communicate with
      userspace about this second slice.
      
      v2:  Remove redundant check about non-existent slice.
      Change warning about interrupts of unknown slices to WARN_ON_ONCE
      Handle the case where we get 2 slice interrupts concurrently, and switch
      the tracking of interrupts to be non-destructive (all Ville)
      Don't enable/mask the second slice parity interrupt for ivb/vlv (even
      though all docs I can find claim it's rsvd) (Ville + Bryan)
      Keep BYT excluded from L3 parity
      
      v3: Fix the slice = ffs to be decremented by one (found by Ville). When
      I initially did my testing on the series, I was using 1-based slice
      counting, so this code was correct. Not sure why my simpler tests that
      I've been running since then didn't pick it up sooner.
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      35a85ac6
    • Ben Widawsky's avatar
      drm/i915: Fix HSW parity test · 1c966dd2
      Ben Widawsky authored
      Haswell changed the log registers to be WO, so we can no longer read
      them to determine the programming (which sucks, see later note). For
      now, simply use the cached value, and hope HW doesn't screw us over.
      
      v2: Simplify the logic to avoid an extra !, remove last, and fix the
      buffer offset which broke along the rebase (Ville)
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57441
      CC: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      1c966dd2
    • Daniel Vetter's avatar
      drm/i915: dump crtc timings from the pipe config · 644db711
      Daniel Vetter authored
      I always get royally confused how a modeline with all zeros could
      possible pass the paranoid pipe config checker. Until I realize again
      that we only check the crtc timings. So dump the crtc timings for the
      adjusted mode.
      
      This will be even more important for 3D support where the crtc timings
      are markedly different from the input modeline if we have
      frame-by-frame 3d output enabled.
      
      Cc: Damien Lespiau <damien.lespiau@intel.com>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      644db711
    • Jani Nikula's avatar
      drm/i915: register backlight device also when backlight class is a module · 912e8b12
      Jani Nikula authored
      Ville and I were wondering why his laptop was missing the
      intel_backlight sysfs interface. Turns out we never register it when
      CONFIG_BACKLIGHT_CLASS_DEVICE=m. This has been broken ever since the
      i915 native backlight interface was added.
      
      CC: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      912e8b12
    • Paulo Zanoni's avatar
      drm/i915: write D_COMP using the mailbox · 515b2392
      Paulo Zanoni authored
      You can't write it using the MCHBAR mirror, the write will just get
      dropped.
      
      This should make us BSpec-compliant, but there's no real bug I could
      reproduce that is fixed by this patch.
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@gmail.com>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      [danvet: Fix spelling mistake in the comment that Damien spotted.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      515b2392
  2. 17 Sep, 2013 14 commits
  3. 16 Sep, 2013 17 commits
  4. 13 Sep, 2013 1 commit