An error occurred fetching the project authors.
  1. 08 Aug, 2012 1 commit
    • Chris Wilson's avatar
      drm/i915: Add I915_GEM_PARAM_HAS_SEMAPHORES · 2fedbff9
      Chris Wilson authored
      Userspace tries to estimate the cost of ring switching based on whether
      the GPU and GEM supports semaphores. (If we have multiple rings and no
      semaphores, userspace assumes that the cost of switching rings between
      batches is exorbitant and will endeavour to keep the next batch on the
      active ring - as a coarse approximation to tracking both destination and
      source surfaces.) Currently userspace has to guess whether semaphores
      exist based on the chipset generation and the module parameter,
      i915.semaphores. This is a crude and inaccurate guess as the defaults
      internally depend upon other chipset features being enabled or disabled,
      nor does it extend well into the future. By exporting a HAS_SEMAPHORES
      parameter, we can easily query the driver and obtain an accurate answer.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      2fedbff9
  2. 26 Jul, 2012 1 commit
    • Chris Wilson's avatar
      drm/i915: Export ability of changing cache levels to userspace · e6994aee
      Chris Wilson authored
      By selecting the cache level (essentially whether or not the CPU snoops
      any updates to the bo, and on more recent machines whether it resides
      inside the CPU's last-level-cache) a userspace driver is able to then
      manage all of its memory within buffer objects, if it so desires. This
      enables the userspace driver to accelerate uploads and more importantly
      downloads from the GPU and to able to mix CPU and GPU rendering/activity
      efficiently.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      [danvet: Added code comment about where we plan to stuff platform
      specific cacheing control bits in the ioctl struct.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      e6994aee
  3. 25 Jul, 2012 3 commits
  4. 14 Jun, 2012 2 commits
    • Ben Widawsky's avatar
      drm/i915/context: switch contexts with execbuf2 · 6e0a69db
      Ben Widawsky authored
      Use the rsvd1 field in execbuf2 to specify the context ID associated
      with the workload. This will allow the driver to do the proper context
      switch when/if needed.
      
      v2: Add checks for context switches on rings not supporting contexts.
      Before the code would silently ignore such requests.
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      6e0a69db
    • Ben Widawsky's avatar
      drm/i915/context: create & destroy ioctls · 84624813
      Ben Widawsky authored
      Add the interfaces to allow user space to create and destroy contexts.
      Contexts are destroyed automatically if the file descriptor for the dri
      device is closed.
      
      Following convention as usual here causes checkpatch warnings.
      
      v2: with is_initialized, no longer need to init at create
      drop the context switch on create (daniel)
      
      v3: Use interruptible lock (Chris)
      return -ENODEV in !GEM case (Chris)
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      84624813
  5. 06 Jun, 2012 2 commits
  6. 25 May, 2012 1 commit
    • Ben Widawsky's avatar
      drm/i915: wait render timeout ioctl · 23ba4fd0
      Ben Widawsky authored
      This helps implement GL_ARB_sync but stops short of allowing full blown
      sync objects. Finally we can use the new timed seqno waiting function
      to allow userspace to wait on a buffer object with a timeout. This
      implements that interface.
      
      The IOCTL will take as input a buffer object handle, and a timeout in
      nanoseconds (flags is currently optional but will likely be used for
      permutations of flush operations). Users may specify 0 nanoseconds to
      instantly check.
      
      The wait ioctl with a timeout of 0 reimplements the busy ioctl. With any
      non-zero timeout parameter the wait ioctl will wait for the given number
      of nanoseconds on an object becoming unbusy. Since the wait itself does
      so holding struct_mutex the object may become re-busied before this
      completes. A similar but shorter race condition exists in the busy
      ioctl.
      
      v2: ETIME/ERESTARTSYS instead of changing to EBUSY, and EGAIN (Chris)
      Flush the object from the gpu write domain (Chris + Daniel)
      Fix leaked refcount in good case (Chris)
      Naturally align ioctl struct (Chris)
      
      v3: Drop lock after getting seqno to avoid ugly dance (Chris)
      
      v4: check for 0 timeout after olr check to allow polling (Chris)
      
      v5: Updated the comment. (Chris)
      
      v6: Return -ETIME instead of -EBUSY when timeout_ns is 0 (Daniel)
      Fix the commit message comment to be less ugly (Ben)
      Add a warning to check the return timespec (Ben)
      
      v7: Use DRM_AUTH for the ioctl. (Eugeni)
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      23ba4fd0
  7. 20 Mar, 2012 1 commit
    • Daniel Vetter's avatar
      drm/i915: add HAS_ALIASING_PPGTT parameter for userspace · 777ee96f
      Daniel Vetter authored
      On Sanybridge a few MI read/write commands only work when ppgtt is
      enabled.  Userspace therefore needs to be able to check whether ppgtt
      is enabled. For added hilarity, you need to reset the "use global GTT"
      bit on snb when ppgtt is enabled, otherwise it won't work.  Despite
      what bspec says about automatically using ppgtt ...
      
      Luckily PIPE_CONTROL (the only write cmd current userspace uses) is
      not affected by all this, as tested by tests/gem_pipe_control_store_loop.
      Reviewed-and-tested-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-Off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      777ee96f
  8. 17 Jan, 2012 1 commit
  9. 03 Jan, 2012 2 commits
    • Eric Anholt's avatar
      drm/i915: Add support for resetting the SO write pointers on gen7. · ae662d31
      Eric Anholt authored
      These registers are automatically incremented by the hardware during
      transform feedback to track where the next streamed vertex output
      should go.  Unlike the previous generation, which had a packet for
      setting the corresponding registers to a defined value, gen7 only has
      MI_LOAD_REGISTER_IMM to do so.  That's a secure packet (since it loads
      an arbitrary register), so we need to do it from the kernel, and it
      needs to be settable atomically with the batchbuffer execution so that
      two clients doing transform feedback don't stomp on each others'
      state.
      
      Instead of building a more complicated interface involcing setting the
      registers to a specific value, just set them to 0 when asked and
      userland can tweak its pointers accordingly.
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Reviewed-by: default avatarEugeni Dodonov <eugeni.dodonov@intel.com>
      Reviewed-by: default avatarKenneth Graunke <kenneth@whitecape.org>
      Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
      ae662d31
    • Jesse Barnes's avatar
      drm/i915: add color key support v4 · 8ea30864
      Jesse Barnes authored
      Add new ioctls for getting and setting the current destination color
      key.  This allows for simple overlay display control by matching a color
      key value in the primary plane before blending the overlay on top.
      
      v2: remove unnecessary mutex acquire/release around reg accesses
      v3: add support for full color key management
      v4: fix copy & paste bug in snb_get_colorkey
          don't bother checking min/max values against docs as the docs are likely
          wrong (how could we handle 10bpc surface formats?)
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      8ea30864
  10. 22 Jul, 2011 1 commit
  11. 01 Mar, 2011 1 commit
  12. 20 Dec, 2010 1 commit
  13. 05 Dec, 2010 1 commit
  14. 29 Oct, 2010 1 commit
    • Chris Wilson's avatar
      drm/i915: Only enforce fence limits inside the GTT. · a00b10c3
      Chris Wilson authored
      So long as we adhere to the fence registers rules for alignment and no
      overlaps (including with unfenced accesses to linear memory) and account
      for the tiled access in our size allocation, we do not have to allocate
      the full fenced region for the object. This allows us to fight the bloat
      tiling imposed on pre-i965 chipsets and frees up RAM for real use. [Inside
      the GTT we still suffer the additional alignment constraints, so it doesn't
      magic allow us to render larger scenes without stalls -- we need the
      expanded GTT and fence pipelining to overcome those...]
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      a00b10c3
  15. 21 Oct, 2010 1 commit
  16. 17 Aug, 2010 1 commit
    • Dave Airlie's avatar
      drm: block userspace under allocating buffer and having drivers overwrite it (v2) · 1b2f1489
      Dave Airlie authored
      With the current screwed but its ABI, ioctls for the drm, Linus pointed out that we could allow userspace to specify the allocation size, but we pass it to the driver which then uses it blindly to store a struct. Now if userspace specifies the allocation size as smaller than the driver needs, the driver can possibly overwrite memory.
      
      This patch restructures the driver ioctls so we store the structure size we are expecting, and make sure we allocate at least that size. The copy from/to userspace are still restricted to the size the user specifies, this allows ioctl structs to grow on both sides of the equation.
      
      Up until now we didn't really use the DRM_IOCTL defines in the kernel, so this cleans them up and adds them for nouveau.
      
      v2:
      fix nouveau pushbuf arg (thanks to Ben for pointing it out)
      Reported-by: default avatarLinus Torvalds <torvalds@linuxfoundation.org>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      1b2f1489
  17. 03 Aug, 2010 1 commit
    • Jesse Barnes's avatar
      x86 platform driver: intelligent power sharing driver · aa7ffc01
      Jesse Barnes authored
      Intel Core i3/5 platforms with integrated graphics support both CPU and
      GPU turbo mode.  CPU turbo mode is opportunistic: the CPU will use any
      available power to increase core frequencies if thermal headroom is
      available.  The GPU side is more manual however; the graphics driver
      must monitor GPU power and temperature and coordinate with a core
      thermal driver to take advantage of available thermal and power headroom
      in the package.
      
      The intelligent power sharing (IPS) driver is intended to coordinate
      this activity by monitoring MCP (multi-chip package) temperature and
      power, allowing the CPU and/or GPU to increase their power consumption,
      and thus performance, when possible.  The goal is to maximize
      performance within a given platform's TDP (thermal design point).
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
      aa7ffc01
  18. 01 Jun, 2010 1 commit
  19. 26 May, 2010 1 commit
  20. 06 Jan, 2010 1 commit
  21. 03 Dec, 2009 1 commit
  22. 01 Dec, 2009 2 commits
  23. 05 Nov, 2009 1 commit
    • Daniel Vetter's avatar
      drm/i915: implement drmmode overlay support v4 · 02e792fb
      Daniel Vetter authored
      This implements intel overlay support for kms via a device-specific
      ioctl. Thomas Hellstrom brought up the idea of a general ioctl (on
      dri-devel). We've reached the conclusion that such an infrastructure
      only makes sense when multiple kms overlay implementations exists,
      which atm don't (and it doesn't look like this is gonna change).
      
      Open issues:
      - Runs in sync with the gpu, i.e. unnecessary waiting. I've decided
        to wait on this because the hw tends to hang when changing something
        in this area. I left some dummy functions as infrastructure.
      - polyphase filtering uses a static table.
      - uses uninterruptible sleeps. Unfortunately the alternatives may
        unnecessarily wedged the hw if/when we timeout too early (and
        userspace only overloaded the batch buffers with stuff worth a few
        secs of gpu time).
      
      Changes since v1:
      - fix off-by-one misconception on my side. This fixes fullscreen
        playback.
      Changes since v2:
      - add underrun detection as spec'ed for i965.
      - flush caches properly, fixing visual corruptions.
      Changes since v4:
      - fix up cache flushing of overlay memory regs.
      - killed require_pipe_a logic - it hangs the chip.
      
      Tested-By: diego.abelenda@gmail.com (on a 865G)
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      [anholt: Resolved against the MADVISE ioctl going in before this one]
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      02e792fb
  24. 23 Sep, 2009 1 commit
  25. 17 Sep, 2009 1 commit
  26. 14 May, 2009 1 commit
  27. 08 Apr, 2009 1 commit
    • Eric Anholt's avatar
      drm/i915: Allow tiling of objects with bit 17 swizzling by the CPU. · 280b713b
      Eric Anholt authored
      Save the bit 17 state of the pages when freeing the page list, and
      reswizzle them if necessary when rebinding the pages (in case they were
      swapped out).  Since we have userland with expectations that the swizzle
      enums let it pread and pwrite contents accurately, we can't expose a new
      swizzle enum for bit 17 (which it would have to GTT map to handle), so we
      handle it down in pread and pwrite by swizzling the copy when bit 17 of the
      page address is set.
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      280b713b
  28. 26 Mar, 2009 1 commit
  29. 08 Feb, 2009 1 commit
  30. 29 Dec, 2008 4 commits
  31. 03 Nov, 2008 1 commit