summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common/dri_bufmgr_fake.c
AgeCommit message (Collapse)Author
2008-05-02Add intel_bufmgr_gem for new graphics execution manager.Eric Anholt
2008-04-18i965: initial attempt at fixing the aperture overflowDave Airlie
Makes state emission into a 2 phase, prepare sets things up and accounts the size of all referenced buffer objects. The emit stage then actually does the batchbuffer touching for emitting the objects. There is an assert in dri_emit_reloc if a reloc occurs for a buffer that hasn't been accounted yet.
2008-04-16bufmgr_fake: disable debugging againDave Airlie
2008-04-16intel/fake_bufmgr: Attempt to restrict references to objects in a ↵Dave Airlie
batchbuffer > aperture size. So with compiz on Intel hw with fake bufmgr, opening 4 firefox windows at 1680x1050 and hitting alt-tab, could cause the batchbuffer to try and reference more than the 32MB of RAM allocated. Fix 1: Fix 1 is to pre-verify the list of buffers against the current batchbuffer and if it can't possibly fit in the aperture to flush the batchbuffer to the hardware and try again. If the buffers still can't fit well then you are hosed as I'm not sure there is a nice way to tell anyone. Fix 2: Next problem was that even with a simple check for total < aperture, we ran into fragmentation issues, this meant that half way down a set of buffers, we would fail as no blocks were available. Fix this by nuking the memory manager from orbit and letting it start again and relayout the blocks in a manner that fits. Fix 3: Finally the initial problem we were seeing was a memcpy to a NULL backing store. We seem to end up with a texture at some point that never gets mapped but ends up with data in it. compiz al-tab icons have this property. So I created a card dirty bit that memcpy's any buffer that is !static and is written to back to memory. This probably is wrong but it makes compiz work for now. Caveats: 965 support is still fail.
2008-03-21intel: Use _mesa_ffs wrapper, and fix a use-after-free with INTEL_DEBUG=buf.Michal Wajdeczko
2008-02-15[intel] Bug #13636: Allow recursive buffer mapping in bufmgr_ttm.Eric Anholt
2008-02-13When mapping, wait on the buffer's fence, not hardware idle, in bufmgr_fakeEric Anholt
2008-02-13Remove O(n^2) debugging code from non-debug path of dri_bufmgr_fake.Eric Anholt
2008-01-18[intel] Fix memory leak with fake bufmgr.Eric Anholt
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.
2007-12-14[intel] Initialize debug flag for dri_bufmgrsEric Anholt
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-13[intel] assert that buffers are not mapped at last unreference.Eric Anholt
bufmgr_fake doesn't care about it, but with ttm we would end up with the buffer remaining referenced until application exit.
2007-12-12[intel] Assert against conflicting relocation emits in bufmgr_fake.cEric Anholt
2007-12-07[965] Convert the driver to dri_bufmgr interface and enable TTM.Eric Anholt
This is currently believed to work but be a significant performance loss. Performance recovery should be soon to follow. The dri_bo_fake_disable_backing_store() call was added to allow backing store disable like bufmgr_fake.c did, which is a significant performance win (though it's missing the no-fence-subdata part). This commit is a squash merge of the 965-ttm branch, which had some history I wanted to avoid pulling due to noisiness and brokenness at many points for git-bisecting.
2007-11-30[intel] Move batch bo_unmap from TTM code to shared, and add more asserts.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-29[i915] Make INTEL_DEBUG=bufmgr actually do things for bufmgr_fake.Eric Anholt
2007-11-16[intel] Add some doxygen notes on what the bufmgr_fake block members mean.Eric Anholt
2007-11-16[intel] Add a simple relocation cache to the fake buffer manager.Eric Anholt
This is required for 965 performance, as it avoids a lot of repeated data uploads of the state caches due to surface offsets in them.
2007-11-16[intel] Assert against 0-sized buffers in dri_bufmgr_fake.c.Eric Anholt
They shouldn't be created, and this often helps catch stupid issues.
2007-11-16[intel] Add support for multiple levels of relocation in bufmgr_fake.Eric Anholt
This is required for 965 support, which has relocations in other places than just the batchbuffer.
2007-10-09i915: fixup up bufmgr to pass num buffers to kernelDave Airlie
remove unneeded entry points
2007-10-04i915: add superioctl support to the ttm codepaths.Dave Airlie
gears now runs for about 10-15 seconds with some artifacts before falling over.
2007-10-03i915: add superioctl initial support inside bufmgr ttmDave Airlie
2007-10-03i915/drmbuf: attempt to push relocations into buffer managerDave Airlie
This moves the relocations into the buffer manager in prepration for a superioctl move.
2007-08-02Don't try to use kernel BO flags in dri_bufmgr_fake internals.Eric Anholt
2007-07-31bufmgr_fake: eliminate the referenced list, which is now just on_hardware.Eric Anholt
2007-07-05bufmgr_fake: Keep the bufmgr lock held while freeing a block.Eric Anholt
2007-07-05Merge branch 'i915-unification' of ↵Eric Anholt
git+ssh://people.freedesktop.org/~anholt/mesa into i915-unification
2007-06-21Improve fake bufmgr debugging, and don't try to migrate static buffers.Eric Anholt
2007-05-31Add buffer manager destroy function.Eric Anholt
2007-05-24Replace the flags/hint arguments to bo_alloc{,_static} with a location mask.Eric Anholt
Now, allocations only take locations, rather than a variety of unused flags. The only interesting flag before was the no_move/no_evict pair for scanout and similar buffers, which the DRI drivers don't use. That will be readded when we get to using this code for display buffer allocation, by adding a pin/unpin call (dynamic pinning/unpinning may be useful for VT switching and root window resizing). This commit changes one instance of DRM_BO_FLAG_MEM_LOCAL with DRM_BO_FLAG_MEM_TT, which appeared to have been unintentional.
2007-05-18Fix another mis-calling of _fence_wait_internal.Eric Anholt
2007-05-18Fix double-counting of low_offset in block->virtual.Eric Anholt
2007-05-18Zero out bufmgr_fake on alloc.Eric Anholt
2007-05-18Dead code elimination and fix bufmgr_fake_wait_idle.Eric Anholt
2007-05-18Fix some use-before-initialize in bufmgr_fake.Eric Anholt
2007-05-16WIP: Replace TTM buffer pool manager with a simplified interface.Eric Anholt
The interface is not solid yet (some simplification to do still, and adjustment for 0-copy), and the drivers are not converted. However, the new interface allows using the same calls to support either a TTM or a classic static allocation backend, with the static backend allowing a more limited feature set.