summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
Commit message (Collapse)AuthorAgeFilesLines
* r600g: add cs memory usage accounting and limit it v3Jerome Glisse2013-01-312-0/+21
| | | | | | | | | | | | | | | | | | | We are now seing cs that can go over the vram+gtt size to avoid failing flush early cs that goes over 70% (gtt+vram) usage. 70% is use to allow some fragmentation. The idea is to compute a gross estimate of memory requirement of each draw call. After each draw call, memory will be precisely accounted. So the uncertainty is only on the current draw call. In practice this gave very good estimate (+/- 10% of the target memory limit). v2: Remove left over from testing version, remove useless NULL checking. Improve commit message. v3: Add comment to code on memory accounting precision Signed-off-by: Jerome Glisse <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeon/winsys: add dma ring support to winsys v3Jerome Glisse2013-01-286-79/+215
| | | | | | | | | | | | | | | | | | | | Add ring support, you can create a cs for each ring. DMA ring is bit special regarding relocation as you must emit as much relocation as there is use of the buffer. v2: - Improved comment on relocation changes - Use a single thread to queue cs submittion this simplify driver code while not impacting performances. Rational for this is that you have to wait for all previous submission to have completed so there was never a case while we could have 2 different thread submitting a command stream at the same time. This code just consolidate submission into one single thread per winsys. v3: - Do not use semaphore for empty queue signaling, instead use cond var. This is because it's tricky to maintain an even number of call to semaphore wait and semaphore signal (the number of cs in the stack would for instance make that number vary). Signed-off-by: Jerome Glisse <[email protected]>
* gallium/svga: Make sure -std=gnu99 is set.Johannes Obermayr2013-01-141-1/+3
| | | | | | This is a work-around until configure.ac stops touching CFLAGS. Reviewed-by: Matt Turner <[email protected]>
* r300g: random hyperz cleanupsMarek Olšák2013-01-141-15/+10
|
* Remove hacks for static MakefilesMatt Turner2013-01-1311-44/+0
| | | | | | | | | | | v2: Andreas Boll <[email protected]> - don't remove compatibility with scripts for the old build system v3: Andreas Boll <[email protected]> - remove more obsolete hacks v4: Andreas Boll <[email protected]> - add a previously removed TOP variable to fix vgapi build
* winsys/sw/wayland: Fix build to properly use wayland cflagsPekka Vuorela2013-01-121-1/+1
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59281 Reviewed-by: Andreas Boll <[email protected]>
* Clean up .gitignore filesMatt Turner2013-01-1013-13/+0
|
* winsys/sw/xlib: Convert to automakeMatt Turner2013-01-103-17/+36
|
* winsys/sw/wrapper: Convert to automakeMatt Turner2013-01-103-12/+35
|
* winsys/sw/wayland: Convert to automakeMatt Turner2013-01-103-13/+36
|
* winsys/sw/null: Convert to automakeMatt Turner2013-01-103-16/+35
|
* winsys/sw/fbdev: Convert to automakeMatt Turner2013-01-103-13/+35
|
* winsys/sw/dri: Convert to automakeMatt Turner2013-01-103-13/+35
|
* winsys/sw: Convert to automakeMatt Turner2013-01-103-26/+38
|
* svga/winsys/drm: Convert to automakeMatt Turner2013-01-103-19/+42
|
* nouveau/winsys/drm: Convert to automakeMatt Turner2013-01-103-11/+38
|
* i915/winsys/sw: Convert to automakeMatt Turner2013-01-103-12/+42
|
* i915/winsys/drm: Convert to automakeMatt Turner2013-01-103-13/+39
|
* radeon/winsys: Convert to automakeTom Stellard2013-01-103-15/+16
|
* automake: Convert Gallium target and winsysMatt Turner2013-01-103-12/+2
|
* winsys/radeon: bump the size of relocation hashlistMarek Olšák2013-01-081-2/+2
| | | | This should reduce the number of hash collisions in ETQW.
* radeon/winsys: move radeon family/class identification to winsysJerome Glisse2013-01-073-38/+176
| | | | | | | | Upcoming async dma support rely on winsys knowing about GPU families. Signed-off-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g/radeon/winsys: indentation cleanupJerome Glisse2013-01-072-3/+2
| | | | | | Signed-off-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/radeon: send the END_OF_FRAME flag to the DRMMarek Olšák2013-01-042-2/+9
|
* gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flagMarek Olšák2013-01-041-1/+1
| | | | | | | | | | | | | | | | | Usage with pipe_context: pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME); Usage with st_context_iface: st->flush(st, ST_FLUSH_END_OF_FRAME, NULL); The flag is only a hint for drivers. Radeon will use it for buffer eviction heuristics in the kernel (e.g. for queries like how many frames have passed since a buffer was used). The flag is currently only generated by st/dri on SwapBuffers. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Stéphane Marchesin <[email protected]>
* winsys/radeon: the env var RADEON_NOOP can be used to skip CS ioctlsMarek Olšák2012-12-211-1/+4
|
* winsys/radeon: don't use BIND flags, add a flag for the cache bufmgr insteadMarek Olšák2012-12-122-5/+4
|
* r300g: enable Hyper-Z by default on r500Marek Olšák2012-12-021-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | I fixed the only known bugs on r500 with 0222b2bd4107b9e5cabfbc06c1a6ca3eae. Now there are no piglit regressions with Hyper-Z and all apps I tested seem to work. To summarize how it works: - Only one process can use it at a time. This is a hardware limitation. - The first process to clear a zbuffer gets the exclusive access to use Hyper-Z. - Compositors don't use any zbuffer, so they won't steal it, but some web browsers do, so make sure there's no web browser running if you want your game to use Hyper-Z. - There's no need to restart an app which couldn't get the access to Hyper-Z. Just quit the app which took it, the driver can turn it on for the other app in the middle of rendering. - If an app gets the access to Hyper-Z, it prints "radeon: Acquired Hyper-Z" to stdout. r300-r400: Hyper-Z will be enabled by default on r300-r400 once sufficient testing is done with piglit and Lightsmark at least. Be sure to set the env var RADEON_HYPERZ and run piglit with parameters: -c 0
* scons: Build ws_xlib on Mac OS X.Vinson Lee2012-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes this SCons build error on Mac OS X if X11 is found. NameError: name 'ws_xlib' is not defined: File "SConstruct", line 144: duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html File "scons-2.2.0/SCons/Script/SConscript.py", line 614: return method(*args, **kw) File "scons-2.2.0/SCons/Script/SConscript.py", line 551: return _SConscript(self.fs, *files, **subst_kw) File "scons-2.2.0/SCons/Script/SConscript.py", line 260: exec _file_ in call_stack[-1].globals File "src/SConscript", line 34: SConscript('gallium/SConscript') File "scons-2.2.0/SCons/Script/SConscript.py", line 614: return method(*args, **kw) File "scons-2.2.0/SCons/Script/SConscript.py", line 551: return _SConscript(self.fs, *files, **subst_kw) File "scons-2.2.0/SCons/Script/SConscript.py", line 260: exec _file_ in call_stack[-1].globals File "src/gallium/SConscript", line 135: 'targets/libgl-xlib/SConscript', File "scons-2.2.0/SCons/Script/SConscript.py", line 614: return method(*args, **kw) File "scons-2.2.0/SCons/Script/SConscript.py", line 551: return _SConscript(self.fs, *files, **subst_kw) File "scons-2.2.0/SCons/Script/SConscript.py", line 260: exec _file_ in call_stack[-1].globals File "src/gallium/targets/graw-xlib/SConscript", line 9: ws_xlib, Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: unify transfer functionsMarek Olšák2012-10-111-14/+10
| | | | | | | | | | | | | | "get_transfer + transfer_map" becomes "transfer_map". "transfer_unmap + transfer_destroy" becomes "transfer_unmap". transfer_map must create and return the transfer object and transfer_unmap must destroy it. transfer_map is successful if the returned buffer pointer is not NULL. If transfer_map fails, the pointer to the transfer object remains unchanged (i.e. doesn't have to be NULL). Acked-by: Brian Paul <[email protected]>
* winsys/radeon: fix relocs cachingVadim Girlin2012-09-192-8/+6
| | | | | | | | | | | Don't cache pointers to elements of reallocatable array. In some circumstances it caused false cache hits resulting in incorrect command stream and gpu lockup. Note: This is a candidate for the stable branches. Signed-off-by: Vadim Girlin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* Remove useless checks for NULL before freeingMatt Turner2012-09-051-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same as earlier commit, except for "FREE" This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + FREE (E); + E = NULL; - if (unlikely (E != NULL)) { - FREE(E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; type T; @@ + FREE ((T) E); + E = NULL; - if (unlikely (E != NULL)) { - FREE((T) E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; @@ + FREE (E); - if (unlikely (E != NULL)) { - FREE (E); - } @@ expression E; type T; @@ + FREE ((T) E); - if (unlikely (E != NULL)) { - FREE ((T) E); - } Reviewed-by: Brian Paul <[email protected]>
* Don't cast the return value of malloc/reallocMatt Turner2012-09-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has been generated by the following Coccinelle semantic patch: // Don't cast the return value of malloc/realloc. // // Casting the return value of malloc/realloc only stands to hide // errors. @@ type T; expression E1, E2; @@ - (T) ( _mesa_align_calloc(E1, E2) | _mesa_align_malloc(E1, E2) | calloc(E1, E2) | malloc(E1) | realloc(E1, E2) )
* winsys/radeon: create only one winsys for each fdChristian König2012-09-042-2/+41
| | | | | | | Fixing problems with GLAMOR. Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* gallium/radeon: Don't assign virtual address space for BO that already has one.Michel Dänzer2012-08-161-1/+1
| | | | | | | | We'd end up re-using the old one and throwing away the new one anyway, but only after a roundtrip to the kernel. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* gallium/radeon: Create hole for waste when allocating from va_offset.Michel Dänzer2012-08-161-0/+6
| | | | | | | Otherwise, the wasted area could never be used for an allocation again. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* gallium/radeon: Fix potential address space loss in radeon_bomgr_force_va().Michel Dänzer2012-08-161-6/+13
| | | | | Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* gallium/radeon: Delete uppermost virtual address space hole if it's at the top.Michel Dänzer2012-08-161-1/+12
| | | | | Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* gallium/radeon: Fix losing holes when allocating virtual address space.Michel Dänzer2012-08-161-1/+6
| | | | | | | | | If a hole exactly matches the allocated size plus alignment, we would fail to preserve the alignment as a hole. This would result in never being able to use the alignment area for an allocation again. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* gallium/radeon: Merge holes when freeing virtual address space.Michel Dänzer2012-08-161-7/+38
| | | | | | | | | | Otherwise we'll likely end up with an ever increasing amount of ever smaller holes. Requires keeping the list ordered wrt offsets. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* gallium/radeon: Make va_offset 64 bits wide.Michel Dänzer2012-08-161-1/+1
| | | | | | | | | | Otherwise we'd wrap around after 32 bits. The kernel currently limits GPU virtual address space to 4GB anyway, but that will probably change sooner or later, and this would result in confusing error messages when running out of virtual address space even now. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: implement timestamp query and get_timestamp hookMarek Olšák2012-08-152-0/+28
| | | | Reviewed-by: Alex Deucher <[email protected]>
* configure.ac: bump libdrm_radeon requirement to 2.6.38Marek Olšák2012-08-151-1/+0
|
* winsys/radeon: print error if CS is overflowedMarek Olšák2012-08-151-2/+6
| | | | and don't submit the CS to the kernel.
* radeon/winsys: fix winsys VM handlingChristian König2012-08-081-3/+4
| | | | | | | | | Move releasing the VM area after closing the bo handle. This partially fixes: https://bugs.freedesktop.org/show_bug.cgi?id=45018 Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* scons: Add support for Intel Compiler.Vinson Lee2012-08-011-1/+1
| | | | | | | The patch makes the SCons build with Intel Compiler successful. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* scons: Fix build with clang.Vinson Lee2012-07-251-1/+1
| | | | | Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* r600g: enable streamout by default on r7xx and DRM 2.17.0Marek Olšák2012-06-172-3/+0
| | | | | | Now that it's in Linus's tree. Has anyone had a chance to test streamout on Cayman recently?
* winsys/radeon: enable IB submission to compute rings v2Christian König2012-06-153-7/+15
| | | | | | | | | | | This allows to submit things to the compute only rings on cayman+ v2: rebased on current master and actually make use of the new flag in evergreen_compute.c Signed-off-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* winsys/radeon: Remove unnecessary pipe_thread_destroy in radeon_drm_cs_destroyMaarten Lankhorst2012-06-151-1/+0
| | | | | | | | Fixes crash bug introduced with 210ddf0819b5 fd.o #49198 pthread_detach after a pthread_join is unneeded. Signed-off-by: Maarten Lankhorst <[email protected]> Signed-off-by: Marek Olšák <[email protected]>