1. 18 4月, 2012 2 次提交
  2. 13 4月, 2012 2 次提交
    • B
      drm/i915: use semaphores for the display plane · 2911a35b
      Ben Widawsky 提交于
      In theory this will have performance and power improvements. Performance
      because we don't need to stall when the scanout BO is busy, and power
      because we don't have to stall when the BO is busy (and the ring can
      even go to sleep if the HW supports it).
      
      v2:
      squash 2 patches into 1 (me)
      un-inline the enable_semaphores function (Daniel)
      remove comment about SNB hangs from i915_gem_object_sync (Chris)
      rename intel_enable_semaphores to i915_semaphore_is_enabled (me)
      removed page flip comment; "no why" (Chris)
      
      To address other comments from Daniel (irc):
      update the comment to say 'vt-d is crap, don't enable semaphores'
        - I think you misinterpreted Chris' comment, it already exists.
      checking out whether we can pageflip on the render ring on ivb (didn't
      work on early silicon)
        - We don't want to enable workarounds for early silicon unless we have
          to.
        - I can't find any references in the docs about this.
      optionally use it if the fb is already busy on the render ring
        - This should be how the code already worked, unless I am
          misunderstanding your meaning.
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2911a35b
    • C
      drm/i915: Reorganise rules for get_fence/put_fence · 9a5a53b3
      Chris Wilson 提交于
      By simplifying the rules to calling get_fence when writing to the
      through the GTT in a tiled manner, and calling put_fence before writing
      to the object through the GTT in a linear manner, the code becomes
      clearer and there is less chance of making a mistake.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      [danvet: fixed up conflict with ppgtt code and spelling in a new
      comment.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9a5a53b3
  3. 01 4月, 2012 1 次提交
  4. 27 3月, 2012 2 次提交
  5. 26 3月, 2012 1 次提交
    • C
      drm/i915: Batch copy_from_user for relocation processing · 1d83f442
      Chris Wilson 提交于
      Originally the code tried to allocate a large enough array to perform
      the copy using vmalloc, performance wasn't great and throughput was
      improved by processing each individual relocation entry separately.
      This too is not as efficient as one would desire. A compromise would be
      to allocate a single page, or to allocate a few entries on the stack,
      and process the copy in batches. The latter gives simpler code and more
      consistent performance due to a lack of heuristic.
      
      x11perf -copywinwin10:	n450/pnv	i3-330m		i5-2520m (cpu)
                     before: 	  249000	 785000		 1280000 (80%)
                       page:	  264000	 896000		 1280000 (65%)
                   on-stack:	  264000	 902000		 1280000 (67%)
      
      v2: Use 512-bytes of stack for batching rather than allocate a page.
      v3: Tidy the code slightly with more descriptive variable names
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1d83f442
  6. 21 3月, 2012 1 次提交
    • D
      drm/i915: implement SNB workaround for lazy global gtt · 149c8407
      Daniel Vetter 提交于
      PIPE_CONTROL on snb needs global gtt mappings in place to workaround a
      hw gotcha. No other commands need such a workaround. Luckily we can
      detect a PIPE_CONTROL commands easily because they have a write_domain
      = I915_GEM_DOMAIN_INSTRUCTION (and nothing else has that).
      
      v2: Binding the target of such a reloc into the global gtt actually
      works instead of binding the source, which is rather pointless ...
      
      v3: Kill a superflous has_global_gtt_mapping assignement noticed by
      Chris Wilson.
      Reviewed-and-tested-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      149c8407
  7. 10 2月, 2012 1 次提交
  8. 09 2月, 2012 1 次提交
  9. 30 1月, 2012 3 次提交
  10. 26 1月, 2012 1 次提交
  11. 04 1月, 2012 3 次提交
  12. 27 12月, 2011 1 次提交
  13. 17 12月, 2011 1 次提交
  14. 22 9月, 2011 1 次提交
    • B
      drm/i915: Dumb down the semaphore logic · c8c99b0f
      Ben Widawsky 提交于
      While I think the previous code is correct, it was hard to follow and
      hard to debug. Since we already have a ring abstraction, might as well
      use it to handle the semaphore updates and compares.
      
      I don't expect this code to make semaphores better or worse, but you
      never know...
      
      v2:
      Remove magic per Keith's suggestions.
      Ran Daniel's gem_ring_sync_loop test on this.
      
      v3:
      Ignored one of Keith's suggestions.
      
      v4:
      Removed some bloat per Daniel's recommendation.
      
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Keith Packard <keithp@keithp.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      c8c99b0f
  15. 22 6月, 2011 1 次提交
    • E
      Revert "drm/i915: Kill GTT mappings when moving from GTT domain" · e92d03bf
      Eric Anholt 提交于
      This reverts commit 4a684a41.
      Userland has always been required to set the object's domain to GTT
      before using it through a GTT mapping, it's not something that the
      kernel is supposed to enforce.  (The pagefault support is so that we
      can handle multiple mappings without userland having to pin across
      them, not so that userland can use GTT after GPU domains without
      telling the kernel).
      
      Fixes 19.2% +/- 0.8% (n=6) performance regression in cairo-gl
      firefox-talos-gfx on my T420 latop.
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      e92d03bf
  16. 23 3月, 2011 1 次提交
    • C
      drm/i915: Disable pagefaults along execbuffer relocation fast path · d4aeee77
      Chris Wilson 提交于
      Along the fast path for relocation handling, we attempt to copy directly
      from the user data structures whilst holding our mutex. This causes
      lockdep to warn about circular lock dependencies if we need to pagefault
      the user pages. [Since when handling a page fault on a mmapped bo, we
      need to acquire the struct mutex whilst already holding the mm
      semaphore, it is then verboten to acquire the mm semaphore when already
      holding the struct mutex. The likelihood of the user passing in the
      relocations contained in a GTT mmaped bo is low, but conceivable for
      extreme pathology.] In order to force the mm to return EFAULT rather
      than handle the pagefault, we therefore need to disable pagefaults
      across the relocation fast path.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: stable@kernel.org
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d4aeee77
  17. 07 3月, 2011 2 次提交
  18. 02 3月, 2011 2 次提交
  19. 22 2月, 2011 3 次提交
    • C
      drm/i915: Use a device flag for non-interruptible phases · ce453d81
      Chris Wilson 提交于
      The code paths for modesetting are growing in complexity as we may need
      to move the buffers around in order to fit the scanout in the aperture.
      Therefore we face a choice as to whether to thread the interruptible status
      through the entire pinning and unbinding code paths or to add a flag to
      the device when we may not be interrupted by a signal. This does the
      latter and so fixes a few instances of modesetting failures under stress.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      ce453d81
    • C
      drm/i915: First try a normal large kmalloc for the temporary exec buffers · 8408c282
      Chris Wilson 提交于
      As we just need a temporary array whilst performing the relocations for
      the execbuffer, first attempt to allocate using kmalloc even if it is
      not of order page-0. This avoids the overhead of remapping the
      discontiguous array and so gives a moderate boost to execution
      throughput.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      8408c282
    • C
      drm/i915: Protect against drm_gem_object not being the first member · c8725226
      Chris Wilson 提交于
      Dave Airlie spotted that we had a potential bug should we ever rearrange
      the drm_i915_gem_object so not the base drm_gem_object was not its first
      member. He noticed that we often convert the return of
      drm_gem_object_lookup() immediately into drm_i915_gem_object and then
      check the result for nullity. This is only valid when the base object is
      the first member and so the superobject has the same address. Play safe
      instead and use the compiler to convert back to the original return
      address for sanity testing.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      c8725226
  20. 07 2月, 2011 1 次提交
  21. 23 1月, 2011 1 次提交
  22. 19 1月, 2011 1 次提交
  23. 14 1月, 2011 3 次提交
  24. 12 1月, 2011 4 次提交