summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
Commit message (Collapse)AuthorAgeFilesLines
* svga: remove unused vmw_dri1_intersect_src_bbox()Samuel Pitoiset2017-04-131-32/+0
| | | | | | | | | | | | Fixes the following Clang warning. vmw_screen_dri.c:130:1: warning: unused function 'vmw_dri1_intersect_src_bbox' [-Wunused-function] vmw_dri1_intersect_src_bbox(struct drm_clip_rect *dst, ^ 1 warning generated. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/radeon: add HUD queries for GPU temperature and clocksSamuel Pitoiset2017-04-101-1/+6
| | | | | | | | | | | | | | | Only the Radeon kernel driver exposed the GPU temperature and the shader/memory clocks, this implements the same functionality for the AMDGPU kernel driver. These queries will return 0 if the DRM version is less than 3.10, I don't explicitely check the version here because the query codepath is already a bit messy. v2: - rebase on top of master Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* svga: add context pointer to the invalidate surface interfaceCharmaine Lee2017-04-074-16/+19
| | | | | | | | | | | | | | With this patch, we will specify the current context when we invalidate the surface before the surface is put back to the recycled surface pool. This allows the winsys layer to use the specified context to do the invalidation rather than using the last context that referenced the surface. This prevents race condition if the last referenced context is now made current in another thread. Tested with MTT glretrace, NobelClinicianViewer. Reviewed-by: Sinclair Yeh <[email protected]>
* winsys/svga: use c11 thread types/functionsBrian Paul2017-04-073-13/+13
| | | | | | Gallium no longer has wrappers for mutexes and condition variables. Reviewed-by: Charmaine Lee <[email protected]>
* winsys/svga: Resolve command submission buffer contention v3Thomas Hellstrom2017-04-073-2/+38
| | | | | | | | | | | | | | | | | | | | | If two contexts wanted to access the same buffer at the same time, it would end up on two validation lists simultaneously, which might cause a PIPE_ERROR_RETRY when trying to validate it from one context while the other context already had it validated but not yet fenced. In that situation we could spin until the error goes away, or apply various more or less expensive locking schemes to save cpu. Here we use a scheme that briefly locks after fencing but avoids locking on validation in the non-contended case. v2: Make sure we broadcast not only on releasing buffers after fencing, but also after releasing buffers in the pb_validate_validate error path. v3: Don't broadcast on PIPE_ERROR_RETRY because that would increase the chance of starvation. Signed-off-by: Thomas Hellstrom <[email protected]>
* winsys/amdgpu: sparse buffer debugging helpersNicolai Hähnle2017-04-051-0/+61
| | | | Reviewed-by: Marek Olšák <[email protected]>
* winsys/amdgpu: take fences when freeing a backing bufferNicolai Hähnle2017-04-051-3/+11
| | | | | | | | | | | We never add fences to backing buffers during submit. When we free a backing buffer, it must inherit the sparse buffer's fences, so that it doesn't get re-used prematurely via the cache. v2: - remove pipe_mutex_* Reviewed-by: Marek Olšák <[email protected]>
* winsys/amdgpu: add sparse buffers to CSNicolai Hähnle2017-04-052-16/+140
| | | | | | | | | | ... and implement the corresponding fence handling. v2: - add missing bit in amdgpu_bo_is_referenced_by_cs_with_usage - remove pipe_mutex_* Reviewed-by: Marek Olšák <[email protected]>
* winsys/amdgpu: sparse buffer creation / destruction / commitmentNicolai Hähnle2017-04-051-1/+400
| | | | | | | | | | | | | | This is the bulk of the buffer allocation logic. It is fairly simple and stupid. We'll probably want to use e.g. interval trees at some point to keep track of commitments, but Mesa doesn't have an implementation of those yet. v2: - remove pipe_mutex_* - fix total_backing_pages accounting - simplify by using the new VA_OP_CLEAR/REPLACE kernel interface Reviewed-by: Marek Olšák <[email protected]>
* winsys/amdgpu: add sparse buffer data structuresNicolai Hähnle2017-04-052-1/+46
| | | | | | | | v2: - remove pipe_mutex_* - use a simple page commitment array Reviewed-by: Marek Olšák <[email protected]>
* winsys/amdgpu: extend amdgpu_add_fence to allow adding multiple fencesNicolai Hähnle2017-04-052-11/+27
| | | | Reviewed-by: Marek Olšák <[email protected]>
* winsys/amdgpu: build handles and flags list late on submit threadNicolai Hähnle2017-04-052-17/+28
| | | | | | | | | | | This probably has only minor performance effects, but it simplifies some subsequent code slightly. Ideally, it could also be used to simplify the handling of slab buffers in the same way, but unfortunately that's not possible as long as we need indices for relocations. Reviewed-by: Marek Olšák <[email protected]>
* winsys/amdgpu: share common code in amdgpu_add_fence_dependenciesNicolai Hähnle2017-04-051-21/+17
| | | | Reviewed-by: Marek Olšák <[email protected]>
* winsys/amdgpu: extract amdgpu_do_add_real_bufferNicolai Hähnle2017-04-051-8/+18
| | | | | | We will use it for delayed adding of sparse buffers' backing buffers. Reviewed-by: Marek Olšák <[email protected]>
* winsys/radeon: sparse buffers will not be supportedNicolai Hähnle2017-04-051-0/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi/gfx9: fix and enable single-sample CMASK fast clearMarek Olšák2017-03-311-0/+7
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: fix and enable MSAA compressionMarek Olšák2017-03-311-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: fix linear mipmap CPU accessMarek Olšák2017-03-311-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/amdgpu: remove AMDGPU_INFO_NUM_EVICTIONSSamuel Pitoiset2017-03-301-4/+0
| | | | | | | | This is now exposed with libdrm_amdgpu 2.4.76. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/surface: add height pitch for gfx9Leo Liu2017-03-301-0/+1
| | | | | Signed-off-by: Leo Liu <[email protected]> Acked-by: Alex Deucher <[email protected]>
* winsys/amdgpu: set/get BO tiling flags for GFX9Marek Olšák2017-03-301-2/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: add radeon_surf.gfx9.surf_offsetMarek Olšák2017-03-301-0/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: add a workaround for 1D depth texturesMarek Olšák2017-03-301-7/+5
| | | | | | The same workaround is used by Vulkan. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: move pre-GFX9 radeon_bo_metadata.* to u.legacy.*Marek Olšák2017-03-302-56/+62
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/amdgpu: set num_tile_pipes, pipe_interleave_bytes for GFX9Marek Olšák2017-03-301-2/+11
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/amdgpu: wire up new addrlib for GFX9Marek Olšák2017-03-301-1/+399
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/amdgpu: update amdgpu_addr_create for GFX9Marek Olšák2017-03-301-17/+29
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/amdgpu: rename GFX6 surface functionsMarek Olšák2017-03-301-25/+29
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: move pre-GFX9 radeon_surf.* members to radeon_surf.u.legacy.*Marek Olšák2017-03-302-51/+52
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: set the LLVM processor, require LLVM 5.0Marek Olšák2017-03-301-0/+7
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: add GFX9 and VEGA10 enumsMarek Olšák2017-03-301-1/+6
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* amdgpu/addrlib: Rewrite tile mode optmization codeXavi Zhang2017-03-301-7/+5
| | | | Note: remove reference to degrade4Space and use opt4Space instead.
* radeon_drm_bo: explicitly check return value of drmCommandWriteReadJulien Isorce2017-03-201-2/+7
| | | | | | | CID 1313492 Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeon: initialize hole variable before calling container_ofJulien Isorce2017-03-201-1/+1
| | | | | | | | | Like in a few other places in that radeon_drm_bo.c file. CID 715739. Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* winsys/amdgpu: use drmGetDevice2 APIEmil Velikov2017-03-151-2/+2
| | | | | | | | | | | Analogous to previous commit Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98502 Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Tested-by: Mike Lothian <[email protected]>
* winsys/radeon: check null return from radeon_cs_create_fence in cs_flushJulien Isorce2017-03-131-11/+13
| | | | | | | | | | | | Follow-up of patch: "radeon_cs_create_fence: check null return from radeon_winsys_bo_create" radeon_drm_cs_flush radeon_cs_create_fence radeon_winsys_bo_create Signed-off-by: Julien Isorce <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* winsys/radeon: check null in radeon_cs_create_fenceJulien Isorce2017-03-131-0/+3
| | | | | | | | | | | | | | Fixes the following segmentation fault: radeon_drm_cs_add_buffer (bo=0x0) at radeon_drm_cs.c -> if (!bo->handle) (gdb) bt 0 radeon_drm_cs_add_buffer (bo=0x0) at radeon_drm_cs.c 1 0x00007fffe73575de in radeon_cs_create_fence radeon_drm_cs.c 2 0x00007fffe7358c48 in radeon_drm_cs_flush radeon_drm_cs.c Signed-off-by: Julien Isorce <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_unlock() with mtx_unlock()Timothy Arceri2017-03-0715-97/+97
| | | | | | | | | | pipe_mutex_unlock() was made unnecessary with fd33a6bcd7f12. Replaced using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_unlock(\([^)]*\)):mtx_unlock(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_lock() with mtx_lock()Timothy Arceri2017-03-0715-65/+65
| | | | | | | | | | replace pipe_mutex_lock() was made unnecessary with fd33a6bcd7f12. Replaced using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_lock(\([^)]*\)):mtx_lock(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_destroy() with mtx_destroy()Timothy Arceri2017-03-077-13/+13
| | | | | | | | | | pipe_mutex_destroy() was made unnecessary with fd33a6bcd7f12. Replace was done with: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_destroy(\([^)]*\)):mtx_destroy(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_init() with mtx_init()Timothy Arceri2017-03-078-16/+16
| | | | | | | | | | pipe_mutex_init() was made unnecessary with fd33a6bcd7f12. Replace was done using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_init(\([^)]*\)):(void) mtx_init(\&\1, mtx_plain):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: remove pipe_static_mutex()Timothy Arceri2017-03-076-6/+6
| | | | | | This was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex with mtx_tTimothy Arceri2017-03-079-15/+15
| | | | | | pipe_mutex was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: drop support for LLVM 3.6 & 3.7Marek Olšák2017-03-061-8/+0
| | | | | | They are too old. Reviewed-by: Dave Airlie <[email protected]>
* haiku/winsys: fix dt prototype argsJerome Duval2017-02-241-1/+2
|
* gallium/u_queue: isolate util_queue_fence implementationMarek Olšák2017-02-222-2/+2
| | | | | | it's cleaner this way. Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/amdgpu: reduce max_alloc_size based on GTT limitsNicolai Hähnle2017-02-211-2/+4
| | | | | | | | | | | | Allocating huge buffers in VRAM is not a problem, but when those buffers start being migrated, the kernel runs into errors because it cannot split those buffer up for moving through GTT. This should fix intermittent failures of GL45-CTS.texture_buffer.texture_buffer_max_size Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use a clever alignment for constant buffer uploadsMarek Olšák2017-02-182-0/+2
| | | | | | This results in a very tiny decrease in lgkm wait cycles. Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/radeon: remove fall-back definesEmil Velikov2017-02-163-47/+0
| | | | | | | Provided by libdrm as of last commit. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: add a HUD query for monitoring the CS thread activityMarek Olšák2017-02-152-0/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>