summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
Commit message (Collapse)AuthorAgeFilesLines
* radeonsi: add support for FIJI (v4)Alex Deucher2015-08-141-0/+4
| | | | | | | | | | | | v2: incorporate comments from Marek v3: add missing fiji case in winsys init use tonga raster config (double check this) v4: rebase on harvest patch Reviewed-by: Marek Olšák <[email protected]> (v3) Reviewed-by: Christian König <[email protected]> (v3) Reviewed-by: David Zhang <[email protected]> (v3) Signed-off-by: Alex Deucher <[email protected]>
* winsys/amdgpu: add addrlib support for Fiji (v2)Alex Deucher2015-08-143-1/+11
| | | | | | | | | v2: fix tonga chip check Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: David Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* winsys/amdgpu: add addrlib - texture addressing and alignment calculatorMarek Olšák2015-08-1427-3/+22370
| | | | | | | | | This is an internal project that Catalyst uses and now open source will do too. v2: squashed these commits in: - winsys/amdgpu: fix warnings in addrlib - winsys/amdgpu: set PIPE_CONFIG and NUM_BANKS in tiling_flags
* winsys/amdgpu: add a new winsys for the new kernel driverMarek Olšák2015-08-1411-1/+2342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v2: - lots of changes according to Emil Velikov's comments - implemented radeon_winsys::read_registers v3: - a lot of new work, many of them adapt to libdrm interface changes Squashed patches: winsys/amdgpu: implement radeon_winsys context support winsys/amdgpu: add reference counting for contexts winsys/amdgpu: add userptr support winsys/amdgpu: allocate IBs like normal buffers winsys/amdgpu: add IBs to the buffer list, adapt to interface changes winsys/amdgpu: don't use KMS handles as reloc hash keys winsys/amdgpu: sync buffer accesses to different rings winsys/amdgpu: use dependencies instead of waiting for last fence v2 gallium/radeon: unify buffer_wait and buffer_is_busy in the winsys interface (amdgpu part) winsys/amdgpu: track fences per ring and be thread-safe winsys/amdgpu: simplify waiting on a variable in amdgpu_fence_wait gallium/radeon: allow the winsys to choose the IB size (amdgpu part) winsys/amdgpu: switch to new amdgpu_cs_query_fence_status interface winsys/amdgpu: handle fence and dependencies merge winsys/amdgpu follow libdrm change to move user fence into UMD winsys/amdgpu: use amdgpu_bo_va_op for va map/unmap v2 winsys/amdgpu: use the new tiling flags winsys/amdgpu: switch to new GTT_USWC definition winsys/amdgpu: expose amdgpu_cs_query_reset_state to drivers winsys/amdgpu: fix valgrind warnings winsys/amdgpu: don't use VRAM with APUs that don't have much of it winsys/amdgpu: require LLVM 3.6.1 for VI because of bug fixes there winsys/amdgpu: remove amdgpu_winsys::num_cpus winsys/amdgpu: align BO size to page size winsys/amdgpu: reduce BO cache timeout winsys/amdgpu: remove useless flushing and waiting in amdgpu_bo_set_tiling winsys/amdgpu: use amdgpu_device_handle as a unique device ID instead of fd winsys/amdgpu: use safer access to amdgpu_fence_wait::signalled winsys/amdgpu: allow maximum IB size of 4 MB winsys/amdgpu: add ip_instance into amdgpu_fence gallium/radeon: add RING_COMPUTE instead of RADEON_FLUSH_COMPUTE winsys/amdgpu: set the ring type at CS initilization winsys/amdgpu: query the GART page size from the kernel winsys/amdgpu: correctly wait for shared buffers to become idle winsys/amdgpu: set the amdgpu_cs_fence structure only once at fence creation winsys/amdgpu: add a specific error message for cs_submit -> -ENOMEM winsys/amdgpu: check num_active_ioctls before calling amdgpu_bo_wait_for_idle winsys/amdgpu: clear user fence BO after allocating it winsys/amdgpu: fix user fences winsys/amdgpu: make amdgpu_winsys_create public winsys/amdgpu: remove thread offloading winsys/amdgpu: flatten the amdgpu_cs_context structure and simplify more v4: require libdrm 2.4.63
* winsys/radeon: add a specific error message for cs_submit -> -ENOMEMMarek Olšák2015-08-071-4/+8
| | | | | Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]>
* winsys/radeon: add an interface for contextsMarek Olšák2015-08-071-2/+16
| | | | | | | | | | | | | Same idea as in libdrm_amdgpu. A command stream can only be created for a specific context and it's always submitted to that context. This will mainly be used by amdgpu and it's required by the GPU reset status query too. (radeon only has a basic version of the query and thus doesn't need this) Reviewed-by: Christian König <[email protected]>
* gallium/radeon: unify buffer_wait and buffer_is_busy in the winsys interfaceMarek Olšák2015-08-072-32/+29
| | | | | | The timeout parameter covers both cases. Reviewed-by: Alex Deucher <[email protected]>
* winsys/radeon: loosen up the requirements for how much memory IBs can useMarek Olšák2015-08-061-4/+9
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeon/winsys: increase the IB size for VMMarek Olšák2015-08-064-6/+17
| | | | | | | Luckily, there is a kernel query, so use the size from that. It currently returns 256KB. It can be increased in the kernel. Reviewed-by: Michel Dänzer <[email protected]>
* gallium/radeon: allow the winsys to choose the IB sizeMarek Olšák2015-08-062-3/+4
| | | | | | | Picked from the amdgpu branch. Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* winsys/radeon: don't leak the fd when it is 0Emil Velikov2015-08-011-2/+2
| | | | | | | | | | | | | | Earlier commit added an extra dup(fd) to fix a ZaphodHeads issue. Although it did not consider the (very unlikely) case where we might end up with the valid fd == 0. Fixes: 28dda47ae4d(winsys/radeon: Use dup fd as key in drm-winsys hash table to fix ZaphodHeads.) Cc: 10.6 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Mario Kleiner <[email protected]>
* svga: scons: remove unused HAVE_SYS_TYPES_H defineEmil Velikov2015-07-291-1/+0
| | | | | | | | | There isn't a single instance in mesa that mentions HAVE_SYS_TYPES_H, other than this file. Cc: Jose Fonseca <[email protected]> Acked-by: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* winsys/radeon: implement buffer_unmapMarek Olšák2015-07-232-6/+24
| | | | | | | This has been a no-op due to performance concerns. From now on, drivers should decide when they don't want to unmap, not the winsys. Reviewed-by: Michel Dänzer <[email protected]>
* scons: don't build the kms-dri winsysEmil Velikov2015-07-221-23/+0
| | | | | | | | | Same as previous commit - unused (gbm is not a thing outside the autotools build). v2: Remove trailing HAVE_LIBDRM. Signed-off-by: Emil Velikov <[email protected]>
* android: don't build the kms-dri winsysEmil Velikov2015-07-221-37/+0
| | | | | | | | | | GBM (the only user of kms-dri) is currently not available under Android. Considering we have no way of testing/using this let's not bother building it for now. Cc: Chih-Wei Huang <[email protected]> Cc: Eric Anholt <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* gallium: replace INLINE with inlineIlia Mirkin2015-07-2123-45/+45
| | | | | | | | | | | | | | | | Generated by running: git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g' git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g' git checkout src/gallium/state_trackers/clover/Doxyfile and manual edits to src/gallium/include/pipe/p_compiler.h src/gallium/README.portability to remove mentions of the inline define. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Marek Olšák <[email protected]>
* nouveau: use bool instead of booleanSamuel Pitoiset2015-07-211-1/+1
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* winsys/radeon: use os_wait_until_zero in radeon_bo_set_tilingMarek Olšák2015-07-051-3/+1
|
* winsys/radeon: Use dup fd as key in drm-winsys hash table to fix ZaphodHeads.Mario Kleiner2015-07-031-3/+10
| | | | | | | | | | | | | | Same problem and fix as for nouveau's ZaphodHeads trouble. See patch ... "nouveau: Use dup fd as key in drm-winsys hash table to fix ZaphodHeads." ... for reference. Cc: "10.3 10.4 10.5 10.6" <[email protected]> Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g,radeonsi: implement get_device_reset_statusMarek Olšák2015-07-031-0/+8
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* nouveau: Use dup fd as key in drm-winsys hash table to fix ZaphodHeads.Mario Kleiner2015-06-281-1/+5
| | | | | | | | | | | | | | | | | | The dup'ed fd owned by the nouveau_screen for a device node must also be used as key for the winsys hash table, instead of using the original fd passed in for a screen, to make multi-x-screen ZaphodHeads configurations work on nouveau. The original fd's lifetime differs from that of the nouveau_screen stored in the hash. The hash key is the fd, and in order to compare hash entries we fstat them, so the fd must be around for as long as the screen is. This is an extension of the fix in commit a59f2bb1 (nouveau: dup fd before passing it to device). Cc: "10.3 10.4 10.5 10.6" <[email protected]> Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* winsys/radeon: reduce BO cache timeoutGrigori Goronzy2015-06-241-1/+1
| | | | | | | | | | | | 1000 ms is an extreme value for typical interactive loads. A large cache has some disadvantages. Search for reusable BOs can take a long time and memory might get exhausted. Let's be rather conservative and use half of the old value, 500ms. This is beneficial to some loads on my test system and there are no regressions. Reviewed-by: Marek Olšák <[email protected]>
* winsys/radeon: align BO size to page sizeGrigori Goronzy2015-06-241-0/+6
| | | | | | | | | | | | This is the basic granularity for BO allocations. The alignment also helps with BO reuse by the cached bufmgr. This results in a huge 45% speedup in Metro 2033 Redux on my test system. The game relies on buffer orphaning with very small buffers (hundreds of bytes in size) and that did not work efficiently before. This change may also affect other applications and games. Reviewed-by: Marek Olšák <[email protected]>
* winsys/radeon: Unmap GPU VM address range when destroying BOMichel Dänzer2015-06-243-4/+29
| | | | | | | | | | | | | | But only when doing so is safe according to the RADEON_INFO_VA_UNMAP_WORKING kernel query. This avoids kernel GPU VM address range conflicts when the BO has other references than the GEM handle being closed, e.g. when the BO is shared. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90537 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90873 Cc: "10.5 10.6" <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium: Drop the gallium-specific Android sw winsys.Eric Anholt2015-06-153-346/+0
| | | | | | | This was part of gallium_egl, and we now have the normal libEGL Android winsys support to handle it. Reviewed-by: Emil Velikov <[email protected]>
* vc4: Add support for building on Android.Eric Anholt2015-06-151-0/+34
| | | | | | | | v2: Add a comment explaining why we link libmesa_glsl. Drop warning option from freedreno. Add vc4 to the documentation for BOARD_GPU_DRIVERS. Reviewed-by: Emil Velikov <[email protected]>
* android: add rules to build a gallium_dri.soChih-Wei Huang2015-06-092-0/+72
| | | | | | | This single .so includes all of the enabled gallium drivers. Signed-off-by: Chih-Wei Huang <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* winsys/hgl: Add needed extern "C" to hgl winsysAlexander von Gluck IV2015-05-151-0/+7
| | | | Reviewed-by: Brian Paul <[email protected]>
* util: Move gallium's linked list to utilJason Ekstrand2015-05-084-4/+4
| | | | | | | | | The linked list in gallium is pretty much the kernel list and we would like to have a C-based linked list for all of mesa. Let's not duplicate and just steal the gallium one. Acked-by: Connor Abbott <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* ilo: move intel_winsys.h to coreChia-I Wu2015-05-021-1/+1
| | | | | Add a new subdirectory and start moving files that do not depend on ilo_screen/ilo_context to it.
* winsys/radeon: add a private interface for radeon_surfaceMarek Olšák2015-04-294-18/+184
|
* winsys/radeon: move radeon_winsys.h to drivers/radeonMarek Olšák2015-04-293-613/+2
|
* r600g,radeonsi: add a driver query returning GPU loadMarek Olšák2015-04-282-0/+19
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g,radeonsi: add driver queries for GPU temperature and shader+memory clocksMarek Olšák2015-04-282-1/+23
| | | | Reviewed-by: Alex Deucher <[email protected]>
* Fix a few typosZoë Blade2015-04-271-2/+2
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* winsys/radeon: make radeon_bo_vtbl staticMarek Olšák2015-04-271-2/+2
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* android: use LOCAL_SHARED_LIBRARIES over TARGET_OUT_HEADERSEmil Velikov2015-04-226-14/+7
| | | | | | | | | ... to manage the LIBDRM*_CFLAGS. The former is the recommended approach by the Android build system developers while the latter has been depreciated for quite some time. Cc: "10.4 10.5" <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* i915g: Implement EGL_EXT_image_dma_buf_importStéphane Marchesin2015-04-011-4/+11
| | | | | | | This adds all the plumbing to get EGL_EXT_image_dma_buf_import in i915g. Signed-off-by: Stéphane Marchesin <[email protected]>
* winsys/sw/fbdev: remove unused software winsysEmil Velikov2015-03-215-339/+0
| | | | | | | st/egl was its only user. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]>
* winsys/sw/wayland: remove unused winsysEmil Velikov2015-03-214-363/+0
| | | | | | | st/egl was its only user. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]>
* gallium/sw/kms: trivial cleanupsEmil Velikov2015-03-161-4/+2
| | | | | | | | Remove the forward declaration and make use of the DEBUG_PRINT macro for debug builds. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* ilo: add more convenient intel_bo_{ref,unref}()Chia-I Wu2015-03-061-5/+9
| | | | | They both check for NULL and intel_bo_ref() returns the referenced bo. They replace intel_bo_{reference,unreference}().
* ilo: add intel_bo_set_tiling()Chia-I Wu2015-03-061-39/+33
| | | | | Make intel_winsys_alloc_bo() always allocate a linear bo, and add intel_bo_set_tiling() to set the tiling. Document the purpose of tiling.
* ilo: add some more winsys functionsChia-I Wu2015-03-041-1/+37
| | | | | | Add intel_winsys_get_reset_stats(), intel_winsys_import_userptr(), and intel_bo_map_async(). The latter two are stubs, but we are not going to use them immediately either.
* gallium/sw/kms: fix a type-mismatch warningMarek Olšák2015-02-211-1/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/sw/kms: don't redefine DEBUGMarek Olšák2015-02-211-7/+7
| | | | Reviewed-by: Brian Paul <[email protected]>
* winsys/radeon: test the userptr ioctl to see if it's presentMarek Olšák2015-02-175-19/+35
| | | | | | There is no other way to check for support. Reviewed-by: Christian König <[email protected]>
* winsys/radeon: allow unaligned size for user-memory buffersMarek Olšák2015-02-171-1/+1
| | | | | | This is not required, but being user-friendly doesn't hurt. Reviewed-by: Christian König <[email protected]>
* winsys/radeon: allow mapping a user bufferMarek Olšák2015-02-173-2/+8
| | | | | | OpenGL requires this. Reviewed-by: Christian König <[email protected]>
* winsys/radeon: add user pointer supportChristian König2015-02-172-0/+113
| | | | | Signed-off-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]>