1. 23 5月, 2016 1 次提交
  2. 20 5月, 2016 4 次提交
  3. 14 5月, 2016 1 次提交
  4. 13 5月, 2016 2 次提交
  5. 11 5月, 2016 1 次提交
  6. 10 5月, 2016 1 次提交
    • V
      drm/i915: Re-enable GGTT earlier during resume on pre-gen6 platforms · ac840ae5
      Ville Syrjälä 提交于
      Move the intel_enable_gtt() call to happen before we touch the GTT
      during resume. Right now it's done way too late. Before
      commit ebb7c78d ("agp/intel-gtt: Only register fake agp driver for gen1")
      it was actually done earlier on account of also getting called from
      the resume hook of the fake agp driver. With the fake agp driver
      no longer getting registered we must move the call up.
      
      The symptoms I've seen on my 830 machine include lowmem corruption,
      other kinds of memory corruption, and straight up hung machine during
      or just after resume. Not really sure what causes the memory corruption,
      but so far I've not seen any with this fix.
      
      I think we shouldn't really need to call this during init, but we have
      been doing that so I've decided to keep the call. However moving that
      call earlier could be prudent as well. Doing it right after the
      intel-gtt probe seems appropriate.
      
      Also tested this on 946gz,elk,ilk and all seemed quite happy with
      this change.
      
      v2: Reorder init_hw vs. enable_hw functions (Chris)
      
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: drm-intel-fixes@lists.freedesktop.org
      Fixes: ebb7c78d ("agp/intel-gtt: Only register fake agp driver for gen1")
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1462559755-353-1-git-send-email-ville.syrjala@linux.intel.comReviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      ac840ae5
  7. 09 5月, 2016 1 次提交
  8. 04 5月, 2016 1 次提交
  9. 29 4月, 2016 1 次提交
  10. 28 4月, 2016 13 次提交
  11. 25 4月, 2016 5 次提交
  12. 20 4月, 2016 2 次提交
  13. 14 4月, 2016 7 次提交
    • P
      drm/i915/mocs: Program MOCS for all engines on init · 0ccdacf6
      Peter Antoine 提交于
      Allow for the MOCS to be programmed for all engines.
      Currently we program the MOCS when the first render batch
      goes through. This works on most platforms but fails on
      platforms that do not run a render batch early,
      i.e. headless servers. The patch now programs all initialised engines
      on init and the RCS is programmed again within the initial batch. This
      is done for predictable consistency with regards to the hardware
      context.
      
      Hardware context loading sets the values of the MOCS for RCS
      and L3CC. Programming them from within the batch makes sure that
      the render context is valid, no matter what the previous state of
      the saved-context was.
      
      v2: posted correct version to the mailing list.
      v3: moved programming to within engine->init_hw() (Chris Wilson)
      v4: code formatting and white-space changes. (Chris Wilson)
      
      Testcase: igt/gem_mocs_settings
      Signed-off-by: NPeter Antoine <peter.antoine@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/1460556205-6644-1-git-send-email-chris@chris-wilson.co.uk
      0ccdacf6
    • C
      drm/i915: Late request cancellations are harmful · aa9b7810
      Chris Wilson 提交于
      Conceptually, each request is a record of a hardware transaction - we
      build up a list of pending commands and then either commit them to
      hardware, or cancel them. However, whilst building up the list of
      pending commands, we may modify state outside of the request and make
      references to the pending request. If we do so and then cancel that
      request, external objects then point to the deleted request leading to
      both graphical and memory corruption.
      
      The easiest example is to consider object/VMA tracking. When we mark an
      object as active in a request, we store a pointer to this, the most
      recent request, in the object. Then we want to free that object, we wait
      for the most recent request to be idle before proceeding (otherwise the
      hardware will write to pages now owned by the system, or we will attempt
      to read from those pages before the hardware is finished writing). If
      the request was cancelled instead, that wait completes immediately. As a
      result, all requests must be committed and not cancelled if the external
      state is unknown.
      
      All that remains of i915_gem_request_cancel() users are just a couple of
      extremely unlikely allocation failures, so remove the API entirely.
      
      A consequence of committing all incomplete requests is that we generate
      excess breadcrumbs and fill the ring much more often with dummy work. We
      have completely undone the outstanding_last_seqno optimisation.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93907Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: stable@vger.kernel.org
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1460565315-7748-16-git-send-email-chris@chris-wilson.co.uk
      aa9b7810
    • C
      drm/i915: Move the mb() following release-mmap into release-mmap · 349f2ccf
      Chris Wilson 提交于
      As paranoia, we want to ensure that the CPU's PTEs have been revoked for
      the object before we return from i915_gem_release_mmap(). This allows us
      to rely on there being no outstanding memory accesses from userspace
      and guarantees serialisation of the code against concurrent access just
      by calling i915_gem_release_mmap().
      
      v2: Reduce the mb() into a wmb() following the revoke.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: "Goel, Akash" <akash.goel@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1460565315-7748-13-git-send-email-chris@chris-wilson.co.uk
      349f2ccf
    • C
      drm/i915: Prevent leaking of -EIO from i915_wait_request() · f4457ae7
      Chris Wilson 提交于
      Reporting -EIO from i915_wait_request() has proven very troublematic
      over the years, with numerous hard-to-reproduce bugs cropping up in the
      corner case of where a reset occurs and the code wasn't expecting such
      an error.
      
      If the we reset the GPU or have detected a hang and wish to reset the
      GPU, the request is forcibly complete and the wait broken. Currently, we
      report either -EAGAIN or -EIO in order for the caller to retreat and
      restart the wait (if appropriate) after dropping and then reacquiring
      the struct_mutex (essential to allow the GPU reset to proceed). However,
      if we take the view that the request is complete (no further work will
      be done on it by the GPU because it is dead and soon to be reset), then
      we can proceed with the task at hand and then drop the struct_mutex
      allowing the reset to occur. This transfers the burden of checking
      whether it is safe to proceed to the caller, which in all but one
      instance it is safe - completely eliminating the source of all spurious
      -EIO.
      
      Of note, we only have two API entry points where we expect that
      userspace can observe an EIO. First is when submitting an execbuf, if
      the GPU is terminally wedged, then the operation cannot succeed and an
      -EIO is reported. Secondly, existing userspace uses the throttle ioctl
      to detect an already wedged GPU before starting using HW acceleration
      (or to confirm that the GPU is wedged after an error condition). So if
      the GPU is wedged when the user calls throttle, also report -EIO.
      
      v2: Split more carefully the change to i915_wait_request() and assorted
      ABI from the reset handling.
      v3: Add a couple of WARN_ON(EIO) to the interruptible modesetting code
      so that we don't start to leak EIO there in future (and break our hang
      resistant modesetting).
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1460565315-7748-9-git-send-email-chris@chris-wilson.co.uk
      Link: http://patchwork.freedesktop.org/patch/msgid/1460565315-7748-1-git-send-email-chris@chris-wilson.co.uk
      f4457ae7
    • C
      drm/i915: Store the reset counter when constructing a request · 299259a3
      Chris Wilson 提交于
      As the request is only valid during the same global reset epoch, we can
      record the current reset_counter when constructing the request and reuse
      it when waiting upon that request in future. This removes a very hairy
      atomic check serialised by the struct_mutex at the time of waiting and
      allows us to transfer those waits to a central dispatcher for all
      waiters and all requests.
      
      PS: With per-engine resets, we obviously cannot assume a global reset
      epoch for the requests - a per-engine epoch makes the most sense. The
      challenge then is how to handle checking in the waiter for when to break
      the wait, as the fine-grained reset may also want to requeue the
      request (i.e. the assumption that just because the epoch changes the
      request is completed may be broken - or we just avoid breaking that
      assumption with the fine-grained resets).
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1460565315-7748-7-git-send-email-chris@chris-wilson.co.uk
      299259a3
    • C
      drm/i915: Tighten reset_counter for reset status · d98c52cf
      Chris Wilson 提交于
      In the reset_counter, we use two bits to track a GPU hang and reset. The
      low bit is a "reset-in-progress" flag that we set to signal when we need
      to break waiters in order for the recovery task to grab the mutex. As
      soon as the recovery task has the mutex, we can clear that flag (which
      we do by incrementing the reset_counter thereby incrementing the gobal
      reset epoch). By clearing that flag when the recovery task holds the
      struct_mutex, we can forgo a second flag that simply tells GEM to ignore
      the "reset-in-progress" flag.
      
      The second flag we store in the reset_counter is whether the
      reset failed and we consider the GPU terminally wedged. Whilst this flag
      is set, all access to the GPU (at least through GEM rather than direct mmio
      access) is verboten.
      
      PS: Fun is in store, as in the future we want to move from a global
      reset epoch to a per-engine reset engine with request recovery.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1460565315-7748-6-git-send-email-chris@chris-wilson.co.uk
      d98c52cf
    • C
      drm/i915: Hide the atomic_read(reset_counter) behind a helper · c19ae989
      Chris Wilson 提交于
      This is principally a little bit of syntatic sugar to hide the
      atomic_read()s throughout the code to retrieve the current reset_counter.
      It also provides the other utility functions to check the reset state on the
      already read reset_counter, so that (in later patches) we can read it once
      and do multiple tests rather than risk the value changing between tests.
      
      v2: Be more strict on converting existing i915_reset_in_progress() over to
      the more verbose i915_reset_in_progress_or_wedged().
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1460565315-7748-4-git-send-email-chris@chris-wilson.co.uk
      c19ae989