summaryrefslogtreecommitdiff
path: root/src/i830_memory.c
AgeCommit message (Collapse)Author
2007-11-01Fix allocation reset for really not free BO allocatorZhenyu Wang
2007-10-30Fix builds without DRIAlan Coopersmith
2007-10-24Adapt to DRM Lockfree and setStatus changes.Thomas Hellstrom
2007-10-16Adapt to libdrm buffer object API changes.Michel Dänzer
2007-10-12Fix failure in tiling setup on non-power-of-two allocations on pre-965.Eric Anholt
2007-10-12Use mprotect on unbound AGP memory to attempt to catch use while unbound.Eric Anholt
This doesn't help with the most common use-while-unbound cases, which are from the hardware side.
2007-10-11Don't double-free the memory manager allocation.Eric Anholt
2007-10-11Update memory manager sizing for the current set of LIFETIME_FIXED bufffers.Eric Anholt
2007-10-11Move tiling fence register setup to bind time instead of allocate time.Eric Anholt
This allows us to allocate tiled buffers in buffer objects. In the process I removed the fence division that we had for tiled buffers on pre-965. If we resurrect that code, it should probably be managed by just dividing all the objects in roughly half and fencing those halves (to reduce the alignment requirement), instead of using giant fences until we run out of space and then trying to deal with scarce space on the last (or not) buffer. Halving our tiled objects would use 6/8 of our fence registers on that hardware.
2007-10-11Allow front/back/depth to move over the lifetime of the server.Eric Anholt
2007-10-11Refuse to allocate LIFETIME_FIXED objects in buffer objects.Eric Anholt
We can't guarantee the offset will stay the same using the current DRM interface, but the correct solution is fixing our code to allow these objects to move. Breaks TTM mode of the DRI driver for now.
2007-10-11In i830_allocate_memory_bo, bind if we control the VT, not on lifetime-fixed.Eric Anholt
2007-10-05Replace setting of LIFETIME_FIXED on cursors with just updating the offsets.Eric Anholt
2007-10-05Don't set overlay registers LIFETIME_FIXED. It always uses the current offset.Eric Anholt
2007-10-05Revert setting of exa_965_state as LIFETIME_FIXED.Eric Anholt
The current offset is used every time in render setup.
2007-10-05Don't leak buffer object allocations in i830_reset_allocations().Eric Anholt
2007-10-05Fix formatting of error message.Eric Anholt
2007-09-27Pin cursor, overlay(no physical) and exa state buffersZhenyu Wang
And cursor mem counting for dri mem manager is not relate to overlay.
2007-09-20Merge remote branch 'origin/master' into buffer-objectsEric Anholt
Conflicts: src/i830.h src/i830_driver.c
2007-08-17Tune acceleration architecture allocator sizes down.Eric Anholt
2007-08-17Replace AA allocator usage with i830_memory.c for RandR rotation.Eric Anholt
This requires EXA 2.2 (server 1.3) for rotated performance with EXA, because the i830_memory.c allocation may not fall within what EXA considers the offscreen area, so the PixmapIsOffscreen hook is needed.
2007-08-17Use i830_memory.c instead of the AA's allocator for XV buffers.Eric Anholt
This should fix issues with XV being allocated into XAA's tiled pixmap cache and resulting bad rendering. Its also brings us closer to being able to shrink the size of the pixmap cache on XAA, which is of limited utility.
2007-08-16Add tiling information to BO layout description.Eric Anholt
2007-08-16Merge branch 'master' into buffer-objectsEric Anholt
Conflicts: src/i830_dri.c src/i830_memory.c
2007-08-10Fix stack-smashing in the last commit.Eric Anholt
2007-08-10Attempt to fix several front buffer tiling failure cases.Eric Anholt
Front buffer tiling is now disabled with G965 and XAA. Some of the acceleration that i830_xaa.c does can't be supported on tiled buffers. Adds a tiling field to struct i830_memory, and uses it instead of separate variables for each potential tiled buffer.
2007-08-10Cleanup tiling and FBC driver output.Jesse Barnes
Remove an extra "FBC enabled" message from i830_memory.c (only report errors if they occur), and don't print the "forcing FBC on" message if tiling was already enabled, as it's redundant and confusing.
2007-08-03Tiled rendering & fbc fixes:Jesse Barnes
- actually enable tiling in DSP(A|B)CNTR if needed - add logic to EXA routines for tiled case (still needs work) - enable/disable fbc on DPMS events (meant moving functions higher in file) - fix fence register pitch programming (use correct pitch instead of kludged value)
2007-08-02Mark DRI buffers as shareable, and pass their buffer handles through the SAREA.Eric Anholt
2007-07-27Pin some buffer objects at creation time, which can't be moved yet.Eric Anholt
A number of other interfaces of ours don't allow buffer offsets to be updated after screeninit. This attempts to catalog why for each one, so that they can be fixed one by one. This happens to restore the EXA offscreen allocator for now, as a fixed-offset object.
2007-07-26Use new drmBOSetPin interface instead of NO_EVICT/NO_MOVE buffers.Eric Anholt
To do this, we have to deal with buffer offsets being set at EnterVT time instead of screen init time. We've wanted to move this direction for a long time, but there are repercussions. The EXA offscreen memory manager has to be disabled, because it can't be moved. That will be replaced by BO-backed pixmaps soon. Also unresolved is whether our moving front/back/depth/texture buffers will break the classic-mode DRI driver. This code doesn't actually work yet.
2007-07-25When TTM is available, use it instead of manual AGP allocations when possible.Eric Anholt
This is a step towards being able to expose buffer objects through the screen private to DRI clients, instead of having them have to use the fake buffer object type. This fails in two ways. First, the kernel memory manager is not currently suitable for doing the physical allocations we need, so we still use AGP for those. Additionally, the DRI lock can't be initialized early enough for us, so these buffer object allocations fail. This will be fixed by improving the DRM interface.
2007-07-09Fix some physical address handling for >4GB addresses.Eric Anholt
The upper bits would have been inappropriately dropped on G33-class hardware, and on G965-class hardware in a 32-bit environment. The only use of physical addresses on these should be for FBC, though, and FBC requires addresses below 4GB. This is unresolved.
2007-07-06FBC and tiling changesJesse Barnes
- change framebuffer option name to "FramebufferCompression" - add new "Tiling" option (controls all tiling, not just front buffer) - add debug message to fb compression enable/disable routines - update man page with new options
2007-07-05Re-add tiling kludge, but only for 965.Jesse Barnes
2007-07-05Remove tiling kludge. May need more fixes for 965.Jesse Barnes
2007-07-03Fixup line length buffer padding, add kludge for front buffer tileJesse Barnes
pitch.
2007-07-02Framebuffer compression changes:Jesse Barnes
- move FBC register definitions to i830_reg.h - add fix from Arjan for 965 depth buffer tiling - add VT switch and clear-at-server-start code for FBC registers
2007-07-02Enable framebuffer compression (use Option "FrameBufferCompression"Jesse Barnes
"true" in your xorg.conf). Should save ~0.5W during typical 2D usage.
2007-06-19Fix left G33 issuesWang Zhenyu
Be sure to check G33 chip type in: - sdvo output - Y-major tile - crt detect - and xaa composite Sorry for that I should have fixed them very earlier...
2007-06-06Enable overlay on G33 class chipsetsWang Zhenyu
Which have to use gfx vm offset fot setup overlay regs.
2007-06-05Add support for the G33, Q33, and Q35 chipsets.Wang Zhenyu
These chipsets require that the hardware status page be referenced by an offset in the GTT rather than a physical memory address, so the X Server allocates it rather than the DRM.
2007-05-02Disable non-working GTT decoding on i830, and fix map/unmap of GTT.Eric Anholt
2007-05-02Fix typo in previous commit with s/XF86_DRI/XF86DRI/Eric Anholt
2007-05-01Bug #10714: Fix build without DRI.Samuel Thibault
2007-04-30Allow physical-memory allocations within stolen memory.Eric Anholt
Because stolen memory happens to be a contiguous block of high system memory, we can just read the GTT entries for it to get physical addresses for our allocations there if needed. This reduces fragmentation of the aperture space, and will often reclaim up to 7 MB of memory that had been left unused since the simplified aperture manager was put in place, but without reintroducing the complexities of the old aperture manager.
2007-04-29Alloc state mem buffer on 965G for xaa rotationWang Zhenyu
965G needs state mem buffer to setup render pipeline. Thanks Barry Scrott for report this.
2007-04-19Eliminate LinearAlloc option and code.Keith Packard
With the fixes to the 2D frame buffer allocation that allows up to 65536 lines of 2D frame buffer in XAA mode, the old linear allocation hacks are no longer necessary.
2007-04-19Fix mem list order and remove extra unbind call when free memoryWang Zhenyu
2007-04-13Fix crash on G965 XAA with LinearAlloc optionWang Zhenyu
We should alloc xaa_linear mem in LinearAlloc case, otherwise we get crash when initializing xf86 fb manager.