summaryrefslogtreecommitdiff
path: root/src/gallium/winsys
AgeCommit message (Collapse)AuthorFilesLines
2015-07-22android: don't build the kms-dri winsysEmil Velikov1-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 <cwhuang@linux.org.tw> Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-21gallium: replace INLINE with inlineIlia Mirkin23-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 <imirkin@alum.mit.edu> Acked-by: Marek Olšák <marek.olsak@amd.com>
2015-07-21nouveau: use bool instead of booleanSamuel Pitoiset1-1/+1
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-07-05winsys/radeon: use os_wait_until_zero in radeon_bo_set_tilingMarek Olšák1-3/+1
2015-07-03winsys/radeon: Use dup fd as key in drm-winsys hash table to fix ZaphodHeads.Mario Kleiner1-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" <mesa-stable@lists.freedesktop.org> Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2015-07-03r600g,radeonsi: implement get_device_reset_statusMarek Olšák1-0/+8
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-06-28nouveau: Use dup fd as key in drm-winsys hash table to fix ZaphodHeads.Mario Kleiner1-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" <mesa-stable@lists.freedesktop.org> Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-06-24winsys/radeon: reduce BO cache timeoutGrigori Goronzy1-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 <marek.olsak@amd.com>
2015-06-24winsys/radeon: align BO size to page sizeGrigori Goronzy1-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 <marek.olsak@amd.com>
2015-06-24winsys/radeon: Unmap GPU VM address range when destroying BOMichel Dänzer3-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" <mesa-stable@lists.freedesktop.org> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-06-15gallium: Drop the gallium-specific Android sw winsys.Eric Anholt3-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 <emil.l.velikov@gmail.com>
2015-06-15vc4: Add support for building on Android.Eric Anholt1-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 <emil.l.velikov@gmail.com>
2015-06-09android: add rules to build a gallium_dri.soChih-Wei Huang2-0/+72
This single .so includes all of the enabled gallium drivers. Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-05-15winsys/hgl: Add needed extern "C" to hgl winsysAlexander von Gluck IV1-0/+7
Reviewed-by: Brian Paul <brianp@vmware.com>
2015-05-08util: Move gallium's linked list to utilJason Ekstrand4-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 <cwabbott0@gmail.com> Reviewed-by: Rob Clark <robclark@freedesktop.org>
2015-05-02ilo: move intel_winsys.h to coreChia-I Wu1-1/+1
Add a new subdirectory and start moving files that do not depend on ilo_screen/ilo_context to it.
2015-04-29winsys/radeon: add a private interface for radeon_surfaceMarek Olšák4-18/+184
2015-04-29winsys/radeon: move radeon_winsys.h to drivers/radeonMarek Olšák3-613/+2
2015-04-28r600g,radeonsi: add a driver query returning GPU loadMarek Olšák2-0/+19
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-04-28r600g,radeonsi: add driver queries for GPU temperature and shader+memory clocksMarek Olšák2-1/+23
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-04-27Fix a few typosZoë Blade1-2/+2
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2015-04-27winsys/radeon: make radeon_bo_vtbl staticMarek Olšák1-2/+2
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-04-22android: use LOCAL_SHARED_LIBRARIES over TARGET_OUT_HEADERSEmil Velikov6-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" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-01i915g: Implement EGL_EXT_image_dma_buf_importStéphane Marchesin1-4/+11
This adds all the plumbing to get EGL_EXT_image_dma_buf_import in i915g. Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
2015-03-21winsys/sw/fbdev: remove unused software winsysEmil Velikov5-339/+0
st/egl was its only user. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Matt Turner <mattst88@gmail.com>
2015-03-21winsys/sw/wayland: remove unused winsysEmil Velikov4-363/+0
st/egl was its only user. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Matt Turner <mattst88@gmail.com>
2015-03-16gallium/sw/kms: trivial cleanupsEmil Velikov1-4/+2
Remove the forward declaration and make use of the DEBUG_PRINT macro for debug builds. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2015-03-06ilo: add more convenient intel_bo_{ref,unref}()Chia-I Wu1-5/+9
They both check for NULL and intel_bo_ref() returns the referenced bo. They replace intel_bo_{reference,unreference}().
2015-03-06ilo: add intel_bo_set_tiling()Chia-I Wu1-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.
2015-03-04ilo: add some more winsys functionsChia-I Wu1-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.
2015-02-21gallium/sw/kms: fix a type-mismatch warningMarek Olšák1-1/+1
Reviewed-by: Brian Paul <brianp@vmware.com>
2015-02-21gallium/sw/kms: don't redefine DEBUGMarek Olšák1-7/+7
Reviewed-by: Brian Paul <brianp@vmware.com>
2015-02-17winsys/radeon: test the userptr ioctl to see if it's presentMarek Olšák5-19/+35
There is no other way to check for support. Reviewed-by: Christian König <christian.koenig@amd.com>
2015-02-17winsys/radeon: allow unaligned size for user-memory buffersMarek Olšák1-1/+1
This is not required, but being user-friendly doesn't hurt. Reviewed-by: Christian König <christian.koenig@amd.com>
2015-02-17winsys/radeon: allow mapping a user bufferMarek Olšák3-2/+8
OpenGL requires this. Reviewed-by: Christian König <christian.koenig@amd.com>
2015-02-17winsys/radeon: add user pointer supportChristian König2-0/+113
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2015-02-02dir-locals.el: Don't set variables for non-programming modesNeil Roberts1-1/+1
This limits the style changes to modes inherited from prog-mode. The main reason to do this is to avoid setting fill-column for people using Emacs to edit commit messages because 78 characters is too many to make it wrap properly in git log. Note that makefile-mode also inherits from prog-mode so the fill column should continue to apply there. v2: Apply to all the .dir-locals.el files, not just the one in the root directory. Acked-by: Michel Dänzer <michel.daenzer@amd.com>
2015-01-28gallium: Replace u_simple_list.h with util/simple_list.hEric Anholt1-1/+1
The code was exactly the same, except util/ has c++ guards and a struct simple_node declaration. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2015-01-19winsys/radeon: increase the size of buffer cacheMarek Olšák1-1/+1
This should fix this performance regression: https://bugs.freedesktop.org/show_bug.cgi?id=88227 Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-01-01gallium/state_tracker: Rewrite Haiku's state trackerAlexander von Gluck IV1-4/+20
* More gallium-like * Leverage stamps properly and don't call mesa functions
2014-12-12gallium: Remove Android files from distribution.Matt Turner6-10/+2
Android builds Mesa from git, so there don't need to be in the tarball.
2014-12-08Remove useless checks for NULL before freeingMatt Turner1-4/+2
See commits 5067506e and b6109de3 for the Coccinelle script. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-12-08winsys/radeon: Always report at least 1 compute unitTom Stellard1-0/+2
All uses of this require that the value be at least one, so it's easier to report at least one than having to wrap all uses in MAX2(max_compute_units, 1). Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-12-08radeonsi: Program RASTER_CONFIG for harvested GPUs v5Tom Stellard2-0/+4
Harvested GPUs have some of their render backends disabled, so in order to prevent the hardware from trying to render things with these disabled backends we need to correctly program the PA_SC_RASTER_CONFIG register. v2: - Write RASTER_CONFIG for all SEs. v3: - Set GRBM_GFX_INDEX.INSTANCE_BROADCAST_WRITES bit. - Set GRBM_GFX_INFEX.SH_BROADCAST_WRITES bit when done setting PA_SC_RASTER_CONFIG. - Get num_se and num_sh_per_se from kernel. v4: - Get correct value for num_se - Remove loop for setting PA_SC_RASTER_CONFIG - Only compute raster config when a backend has been disabled. v5: Michel Dänzer - Fix computation for chips with multiple SEs https://bugs.freedesktop.org/show_bug.cgi?id=60879 CC: "10.4 10.3" <mesa-stable@lists.freedesktop.org>
2014-11-18winsys/sw/wrapper: implement is_displaytarget_format_supported for swrastChristoph Bumiller1-0/+14
Acked-by: Jose Fonseca <jfonseca@vmware.com> Signed-off-by: David Heidelberg <david@ixit.cz>
2014-11-16dri/kms: Always zero out struct drm_mode_create_dumbThierry Reding1-1/+1
The DRM_IOCTL_MODE_CREATE_DUMB (and others) IOCTL isn't very rigorously specified, which has the effect that some kernel drivers do not consider the .pitch and .size fields of struct drm_mode_create_dumb outputs only. Instead they will use these as lower bounds and overwrite them only if the values that they compute are larger than what userspace provided. This works if and only if userspace initializes the fields explicitly to either 0 or some meaningful value. However, if userspace just leaves the values uninitialized and the struct drm_mode_create_dumb is allocated on the stack for example, the driver may try to overallocate buffers. Fortunately most userspace does zero out the structure before passing it to the IOCTL, but there are rare exceptions. Mesa is one of them. In an attempt to rectify this situation, kernel drivers are being updated to not use the .pitch and .size fields as inputs. However in order to fix the issue with older kernels, make sure that Mesa always zeros out the structure as well. Future IOCTLs should be more rigorously defined so that structures can be validated and IOCTLs rejected if output fields aren't set to zero. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-11-06ilo: fix intel_bo_wait() on kernel 3.17Chia-I Wu1-1/+7
drm_intel_gem_bo_wait() with negative timeout is broken on kernel 3.17. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2014-10-30r300g: remove enabled/disabled hyperz and AA compression messagesMarek Olšák1-2/+0
It's annoying with octave. Reported by Michael Burian. Cc: 10.2 10.3 <mesa-stable@lists.freedesktop.org>
2014-10-17winsys/radeon: Use a single buffer cache manager againMichel Dänzer3-37/+21
The trick is to generate a unique buffer usage value for each possible combination of domains and flags, with only one bit set each for the domains and flags. This ensures pb_check_usage() only returns TRUE when the domains and flags the cached buffer was created for exactly match the requested ones. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-10-15winsys/radeon: Use separate caching buffer manager for each set of flagsMichel Dänzer3-41/+32
Otherwise the caching buffer manager may return a buffer which was created with a different set of flags, which can cause trouble. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Marek Olšák <marek.olsak@amd.com>