summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_bufmgr_ttm.c
AgeCommit message (Collapse)Author
2008-02-12[intel] Remove cached reloc data buffer now that it's not a BO.Eric Anholt
It's not worth the extra effort to avoid a free/malloc, and we'd rather auto-size the reloc data buffer at some point so we don't need to have max_relocs.
2008-02-12[intel] Fix type of some more flags variables for uint64_t flags.Eric Anholt
Harmless since we don't yet have any bits above 31 for flags.
2008-02-12[intel] Note when BO map/unmap fail with TTM.Eric Anholt
2008-02-12[intel] Fix INTEL_DEBUG=bufmgr after relocation interface fixups.Eric Anholt
2008-02-05[965] Fix TTM relocation caching overzealousness.Eric Anholt
The failure mode that was a available was: reloc 1 -> target_buf exec: PRESUMED_OFFSET wrong, buffer migrates, r1 entry updated. reloc 2 -> target_buf exec: suppose buffer migrates again. PRESUMED_OFFSET wrong. r2 entry updated. reloc 1 -> target_buf exec: suppose buffer doesn't migrate. PRESUMED_OFFSET right. no relocations performed. r1 has stale pointer at original location. Failures were reported with OGLconform's VBO test and SPECviewperf90, though I haven't confirmed that this fixes it.
2008-02-01Revert "intel: don't apply the relocation optimization if a target"Eric Anholt
This reverts commit e2cb905bc6e23eaafaeeb2abdc9480e70959ee3f. It was a reversion of an optimization hidden as otherwise. pre_target_buf_handle was always NULL, so the optimization was never enabled, rather than fixing the important optimization (resulting in 25-50% performance loss).
2008-01-31intel: don't apply the relocation optimization if a targetXiang, Haihao
buffer is used for a relocatee in the former relocation process then another target buffer is used for this relocatee at the same offset in the current relocation process.
2008-01-24Bufmgr cleanup from intel-batchbuffer branch of 2d driver.Eric Anholt
2008-01-24Clean up comments/dead code from relocation buffer change.Eric Anholt
2008-01-24i915: move to using copy from user for relocationsDave Airlie
2008-01-18[intel] Use a static array for the validation list instead of a linked list.Eric Anholt
Around 10% of a CPU was being wasted to create the linked list which we threw out immediately after passing it to the kernel.
2008-01-15[965] Increase max relocation count, fixing assertions by blender.Eric Anholt
2008-01-14[intel] Delay unmapping of driver-private buffers to reduce map/unmap thrashing.Eric Anholt
Good for a 10-15% improvement to OA.
2008-01-10[intel] Report buffer size when allocating with INTEL_DEBUG=bufmgr and TTM.Eric Anholt
2008-01-08[intel] Add TTM bufmgr debug for type or offset migration of buffers.Eric Anholt
2008-01-04intel: some initialization for dri_bufmgr_ttmXiang, Haihao
2008-01-03[intel] Add a single-entry relocation buffer cache.Eric Anholt
By avoiding the repeated relocation buffer creation/map/unmap/destroy for each new batch buffer, this improves OpenArena framerates by 30%. Caching batch buffers themselves doesn't appear to be a significant performance win over this change.
2008-01-03[intel] Convert relocations to not be cleared out on buffer submit.Eric Anholt
We have two consumers of relocations. One is static state buffers, which want the same relocation every time. The other is the batchbuffer, which gets thrown out immediately after submit. This lets us reduce repeated computation for static state buffers, and clean up the code by moving relocations nearer to where the state buffer is computed.
2008-01-02Revert "[intel] Use the memory type mask containing the caching flags."Eric Anholt
This reverts commit 8bb9ae3693362a302206255c61f512d942df9bbf. Validating our kernel buffers with the caching off in flags but on in mask means that the kernel migrates the buffer to be uncached, which is undesired.
2008-01-02[intel] Use the memory type mask containing the caching flags.Eric Anholt
2008-01-02Set correct flags mask when validating buffers.Keith Packard
The 'mask' value used in the validation operation specifies which of the 'flags' bits are being modified. Buffer validation wants to pass the memory type and access mode (rwx) to the kernel so that the buffer will be placed correctly, and so that the right kind of fence will be created (read vs write). That means we actually want a constant mask for these operations, and not something computed from the bits coming in. The constant we want is DRM_BO_MASK_MEM | DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_EXE.
2007-12-14[intel] Fix uninitialized data in screen-region buffer objects.Eric Anholt
2007-12-14[intel] Remove excessive validation debugging.Eric Anholt
2007-12-14[intel] Initialize debug flag for dri_bufmgrsEric Anholt
2007-12-14[intel] warnings cleanupEric Anholt
2007-12-14[intel] Remove the relocation buffer lists and just cache one per buffer.Eric Anholt
Each buffer object now has a relocation buffer pointer, which contains the relocations for the buffer if there are any. At the point where we have to create a new type of relocation entry, we can change the code over to allowing multiple relocation lists, but trying to anticipate what that'll look like now just increases complexity. This is a 30% performance improvement on 965.
2007-12-13[intel] Remove broken mutex protection from dri_bufmgrs.Eric Anholt
Now that the dri_bufmgr is stored in the context rather than the screen, all access to one is single-threaded anyway.
2007-12-13[intel] Enable INTEL_DEBUG=bufmgr output in TTM mode as well as classic.Eric Anholt
2007-12-12[intel] Move bufmgr back to context instead of screen, fixing glthreads.Eric Anholt
Putting the bufmgr in the screen is not thread-safe since the emit_reloc changes. It also led to a significant performance hit from pthread usage for the attempted thread-safety (up to 12% of a cpu spent on refcounting protection in single-threaded 965). The motivation had been to allow multi-context bufmgr sharing in classic mode, but it wasn't worth the cost.
2007-12-11Block in kernel waiting for fenceKeith Packard
2007-12-11Use previous buffer offsets to compute proposed relocationsKeith Packard
This takes advantage of the DRM_BO_HINT_PRESUMED_OFFSET change and allows the kernel to avoid mapping and re-writing buffers when relocations occur.
2007-11-30[intel] Move batch bo_unmap from TTM code to shared, and add more asserts.Eric Anholt
2007-11-30[intel] Add failure path printfs to relocation code and some comments.Eric Anholt
2007-11-30[intel] Simplify TTM relocation code by passing around bufmgr struct.Eric Anholt
2007-11-30[intel] Fix the type and naming of the flags/mask args to TTM functions.Eric Anholt
The uint64_t flags (as defined by drm.h) were being used as unsigned ints in many places.
2007-11-30[intel] intel_bufmgr_ttm style sanityEric Anholt
2007-11-09[intel] Move over files that will be shared with 965-fbo work.Eric Anholt