1. 30 Oct, 2012 35 commits
  2. 17 Oct, 2012 5 commits
    • Ben Hutchings's avatar
      Linux 3.2.32 · f34e7558
      Ben Hutchings authored
      f34e7558
    • Daniel Vetter's avatar
      drm/i915: clear fencing tracking state when retiring requests · 309c9c15
      Daniel Vetter authored
      commit 15a13bbd upstream.
      
      This fixes a resume regression introduced in
      
      commit 7dd49065
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Wed Mar 21 10:48:18 2012 +0000
      
          drm/i915: Mark untiled BLT commands as fenced on gen2/3
      
      which fixed fencing tracking for untiled blt commands.
      
      A side effect of that patch was that now also untiled objects have a
      non-zero obj->last_fenced_seqno to track when a fence can be set up
      after a pipelined tiling change. Unfortunately this was only cleared
      by the fence setup and teardown code, resulting in tons of untiled but
      inactive objects with non-zero last_fenced_seqno.
      
      Now after resume we completely reset the seqno tracking, both on the
      driver side (by setting dev_priv->next_seqno = 1) and on the hw side
      (by allocating a new hws page, which contains the seqnos). Hilarity
      and indefinite waits ensued from the stale seqnos in
      obj->last_fenced_seqno from before the suspend.
      
      The fix is to properly clear the fencing tracking state like we
      already do for the normal gpu rendering while moving objects off the
      active list.
      Reported-and-tested-by: default avatar"Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-Off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      309c9c15
    • Chris Wilson's avatar
      drm/i915: Mark untiled BLT commands as fenced on gen2/3 · e25aa0dd
      Chris Wilson authored
      commit 7dd49065 upstream.
      
      The BLT commands on gen2/3 utilize the fence registers and so we cannot
      modify any fences for the object whilst those commands are in flight.
      Currently we marked tiled commands as occupying a fence, but forgot to
      restrict the untiled commands from preventing a fence being assigned
      before they were completed.
      
      One side-effect is that we ten have to double check that a fence was
      allocated for a fenced buffer during move-to-active.
      Reported-by: default avatarJiri Slaby <jirislaby@gmail.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43427
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47990Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Testcase: i-g-t/tests/gem_tiled_after_untiled_blt
      Tested-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      [bwh: Backported to 3.2: The nesting of if-statements in the old
       i915_gem_execbuffer_reserve() differs from pin_and_fence_object(),
       so don't move the assignment of obj->pending_fenced_gpu_access but
       adjust the boolean expression as recommended by Daniel Vetter.]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      e25aa0dd
    • Daniel Vetter's avatar
      drm/i915: fix swizzle detection for gen3 · c1852234
      Daniel Vetter authored
      commit c9c4b6f6 upstream.
      
      It looks like the desktop variants of i915 and i945 also have the DCC
      register to control dram channel interleave and cpu side bit6
      swizzling.
      
      Unfortunately internal Cspec/ConfigDB documentation for these ancient chips
      have already been dropped and there seem to be no archives. Also
      somebody thought the swizzling behaviour is surely a worthy secret to
      keep and redacted any mention of these fields from the published Intel
      datasheets.
      
      I suspect the hw engineers were really proud of the page coloring
      they've achieved in their first dual channel dram controller with
      bit17 - after all Bspec explains in great length the optimal layout of
      page frame numbers modulo 4 for the color and depth buffers, too.
      Later on when they've started to work on VT-d they shamefully
      discoverd their stupidity and tried to cover the tracks ...
      
      Tested-by: Daniel Vetter <daniel.vetter@ffwll.ch> (i915g)
      Tested-by: Pavel Ondračka <pavel.ondracka@email.cz> (i945g)
      Tested-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42625Signed-Off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      c1852234
    • Elric Fu's avatar
      xHCI: handle command after aborting the command ring · f3fe0bab
      Elric Fu authored
      commit b63f4053 upstream.
      
      According to xHCI spec section 4.6.1.1 and section 4.6.1.2,
      after aborting a command on the command ring, xHC will
      generate a command completion event with its completion
      code set to Command Ring Stopped at least. If a command is
      currently executing at the time of aborting a command, xHC
      also generate a command completion event with its completion
      code set to Command Abort. When the command ring is stopped,
      software may remove, add, or rearrage Command Descriptors.
      
      To cancel a command, software will initialize a command
      descriptor for the cancel command, and add it into a
      cancel_cmd_list of xhci. When the command ring is stopped,
      software will find the command trbs described by command
      descriptors in cancel_cmd_list and modify it to No Op
      command. If software can't find the matched trbs, we can
      think it had been finished.
      
      This patch should be backported to kernels as old as 3.0, that contain
      the commit 7ed603ec "xhci: Add an
      assertion to check for virt_dev=0 bug." That commit papers over a NULL
      pointer dereference, and this patch fixes the underlying issue that
      caused the NULL pointer dereference.
      Signed-off-by: default avatarElric Fu <elricfu1@gmail.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: default avatarMiroslav Sabljic <miroslav.sabljic@avl.com>
      [bwh: Backported to 3.2: inc_deq() needs an additional 'consumer' argument;
       Jonathan Nieder worked out that this should be false]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      f3fe0bab