1. 05 12月, 2014 2 次提交
    • D
      drm/i915: Handle inaccurate time conversion issues · 9cca3068
      Daniel Vetter 提交于
      So apparently jiffies<->nsec<->ktime isn't accurate or something. At
      elast if we timeout there's occasionally still a few hundred us left
      (in a 2 second timeout).
      
      Stuff I've tried and thrown out again:
      - Sampling the before timestamp before jiffies. Doesn't improve test
        path rate at all.
      - Using jiffies. Way to inaccurate, which means way too much drift
        with signals plus automatic ioctl restarting in userspace. In
        hindsight we should have used an absolute timeout, but hey we need
        something for v3 of the i915 gem wait interfaces ;-)
      - Trying to figure out where accuracy gets lost. gl testcase really
        don't care all that much about this (as long as isn't not massively
        off), it's just that the testcase gets a bit upset if it receives an
        EITME with timeout > 0.
      
      So as long as we're in the ballbark it's good enough. So patch
      everything up if we're at most one jiffies off. I get's me a solid
      test again.
      
      This regression is probably introduced in
      
      commit 5ed0bdf2
      Author: Thomas Gleixner <tglx@linutronix.de>
      Date:   Wed Jul 16 21:05:06 2014 +0000
      
          drm: i915: Use nsec based interfaces
      
          Use ktime_get_raw_ns() and get rid of the back and forth timespec
          conversions.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      
      Probably because I'm too lazy to confirm myself and still waiting for
      QA ;-)
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: John Stultz <john.stultz@linaro.org>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82749Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      9cca3068
    • D
      drm/i915: compute wait_ioctl timeout correctly · 7bd0e226
      Daniel Vetter 提交于
      We've lost the +1 required for correct timeouts in
      
      commit 5ed0bdf2
      Author: Thomas Gleixner <tglx@linutronix.de>
      Date:   Wed Jul 16 21:05:06 2014 +0000
      
          drm: i915: Use nsec based interfaces
      
          Use ktime_get_raw_ns() and get rid of the back and forth timespec
          conversions.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      
      So fix this up by reinstating our handrolled _timeout function. While
      at it bother with handling MAX_JIFFIES.
      
      v2: Convert to usecs (we don't care about the accuracy anyway) first
      to avoid overflow issues Dave Gordon spotted.
      
      v3: Drop the explicit MAX_JIFFY_OFFSET check, usecs_to_jiffies should
      take care of that already. It might be a bit too enthusiastic about it
      though.
      
      v4: Chris has a much nicer color, so use his implementation.
      
      This requires to export nsec_to_jiffies from time.c.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Dave Gordon <david.s.gordon@intel.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82749
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: John Stultz <john.stultz@linaro.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Acked-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      7bd0e226
  2. 03 12月, 2014 2 次提交
    • T
      drm/i915: Fix context object leak for legacy contexts · 0794aed3
      Thomas Daniel 提交于
      Dynamic context pinning for LRCs introduced a leak in legacy mode.
      Reinstate context unreference in i915_gem_free_request for legacy contexts.
      
      Leak reported by i-g-t/drv_module_reload fixed by this patch.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86507Signed-off-by: NThomas Daniel <thomas.daniel@intel.com>
      Reviewed-by: John Harrison<John.C.Harrison@Intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0794aed3
    • D
      drm/i915: Disallow pin ioctl completely for kms drivers · d472fcc8
      Daniel Vetter 提交于
      The problem here is that SNA pins batchbuffers to etch out a bit more
      performance. Iirc it started out as a w/a for i830M (which we've
      implemented in the kernel since a long time already). The problem is
      that the pin ioctl wasn't added in
      
      commit d23db88c
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Fri May 23 08:48:08 2014 +0200
      
          drm/i915: Prevent negative relocation deltas from wrapping
      
      Fix this by simply disallowing pinning from userspace so that the
      kernel is in full control of batch placement again. Especially since
      distros are moving towards running X as non-root, so most users won't
      even be able to see any benefits.
      
      UMS support is dead now, but we need this minimal patch for
      backporting. Follow-up patch will remove the pin ioctl code
      completely.
      
      Note to backporters: You must have both
      
      commit b45305fc
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Mon Dec 17 16:21:27 2012 +0100
      
          drm/i915: Implement workaround for broken CS tlb on i830/845
      
      which laned in 3.8 and
      
      commit c4d69da1
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Mon Sep 8 14:25:41 2014 +0100
      
          drm/i915: Evict CS TLBs between batches
      
      which is also marked cc: stable. Otherwise this could introduce a
      regression by disabling the userspace w/a without the kernel w/a being
      fully functional on i830/45.
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=76554#c116
      Cc: stable@vger.kernel.org # requires c4d69da1 and v3.8
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      d472fcc8
  3. 21 11月, 2014 1 次提交
  4. 20 11月, 2014 8 次提交
  5. 14 11月, 2014 1 次提交
    • C
      drm/i915: Make the physical object coherent with GTT · 6a2c4232
      Chris Wilson 提交于
      Currently objects for which the hardware needs a contiguous physical
      address are allocated a shadow backing storage to satisfy the contraint.
      This shadow buffer is not wired into the normal obj->pages and so the
      physical object is incoherent with accesses via the GPU, GTT and CPU. By
      setting up the appropriate scatter-gather table, we can allow userspace
      to access the physical object via either a GTT mmaping of or by rendering
      into the GEM bo. However, keeping the CPU mmap of the shmemfs backing
      storage coherent with the contiguous shadow is not yet possible.
      Fortuituously, CPU mmaps of objects requiring physical addresses are not
      expected to be coherent anyway.
      
      This allows the physical constraint of the GEM object to be transparent
      to userspace and allow it to efficiently render into or update them via
      the GTT and GPU.
      
      v2: Fix leak of pci handle spotted by Ville
      v3: Remove the now duplicate call to detach_phys_object during free.
      v4: Wait for rendering before pwrite. As this patch makes it possible to
      render into the phys object, we should make it correct as well!
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6a2c4232
  6. 08 11月, 2014 4 次提交
  7. 04 11月, 2014 1 次提交
  8. 24 10月, 2014 4 次提交
  9. 03 10月, 2014 1 次提交
  10. 24 9月, 2014 1 次提交
  11. 20 9月, 2014 1 次提交
    • D
      drm/i915: DocBook integration for frontbuffer tracking · b680c37a
      Daniel Vetter 提交于
      I shouldn't ask everyone to do this and fail myself ...
      
      This extracts all the frontbuffer tracking functions into
      intel_frontbuffer.c, adds a DOC overview section and also adds the
      missing kerneldoc for i915_gem_track_fb and also pulls it into the
      same section for convenience.
      
      v2: Don't forget about the header files.
      
      v3: Oops, might check compilation next time around. To make my life
      easier drop the increase_pllclock from set_base_atomic since really,
      it doesn't matter if you see your Oops or kgdb with a tiny bit of lag.
      
      v4: Try to better explain how to actually use this, requested by Paulo
      on irc.
      
      v5: Explain invalidate/flush a bit clearer.
      
      v6: s/business/busyness/
      Acked-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Vandana Kannan <vandana.kannan@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      b680c37a
  12. 19 9月, 2014 4 次提交
  13. 08 9月, 2014 1 次提交
  14. 03 9月, 2014 3 次提交
  15. 20 8月, 2014 1 次提交
  16. 15 8月, 2014 1 次提交
    • O
      drm/i915/bdw: Emission of requests with logical rings · 48e29f55
      Oscar Mateo 提交于
      On a previous iteration of this patch, I created an Execlists
      version of __i915_add_request and asbtracted it away as a
      vfunc. Daniel Vetter wondered then why that was needed:
      
      "with the clean split in command submission I expect every
      function to know wether it'll submit to an lrc (everything in
      intel_lrc.c) or wether it'll submit to a legacy ring (existing
      code), so I don't see a need for an add_request vfunc."
      
      The honest, hairy truth is that this patch is the glue keeping
      the whole logical ring puzzle together:
      
      - i915_add_request is used by intel_ring_idle, which in turn is
        used by i915_gpu_idle, which in turn is used in several places
        inside the eviction and gtt codes.
      - Also, it is used by i915_gem_check_olr, which is littered all
        over i915_gem.c
      - ...
      
      If I were to duplicate all the code that directly or indirectly
      uses __i915_add_request, I'll end up creating a separate driver.
      
      To show the differences between the existing legacy version and
      the new Execlists one, this time I have special-cased
      __i915_add_request instead of adding an add_request vfunc. I
      hope this helps to untangle this Gordian knot.
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      [danvet: Adjust to ringbuf->FIXME_lrc_ctx per the discussion with
      Thomas Daniel.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      48e29f55
  17. 13 8月, 2014 4 次提交