summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/radeon
AgeCommit message (Collapse)Author
2011-01-08r300g: rework command submission and resource space checkingMarek Olšák
The motivation behind this rework is to get some speed by reducing CPU overhead. The performance increase depends on many factors, but it's measurable (I think it's about 10% increase in Torcs). This commit replaces libdrm's radeon_cs_gem with our own implemention. It's optimized specifically for r300g, but r600g could use it as well. Reloc writes and space checking are faster and simpler than their counterparts in libdrm (the time complexity of all the functions is O(1) in nearly all scenarios, thanks to hashing). (libdrm's radeon_bo_gem is still being used in the driver.) It works like this: cs_add_reloc(cs, buf, read_domain, write_domain) adds a new relocation and also adds the size of 'buf' to the used_gart and used_vram winsys variables based on the domains, which are simply or'd for the accounting purposes. The adding is skipped if the reloc is already present in the list, but it accounts any newly-referenced domains. cs_validate is then called, which just checks: used_vram/gart < vram/gart_size * 0.8 The 0.8 number allows for some memory fragmentation. If the validation fails, the pipe driver flushes CS and tries do the validation again, i.e. it validates only that one operation. If it fails again, it drops the operation on the floor and prints some nasty message to stderr. cs_write_reloc(cs, buf) just writes a reloc that has been added using cs_add_reloc. The read_domain and write_domain parameters have been removed, because we already specify them in cs_add_reloc. The space checking has been tested by putting small values in vram/gart_size variables.
2010-12-23r300g: Remove unnecessary header.Vinson Lee
2010-12-22r300g: support B10G10R10A2 render targets only with DRM 2.8.0 or later versionsMarek Olšák
2010-12-05r300g: cleanup winsysMarek Olšák
2010-12-03r300g: use internal BO handle for add_buffer and write_relocMarek Olšák
Small perf improvement in ipers. radeon_drm_get_cs_handle is exactly what this commit tries to avoid in every write_reloc.
2010-11-25r300g/r600g: bump cache manager timeouts to 1sDave Airlie
On lightsmark on my r500 this drop the bufmgr allocations of the sysprof.
2010-11-23gallium/egl: fix r300 vs r600 loadingAlex Deucher
Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=31841
2010-09-26radeong: fix leaksJoakim Sindholt
2010-09-24r300g: make accessing map_list and buffer_handles thread-safeMarek Olšák
NOTE: This is a candidate for the 7.9 branch.
2010-09-24r300g: fixup long-lived BO maps being incorrectly unmapped when flushingMarek Olšák
Based on commit 3ddc714b20ac4e28b80c6f88d1993445fff2262c by Dave Airlie. NOTE: This is a candidate for the 7.9 branch.
2010-09-15r300g: fix buffer reuse issue caused by previous commitDave Airlie
caused by 0b9eb5c9bb03e5134d9a41786178100109e80c5a test run glxgears, resize.
2010-09-15r300g: prevent creating multiple winsys BOs for the same handleMarek Olšák
This fixes a DRM deadlock in the cubestorm xscreensaver, because somehow there must not be 2 different BOs relocated in one CS if both BOs back the same handle. I was told it is impossible to happen, but apparently it is not, or there is something else wrong.
2010-09-13r300g: fix map_bufferMarek Olšák
https://bugs.freedesktop.org/show_bug.cgi?id=30145
2010-09-12pb: add void * for flush ctx to mapping functionsDave Airlie
If the buffer we are attempting to map is referenced by the unsubmitted command stream for this context, we need to flush the command stream, however to do that we need to be able to access the context at the lowest level map function, currently we set the buffer in the toplevel map, but this racy between context. (we probably have a lot more issues than that.) I'll look into a proper solution as suggested by jrfonseca when I get some time.
2010-08-14r300g: Remove unnecessary header.Vinson Lee
2010-08-08r300g: generalize the way we ask for hyperzMarek Olšák
This makes it compatible with the modified DRM interface in drm-radeon-testing. Also, now you need to set RADEON_HYPERZ=1 to be able to use hyperz. It's not bug-free yet.
2010-08-06r300g: do not emit GB_Z_PEQ_CONFIG on non-r500 if DRM < 2.6.0Marek Olšák
2010-08-05r300g: debug_print on startup whether we can use hyper-zMarek Olšák
2010-08-05r300g: implement hyper-z support. (v4)Dave Airlie
This implements fast Z clear, Z compression, and HiZ support for r300->r500 GPUs. It also allows cbzb clears when fast Z clears are being used for the ZB. It requires a kernel with hyper-z support. Thanks to Marek Olšák <maraeo@gmail.com>, who started this off, and Alex Deucher at AMD for providing lots of hints. v2: squashed zmask ram size fix] squashed r300g/blitter: fix Z readback when compressed] v3: rebase around texture changes in master - .1 fix more bits v4: migrated to using u_mm in r300_texture to manage hiz/zmask rams consistently disabled HiZ when using OQ flush z-cache before turning hyper-z off update hyper-z state on dsa state change store depthclearvalue across cbzb clears and replace it afterwards. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-07-25r300g: reject resources from handles which are not large enoughMarek Olšák
The driver gets a buffer and its size in resource_from_handle. It computes the required minimum buffer size from given texture properties, and compares the two sizes. This is to early detect DDX bugs.
2010-07-16r300g: do not make copies of constant buffers, emit them directlyMarek Olšák
2010-07-16r300g: rebuild winsys and command submission to support multiple contextsMarek Olšák
2010-07-10r300g: do not print a rejected CS if RADEON_DUMP_CS is not setMarek Olšák
Also print relocation failures on non-debug builds too.
2010-07-08r300g: store/return the stride for winsys_handle in winsysMarek Olšák
2010-06-30r300g: move one flush from winsys to the contextMarek Olšák
This flush happens when changing the tiling flags, and it should really be done in the context. I hope this fixes FDO bug #28630.
2010-06-28Merge branch 'gallium-drm-driver-drescriptor'Jakob Bornecrantz
Conflicts: src/gallium/state_trackers/egl/x11/native_dri2.c src/gallium/state_trackers/egl/x11/native_x11.c src/gallium/state_trackers/egl/x11/native_x11.h src/gallium/state_trackers/xorg/xorg_driver.c src/gallium/winsys/radeon/drm/radeon_drm.c
2010-06-23glhd: Use an environment variable (GALAHAD) to enable. Off by default.Corbin Simpson
2010-06-23radeong: Disable Galahad for now; breaks texturing.Corbin Simpson
2010-06-22targets, radeong: Add Galahad.Corbin Simpson
Currently unconditional and causes segfaults.
2010-06-22r300g: optimize the immediate mode emission path a bitMarek Olšák
2010-06-20r300g: cleanup buffer_{from, get}_handleMarek Olšák
2010-06-14r300g: drop begin_cs/end_csMarek Olšák
I have had a look at the libdrm sources and they just contain more or less the same checking we do in macros, and begin_cs may realloc the CS buffer if we overflow it, which never happens with r300g. So these are pretty much useless. There is a small but measurable performance increase by dropping the two functions.
2010-06-13r300g: replace r300_cs_info with simplier get_cs_free_dwordsMarek Olšák
2010-06-06r300g: Move bootstrap code to targetsJakob Bornecrantz
2010-06-02r300g: use r300_buffer_domain everywhereMarek Olšák
2010-06-02r300g: let the driver determine the GEM domain for buffer_createMarek Olšák
2010-05-26r300g: add get_cs_info winsys entrypoint, abandon check_csMarek Olšák
2010-05-25drm_api: Remove type argument from create screen callbackJakob Bornecrantz
With the removal of DRI1 support there where no use of this argument, some drivers didn't even properly check it.
2010-05-16r300g: expose radeon_bo_wait to the driverMarek Olšák
2010-05-13r300g: fix texture transfersMarek Olšák
The regression has first shown up after this state tracker change: b0427bedde80e3189524651a327235bdfddbc613. FDO bug #28082.
2010-05-02r300g: do not validate buffers in check_csMarek Olšák
It's already done in r300_emit_buffer_validate. This also fixes Total Annihilation 3D on debug builds at least.
2010-05-02r300g: cache tiling flags to reduce the number of DRM callsMarek Olšák
2010-04-28radeong: fix scons buildJoakim Sindholt
2010-04-26r300g: fix warnings by using the const qualifierMarek Olšák
See also the libdrm commit af98ccf4dd5dcb1b904ec32b9bd1521e6bf7dda5.
2010-04-26r300g: Add CS table writing.Corbin Simpson
2010-04-26r300g: emit MSPOS regsMarek Olšák
2010-04-20gallium: Fix copy typoJakob Bornecrantz
2010-04-20radeong: Minor clean up of winsysJakob Bornecrantz
Also try to wrap trace around driver on non-debug builds, its free.
2010-04-18r300g: do not tell st that a buffer is referenced by hwMarek Olšák
It saves a few libdrm calls and unnecessary flushes.
2010-04-11r300g: fix mipmapped 3D texturesMarek Olšák
This is a bug in the CS checker causing CS being rejected.