Skip to content
  1. Sep 21, 2013
  2. Sep 20, 2013
    • Paulo Zanoni's avatar
      drm/i915: POSTING_READ IPS_CTL before waiting for the vblank · 81c12f6e
      Paulo Zanoni authored
      
      
      Make sure we write to IPS before we actually wait.
      
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      81c12f6e
    • Paulo Zanoni's avatar
      drm/i915: don't disable ERR_INT on the IRQ handler · 6ceeeec0
      Paulo Zanoni authored
      
      
      We currently disable the ERR_INT interrupts while running the IRQ
      handler because we fear that if we do an unclaimed register access
      from inside the IRQ handler we'll keep triggering the IRQ handler
      forever.
      
      The problem is that since we always disable the ERR_INT interrupts at
      the IRQ handler, when we get a FIFO underrun we'll always print both
      messages:
        - "uncleared fifo underrun on pipe A"
        - "Pipe A FIFO underrun"
      
      Because the "was_enabled" variable from
      ivybridge_set_fifo_underrun_reporting will always be false (since we
      disable ERR int at the IRQ handler!).
      
      Instead of actually fixing ivybridge_set_fifo_underrun_reporting,
      let's just remove the "disable ERR_INT during the IRQ handler" code.
      As far as we know we shouldn't really be triggering ERR_INT interrupts
      from the IRQ handler, so if we ever get stuck in the endless loop of
      interrupts we can git-bisect and revert (and we can even bisect and
      revert this patch in case I'm just wrong). As a bonus, our IRQ handler
      is now simpler and a few nanoseconds faster.
      
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      6ceeeec0
    • Jesse Barnes's avatar
      drm/i915/vlv: disable rc6p and rc6pp residency reporting on BYT · 5ffd494b
      Jesse Barnes authored
      
      
      Byt doesn't have rc6p and rc6pp support and even more important the
      the offsets of the residency registers there's something else. So Just
      return a constant 0 to avoid upsetting userspace tools like powertop.
      
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: Explain a bit in the commit message what's going on.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      5ffd494b
    • Jesse Barnes's avatar
      drm/i915/vlv: honor i915_enable_rc6 boot param on VLV · a2b23fe0
      Jesse Barnes authored
      
      
      Disabling it isn't really an option on these platforms, but having it
      available for power comparisons is useful.
      
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      a2b23fe0
    • Ben Widawsky's avatar
      drm/i915: s/HAS_L3_GPU_CACHE/HAS_L3_DPF · 040d2baa
      Ben Widawsky authored
      
      
      We'd only ever used this define to denote whether or not we have the
      dynamic parity feature (DPF) and never to determine whether or not L3
      exists. Baytrail is a good example of where L3 exists, and not DPF.
      
      This patch provides clarify in the code for future use cases which might
      want to actually query whether or not L3 exists.
      
      v2: Add /* DPF == dynamic parity feature */
      
      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>
      040d2baa
    • 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
  3. Sep 19, 2013
  4. Sep 18, 2013
    • Paulo Zanoni's avatar
      drm/i915: check for more ASLC interrupts · 507c1a45
      Paulo Zanoni authored
      
      
      Sometimes I see the "non asle set request??" message on my Haswell
      machine, so I decided to get the spec and see if some bits are missing
      from the mask. We do have some bits missing from the mask, so this
      patch adds them, and the corresponding code to print "unsupported"
      messages just like we do with the other bits we don't support.
      
      But I still see the "non asle set request??" message on my machine :(
      
      Also use the proper ASLC name to indicate the registers we're talking
      about.
      
      v2: - Properly set the new FAILED bits
          - Rename the old FAILED bits
          - Print everything we don't support
      
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      507c1a45
  5. Sep 17, 2013