1. 21 3月, 2014 1 次提交
  2. 19 3月, 2014 1 次提交
  3. 16 3月, 2014 1 次提交
    • D
      drm: use anon-inode instead of relying on cdevs · 6796cb16
      David Herrmann 提交于
      DRM drivers share a common address_space across all character-devices of a
      single DRM device. This allows simple buffer eviction and mapping-control.
      However, DRM core currently waits for the first ->open() on any char-dev
      to mark the underlying inode as backing inode of the device. This delayed
      initialization causes ugly conditions all over the place:
        if (dev->dev_mapping)
          do_sth();
      
      To avoid delayed initialization and to stop reusing the inode of the
      char-dev, we allocate an anonymous inode for each DRM device and reset
      filp->f_mapping to it on ->open().
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      6796cb16
  4. 13 3月, 2014 1 次提交
  5. 08 3月, 2014 3 次提交
  6. 06 3月, 2014 6 次提交
    • D
      drm/i915: Make i915_gem_retire_requests_ring() static · cb216aa8
      Damien Lespiau 提交于
      Its last usage outside of i915_gem.c was removed in:
      
        commit 1f70999f
        Author: Chris Wilson <chris@chris-wilson.co.uk>
        Date:   Mon Jan 27 22:43:07 2014 +0000
      
           drm/i915: Prevent recursion by retiring requests when the ring is full
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      cb216aa8
    • C
      drm/i915: Record pid/comm of hanging task · ab0e7ff9
      Chris Wilson 提交于
      After finding the guilty batch and request, we can use it to find the
      process that submitted the batch and then add the culprit into the error
      state.
      
      This is a slightly different approach from Ben's in that instead of
      adding the extra information into the struct i915_hw_context, we use the
      information already captured in struct drm_file which is then referenced
      from the request.
      
      v2: Also capture the workaround buffer for gen2, so that we can compare
          its contents against the intended batch for the active request.
      
      v3: Rebase (Mika)
      v4: Check for null context (Chris)
          checkpatch warnings fixed
      
      Link: http://lists.freedesktop.org/archives/intel-gfx/2013-August/032280.html
      Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (v2)
      Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> (v4)
      Acked-by: NBen Widawsky <ben@bwidawsk.net>
      Cc: Ben Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ab0e7ff9
    • C
      drm/i915: Rely on accurate request tracking for finding hung batches · 8d9fc7fd
      Chris Wilson 提交于
      In the past, it was possible to have multiple batches per request due to
      a stray signal or ENOMEM. As a result we had to scan each active object
      (filtered by those having the COMMAND domain) for the one that contained
      the ACTHD pointer. This was then made more complicated by the
      introduction of ppgtt, whereby ACTHD then pointed into the address space
      of the context and so also needed to be taken into account.
      
      This is a fairly robust approach (though the implementation is a little
      fragile and depends upon the per-generation setup, registers and
      parameters). However, due to the requirements for hangstats, we needed a
      robust method for associating batches with a particular request and
      having that we can rely upon it for finding the associated batch object
      for error capture.
      
      If the batch buffer tracking is not robust enough, that should become
      apparent quite quickly through an erroneous error capture. That should
      also help to make sure that the runtime reporting to userspace is
      robust. It also means that we then report the oldest incomplete batch on
      each ring, which can be useful for determining the state of userspace at
      the time of a hang.
      
      v2: Use i915_gem_find_active_request (Mika)
      
      v3: remove check for ring->get_seqno, split long lines (Ben)
      
      v4: check that context is available (Chris)
          checkpatch warnings fixed
      
      Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
      Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> (v3)
      Cc: Ben Widawsky <benjamin.widawsky@intel.com>
      Reviewed-by: Ben Widawsky <ben@bwidawsk.net> (v3)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8d9fc7fd
    • C
      drm/i915: Reset vma->mm_list after unbinding · 64bf9303
      Chris Wilson 提交于
      In place of true activity counting, we walk the list of vma associated
      with an object managing each on the vm's active/inactive list everytime
      we call move-to-inactive. This depends upon the vma->mm_list being
      cleared after unbinding, or else we run into difficulty when tracking
      the object in multiple vm's - we see a use-after free and corruption of
      the mm_list.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Ben Widawsky <ben@bwidawsk.net>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      64bf9303
    • V
      drm/i915: Don't ban default context when stop_rings!=0 · ccc7bed0
      Ville Syrjälä 提交于
      If we've explicitly stopped the rings for testing purposes, don't ban
      the default context. Fixes kms_flip hang tests.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Acked-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ccc7bed0
    • C
      drm/i915: Accurately track when we mark the hardware as idle/busy · f62a0076
      Chris Wilson 提交于
      We currently call intel_mark_idle() too often, as we do so as a
      side-effect of processing the request queue. However, we the calls to
      intel_mark_idle() are expected to be paired with a call to
      intel_mark_busy() (or else we try to idle the hardware by accessing
      registers that are already disabled). Make the idle/busy tracking
      explicit to prevent the multiple calls.
      
      v2: We can drop some of the complexity in __i915_add_request() as
      queue_delayed_work() already behaves as we want (not requeuing the item
      if it is already in the queue) and mark_busy/mark_idle imply that the
      idle task is inactive.
      
      v3: We do still need to cancel the pending idle task so that it is sent
      again after the current busy load completes (not in the middle of it).
      Reported-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Tested-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f62a0076
  7. 14 2月, 2014 5 次提交
    • D
      drm/i915: Only bind each object rather than for every execbuffer · 8ea99c92
      Daniel Vetter 提交于
      One side-effect of the introduction of ppgtt was that we needed to
      rebind the object into the appropriate vm (and global gtt in some
      peculiar cases). For simplicity this was done twice for every object on
      every call to execbuffer. However, that adds a tremendous amount of CPU
      overhead (rewriting all the PTE for all objects into WC memory) per
      draw. The fix is to push all the decision about which vm to bind into
      and when down into the low-level bind routines through hints rather than
      performing the bind unconditionally in the execbuffer routine.
      
      Note that this is a regression introduced in the full ppgtt feature
      branch, before this we've only done re-bound objects when the relevant
      has_(aliasing_ppgtt|global_gtt)_mapping flag was clear. But since
      that's per-object and not per-vma that optimization broke.
      
      v2: Split out prep work and unrelated changes.
      
      v3: Bring back functional change around PIN_GLOBAL that I've
      accidentally split out.
      
      v4: Remove the temporary hack for the old binding logic to avoid
      bisection issues.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72906
      Tested-by: jianx.zhou@intel.com
      Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
      Cc: Ben Widawsky <benjamin.widawsky@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8ea99c92
    • D
      drm/i915: Directly return the vma from bind_to_vm · 262de145
      Daniel Vetter 提交于
      This is prep work for reworking the object_pin logic. Atm
      it still does a (now redundant) lookup of the vma. The next
      patch will fix this.
      
      Split out from Chris vma-bind rework.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Ben Widawsky <benjamin.widawsky@intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      262de145
    • D
      drm/i915: Simplify i915_gem_object_ggtt_unpin · b287110e
      Daniel Vetter 提交于
      Split out from Chris vma-bind rework.
      
      Jani wondered why this is save, and the reason is that i915_vma_unbind
      does all these checks, too. So they're redundant.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Ben Widawsky <benjamin.widawsky@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b287110e
    • D
      drm/i915: split PIN_GLOBAL out from PIN_MAPPABLE · bf3d149b
      Daniel Vetter 提交于
      With abitrary pin flags it makes sense to split out a "please bind
      this into global gtt" from the "please allocate in the mappable
      range".
      
      Use this unconditionally in our global gtt pin helper since this is
      what its callers want. Later patches will drop PIN_MAPPABLE where it's
      not strictly needed.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bf3d149b
    • D
      drm/i915: Consolidate binding parameters into flags · 1ec9e26d
      Daniel Vetter 提交于
      Anything more than just one bool parameter is just a pain to read,
      symbolic constants are much better.
      
      Split out from Chris' vma-binding rework patch.
      
      v2: Undo the behaviour change in object_pin that Chris spotted.
      
      v3: Split out misplaced hunk to handle set_cache_level errors,
      spotted by Jani.
      
      v4: Keep the current over-zealous binding logic in the execbuffer code
      working with a quick hack while the overall binding code gets shuffled
      around.
      
      v5: Reorder the PIN_ flags for more natural patch splitup.
      
      v6: Pull out the PIN_GLOBAL split-up again.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Ben Widawsky <benjamin.widawsky@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1ec9e26d
  8. 13 2月, 2014 3 次提交
    • C
      drm/i915: Flush GPU rendering with a lockless wait during a pagefault · 6e4930f6
      Chris Wilson 提交于
      Arjan van de Ven reported that on his test machine that he was seeing
      stalls of greater than 1 frame greatly impacting the user experience. He
      tracked this down to being the locked flush during a pagefault as being
      the culprit hogging the struct_mutex and so blocking any other user from
      proceeding. Stalling on a pagefault is bad behaviour on userspace's
      part, for one it means that they are ignoring the coherency rules on
      pointer access through the GTT, but fortunately we can apply the same
      trick as the set-to-domain ioctl to do a lightweight, nonblocking flush
      of outstanding rendering first.
      
      "Prior to the patch it looks like this
      (this one testrun does not show the 20ms+ I've seen occasionally)
      
        4.99 ms     2.36 ms    31360  __wait_seqno i915_wait_seqno i915_gem_object_wait_rendering i915_gem_object_set_to_gtt_domain i915_gem_fault __do_fault handle_
      +pte_fault handle_mm_fault __do_page_fault do_page_fault page_fault
         4.99 ms     2.75 ms   107751  __wait_seqno i915_gem_wait_ioctl drm_ioctl i915_compat_ioctl compat_sys_ioctl ia32_sysret
         4.99 ms     1.63 ms     1666  i915_mutex_lock_interruptible i915_gem_fault __do_fault handle_pte_fault handle_mm_fault __do_page_fault do_page_fault page_fa
      +ult
         4.93 ms     2.45 ms      980  i915_mutex_lock_interruptible intel_crtc_page_flip drm_mode_page_flip_ioctl drm_ioctl i915_compat_ioctl compat_sys_ioctl ia32_
      +sysret
         4.89 ms     2.20 ms     3283  i915_mutex_lock_interruptible i915_gem_wait_ioctl drm_ioctl i915_compat_ioctl compat_sys_ioctl ia32_sysret
         4.34 ms     1.66 ms     1715  i915_mutex_lock_interruptible i915_gem_pwrite_ioctl drm_ioctl i915_compat_ioctl compat_sys_ioctl ia32_sysret
         3.73 ms     3.73 ms       49  i915_mutex_lock_interruptible i915_gem_set_domain_ioctl drm_ioctl i915_compat_ioctl compat_sys_ioctl ia32_sysret
         3.17 ms     0.33 ms      931  i915_mutex_lock_interruptible i915_gem_madvise_ioctl drm_ioctl i915_compat_ioctl compat_sys_ioctl ia32_sysret
         2.97 ms     0.43 ms     1029  i915_mutex_lock_interruptible i915_gem_busy_ioctl drm_ioctl i915_compat_ioctl compat_sys_ioctl ia32_sysret
         2.55 ms     0.51 ms      735  i915_gem_get_tiling drm_ioctl i915_compat_ioctl compat_sys_ioctl ia32_sysret
      
      After the patch it looks like this:
      
         4.99 ms     2.14 ms    22212  __wait_seqno i915_gem_wait_ioctl drm_ioctl i915_compat_ioctl compat_sys_ioctl ia32_sysret
         4.86 ms     0.99 ms    14170  __wait_seqno i915_gem_object_wait_rendering__nonblocking i915_gem_fault __do_fault handle_pte_fault handle_mm_fault __do_page_
      +fault do_page_fault page_fault
         3.59 ms     1.31 ms      325  i915_gem_get_tiling drm_ioctl i915_compat_ioctl compat_sys_ioctl ia32_sysret
         3.37 ms     3.37 ms       65  i915_mutex_lock_interruptible i915_gem_wait_ioctl drm_ioctl i915_compat_ioctl compat_sys_ioctl ia32_sysret
         2.58 ms     2.58 ms       65  i915_mutex_lock_interruptible i915_gem_do_execbuffer.isra.23 i915_gem_execbuffer2 drm_ioctl i915_compat_ioctl compat_sys_ioctl
      +ia32_sysret
         2.19 ms     2.19 ms       65  i915_mutex_lock_interruptible intel_crtc_page_flip drm_mode_page_flip_ioctl drm_ioctl i915_compat_ioctl compat_sys_ioctl ia32_
      +sysret
         2.18 ms     2.18 ms       65  i915_mutex_lock_interruptible i915_gem_busy_ioctl drm_ioctl i915_compat_ioctl compat_sys_ioctl ia32_sysret
         1.66 ms     1.66 ms       65  i915_gem_set_tiling drm_ioctl i915_compat_ioctl compat_sys_ioctl ia32_sysret
      
      It may not look like it, but this is quite a large difference, and I've
      been unable to reproduce > 5 msec delays at all, while before they do
      happen (just not in the trace above)."
      
      gem_gtt_hog on an old Pineview (GMA3150),
      before: 4969.119ms
      after:  4122.749ms
      Reported-by: NArjan van de Ven <arjan.van.de.ven@intel.com>
      Testcase: igt/gem_gtt_hog
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6e4930f6
    • C
      drm/i915: Downgrade *ERROR* message for invalid user input · bd9b6a4e
      Chris Wilson 提交于
      When we detect that the user passed along an invalid handle or object,
      we emit a warning as an aide for debugging. Since these are indeed only
      for debugging user triggerable errors (and the errors are reported back
      to userspace by the errno), the messages should only be at the debug
      level and not claiming that there is a catastrophic error in the
      driver/hardware.
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=74704Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bd9b6a4e
    • D
      drm/i915: Always use INTEL_INFO() to access the device_info structure · 3d13ef2e
      Damien Lespiau 提交于
      If we make sure that all the dev_priv->info usages are wrapped by
      INTEL_INFO(), we can easily modify the ->info field to be structure and
      not a pointer while keeping the const protection in the INTEL_INFO()
      macro.
      
      v2: Rebased onto latest drm-nightly
      Suggested-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3d13ef2e
  9. 05 2月, 2014 2 次提交
  10. 04 2月, 2014 3 次提交
  11. 31 1月, 2014 2 次提交
  12. 28 1月, 2014 2 次提交
    • D
      drm/i915: GEN7_MSG_CONTROL is ivb-only · 6ba844b0
      Daniel Vetter 提交于
      At least I couldn't find it in the Haswell Bspec any more and we've
      tried to test-boot a Haswell machine with num_pipes forced to 0 (i.e.
      hit the PCH_NOP path) and the unclaimed register logic complained.
      
      So restrict this dance to just ivb platforms.
      
      v2: Art pointed out that the bits simply moved on hsw+
      
      v3: Buy code terseneness with a notch of sublety as suggested by
      Chris.
      
      v4: Frob the right bit, spotted by Art.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Arthur Ranyan <arthur.j.runyan@intel.com>
      Cc: Dave Airlie <airlied@gmail.com>
      Reviewed-by: NArt Runyan <arthur.j.runyan@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6ba844b0
    • J
      drm/i915: move module parameters into a struct, in a new file · d330a953
      Jani Nikula 提交于
      With 20+ module parameters, I think referring to them via a struct
      improves clarity over just having a bunch of globals. While at it, move
      the parameter initialization and definitions into a new file
      i915_params.c to reduce clutter in i915_drv.c.
      
      Apart from the ill-named i915_enable_rc6, i915_enable_fbc and
      i915_enable_ppgtt parameters, for which we lose the "i915_" prefix
      internally, the module parameters now look the same both on the kernel
      command line and in code. For example, "i915.modeset".
      
      The downsides of the change are losing static on a couple of variables
      and not having the initialization and module_param_named() right next to
      each other. On the other hand, all module parameters are now defined in
      one place at i915_params.c. Plus you can do this to find all module
      parameter references:
      
      $ git grep "i915\." -- drivers/gpu/drm/i915
      
      v2:
      - move the definitions into a new file
      - s/i915_params/i915/
      - make i915_try_reset i915.reset, for consistency
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d330a953
  13. 26 1月, 2014 1 次提交
  14. 22 1月, 2014 3 次提交
    • C
      drm/i915: Wait for completion of pending flips when starved of fences · 5dce5b93
      Chris Wilson 提交于
      On older generations (gen2, gen3) the GPU requires fences for many
      operations, such as blits. The display hardware also requires fences for
      scanouts and this leads to a situation where an arbitrary number of
      fences may be pinned by old scanouts following a pageflip but before we
      have executed the unpin workqueue. This is unpredictable by userspace
      and leads to random EDEADLK when submitting an otherwise benign
      execbuffer. However, we can detect when we have an outstanding flip and
      so cause userspace to wait upon their completion before finally
      declaring that the system is starved of fences. This is really no worse
      than forcing the GPU to stall waiting for older execbuffer to retire and
      release their fences before we can reallocate them for the next
      execbuffer.
      
      v2: move the test for a pending fb unpin to a common routine for
      later reuse during eviction
      
      Reported-and-tested-by: dimon@gmx.net
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73696Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJon Bloomfield <jon.bloomfield@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5dce5b93
    • B
      drm/i915/ppgtt: Defer request freeing on reset · 1d62beea
      Ben Widawsky 提交于
      We need to defer the free request until the object/vma is capable of
      being freed - or else we have a problem  when we try to destroy the
      context.
      
      The exact same issue is described and fixed here:
      commit e2078043
      Author: Ben Widawsky <ben@bwidawsk.net>
      Date:   Fri Dec 6 14:11:22 2013 -0800
      
          drm/i915: Defer request freeing
      
      I had this fix previously, but decided not to keep it for some reason I
      can no longer remember.
      
      gem_reset_stats is a really good test at hitting the problem.
      
      For the inquisitive:
      [  170.516392] ------------[ cut here ]------------
      [  170.517227] WARNING: CPU: 1 PID: 105 at drivers/gpu/drm/drm_mm.c:578 drm_mm_takedown+0x2e/0x30 [drm]()
      [  170.518064] Memory manager not clean during takedown.
      [  170.518941] CPU: 1 PID: 105 Comm: kworker/1:1 Not tainted 3.13.0-rc4-BEN+ #28
      [  170.519787] Hardware name: Hewlett-Packard HP EliteBook 8470p/179B, BIOS 68ICF Ver. F.02 04/27/2012
      [  170.520662] Call Trace:
      [  170.521517]  [<ffffffff814f0589>] dump_stack+0x4e/0x7a
      [  170.522373]  [<ffffffff81049e6d>] warn_slowpath_common+0x7d/0xa0
      [  170.523227]  [<ffffffff81049edc>] warn_slowpath_fmt+0x4c/0x50
      [  170.524079]  [<ffffffffa06c414e>] drm_mm_takedown+0x2e/0x30 [drm]
      [  170.524934]  [<ffffffffa07213f3>] gen6_ppgtt_cleanup+0x23/0x110
      [i915]
      [  170.525777]  [<ffffffffa07837ed>] ppgtt_release.part.5+0x24/0x29
      [i915]
      [  170.526603]  [<ffffffffa071aaa5>] i915_gem_context_free+0x195/0x1a0
      [i915]
      [  170.527423]  [<ffffffffa071189d>] i915_gem_free_request+0x9d/0xb0
      [i915]
      [  170.528247]  [<ffffffffa0718af9>] i915_gem_reset+0x1f9/0x3f0 [i915]
      [  170.529065]  [<ffffffffa0700cce>] i915_reset+0x4e/0x180 [i915]
      [  170.529870]  [<ffffffffa070829d>] i915_error_work_func+0xcd/0x120
      [i915]
      [  170.530666]  [<ffffffff8106c13a>] process_one_work+0x1fa/0x6d0
      [  170.531453]  [<ffffffff8106c0d8>] ? process_one_work+0x198/0x6d0
      [  170.532230]  [<ffffffff8106c72b>] worker_thread+0x11b/0x3a0
      [  170.532996]  [<ffffffff8106c610>] ? process_one_work+0x6d0/0x6d0
      [  170.533771]  [<ffffffff810743ef>] kthread+0xff/0x120
      [  170.534548]  [<ffffffff810742f0>] ? insert_kthread_work+0x80/0x80
      [  170.535322]  [<ffffffff814f97ac>] ret_from_fork+0x7c/0xb0
      [  170.536089]  [<ffffffff810742f0>] ? insert_kthread_work+0x80/0x80
      [  170.536847] ---[ end trace 3d4c12892e42d58f ]---
      
      v2: Whitespace fix. (Chris)
      
      Note: This is a bug that only hits the ppgtt topic branch but I've
      figured that doing the request cleanup in this order is generally the
      right thing to do.
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      [danvet: Add a code comment to clarify what's actually going on since
      the lifetime rules aroung ppgtt cleanup are ... fuzzy a best atm. Also
      add a note about why we need this.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1d62beea
    • D
      drm/i915: Tune down reset_stat output from ERROR to debug · 86648500
      Daniel Vetter 提交于
      This is user-triggerable and hence we should not allow it to spam
      dmesg. Also, it upsets the nice dmesg tracking piglit does.
      
      Note that this is just extra debugging information, mostly
      unwanted, in case of a hang and that there is a separate message to the
      user giving instructions on how to report a bug for a GPU hang.
      
      v2: Add note as suggests in Chris' reply.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72740
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      86648500
  15. 10 1月, 2014 1 次提交
  16. 19 12月, 2013 1 次提交
    • D
      Revert "drm/i915: Do not allow buffers at offset 0" · bfca0527
      Daniel Vetter 提交于
      This reverts commit 4fe9adbc.
      
      The patch completely lacks a detailed explanation of what exactly
      blows up and how, so is insufficiently justified as a band-aid.
      
      Otoh the justification as a safety measure against userspace botching
      up relocations is also fairly weak: If we want real project we need to
      at least make the gab big enough that the gpu doesn't scribble over
      more important stuff. With 4k screens that would be 32MB.
      
      Also I think this would be much better in conjunction with a (debug)
      switch to disable our use of the scratch page.
      
      Hence revert this.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bfca0527
  17. 18 12月, 2013 4 次提交
    • D
      drm/i915: Reject the pin ioctl on gen6+ · 02f6bccc
      Daniel Vetter 提交于
      Especially with ppgtt this kinda stopped making sense. And if we
      indeed need this to hack around an issue, we need something that also
      works for non-root.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      02f6bccc
    • B
      drm/i915: Use multiple VMs -- the point of no return · 7e0d96bc
      Ben Widawsky 提交于
      As with processes which run on the CPU, the goal of multiple VMs is to
      provide process isolation. Specific to GEN, there is also the ability to
      map more objects per process (2GB each instead of 2Gb-2k total).
      
      For the most part, all the pipes have been laid, and all we need to do
      is remove asserts and actually start changing address spaces with the
      context switch. Since prior to this we've converted the setting of the
      page tables to a streamed version, this is quite easy.
      
      One important thing to point out (since it'd been hotly contested) is
      that with this patch, every context created will have it's own address
      space (provided the HW can do it).
      
      v2: Disable BDW on rebase
      
      NOTE: I tried to make this commit as small as possible. I needed one
      place where I could "turn everything on" and that is here. It could be
      split into finer commits, but I didn't really see much point.
      
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7e0d96bc
    • B
      drm/i915: Do not allow buffers at offset 0 · 4fe9adbc
      Ben Widawsky 提交于
      This is primarily a band aid for an unexplainable error in
      gem_reloc_vs_gpu/forked-faulting-reloc-thrashing. Essentially as soon as
      a relocated buffer (which had a non-zero presumed offset) moved to
      offset 0, something goes bad. Since I have been unable to solve this,
      and potentially this is a good thing to do anyway, since many things can
      accidentally write to offset 0, why not?
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4fe9adbc
    • B
      drm/i915: Defer request freeing · e2078043
      Ben Widawsky 提交于
      With context destruction, we always want to be able to tear down the
      underlying address space. This is invoked on the last unreference to the
      context which could happen before we've moved all objects to the
      inactive list. To enable a clean tear down the address space, make sure
      to process the request free lastly.
      
      Without this change, we cannot guarantee to we don't still have active
      objects in the VM.
      
      As an example of a failing case:
      CTX-A is created, count=1
      CTX-A is used during execbuf
      	does a context switch count = 2
      	and add_request count = 3
      CTX B runs, switches, CTX-A count = 2
      CTX-A is destroyed, count = 1
      retire requests is called
      	free_request from CTX-A, count = 0 <--- free context with active object
      
      As mentioned above, by doing the free request after processing the
      active list, we can avoid this case.
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e2078043