summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/svga
Commit message (Collapse)AuthorAgeFilesLines
* gallium/winsys: replace calls to dup(2) with fcntl(F_DUPFD_CLOEXEC)Matt Whitlock2016-10-041-1/+2
| | | | | | | | | | Without this fix, duplicated file descriptors leak into child processes. See commit aaac913e901229d11a1894f6aaf646de6b1a542c for one instance where the same fix was employed. Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Matt Whitlock <freedesktop@mattwhitlock.name> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* svga: add guest statistic gathering interfaceCharmaine Lee2016-08-261-0/+20
| | | | | | | | | | | | With this patch, guest statistic gathering interface is added to svga winsys interface that can be used to gather svga driver statistic. The winsys module can then share the statistic info with the VMX host via the mksstats interface. The statistic enums used in the svga driver are defined in svga_stats_count and svga_stats_time in svga_winsys.h Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Use AC_HEADER_MAJOR to include correct header for major().Matt Turner2016-07-261-1/+6
| | | | | | Gentoo has been smoke testing an upcoming change to glibc. Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=580392
* svga: invalidate gb surface before it is reusedCharmaine Lee2016-07-081-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | With this patch, a guest-backed surface will be invalidated using the SVGA_3D_CMD_INVALIDATE_GB_SURFACE command before the surface is reused. This fixes the updating dirty image error from the device when a surface is reused. v2: Instead of invalidating the surface when it is reused, send the invalidate command before the surface is put into the recycle pool. v3: (1) surface invalidate is a noop operation in Linux winsys, since surface invalidation is not needed for DMA path. (2) Instead of invalidating the surface content in svga_screen_surface_destroy() when a surface is to be destroyed, it is done in svga_screen_cache_flush() when the surface is no longer referenced in a command buffer and is ready to be moved to the unused list. At this point, the surface will be moved to the invalidate list. When the surface invalidation is submitted, the surface will be moved to the unused list. Tested with piglit, glretrace. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
* svga: Fix failures caused in fedora 24Neha Bhende2016-06-301-0/+11
| | | | | | | | | | | SVGA_3D_CMD_DX_GENRATE_MIPMAP & SVGA_3D_CMD_DX_SET_PREDICATION commands are not presents in fedora 24 kernel module. Because of this reason application like supertuxkart are not running. v2: Add few comments and code modifications suggested by Brian P. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com>
* Android: move libdrm settings to top-level Android.common.mkRob Herring2016-06-131-1/+0
| | | | | | | | | | | | | | Fix warnings like these due to HAVE_LIBDRM being inconsistently defined: external/libdrm/include/drm/drm.h:839:30: warning: redefinition of typedef 'drm_clip_rect_t' is a C11 feature [-Wtypedef-redefinition] typedef struct drm_clip_rect drm_clip_rect_t; HAVE_LIBDRM needs to be set project wide to fix this. This change also harmlessly links libdrm with everything, but simplifies the makefiles a bit. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Emil Velikov <emil.velikov@collabora.com>
* gallium: push offset down to driverStanimir Varbanov2016-05-301-0/+12
| | | | | | | | | | | | | Push offset down to drivers when importing dmabuf. This is needed to more fully support EGL_EXT_image_dma_buf_import when a non-zero offset is specified. Tesing has been done for freedreno, and compile tested following gallium drivers: nouveau,svga,virgl,r600,r300,radeonsi,swrast,i915,ilo Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* scons: Whenever possible decide what to do based on platform and not compiler.Jose Fonseca2016-04-261-6/+4
| | | | | | | | | | Because compilers like GCC and Clang are effectively available everywhere so their presence/absence is seldom conclusive. Furthermore, all compilers we use now have stdint.h. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* pb_buffer: switch pb_buffer::size to 64 bitsMarek Olšák2016-04-122-4/+5
| | | | | | being able to allocate more than 4 GB may be useful Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* gallium/winsys/drm: add offset to struct winsys_handleChristian König2016-03-171-0/+1
| | | | | | | We are going to need this for EGL_EXT_image_dma_buf_import. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* svga: add new svga_winsys_context::get_command_buffer_size()Brian Paul2016-03-041-0/+8
| | | | | | | To ask how large the current command buffer is. Will be used for a new GALLIUM_HUD graph. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
* winsys/svga: Increase the fence timeoutThomas Hellstrom2016-03-041-1/+2
| | | | | | | | | | | If running with a software renderer backend, the timeout may be insufficient, and we don't want to release busy buffers too early. In practice, SVGA gpu lockups are extremely rare. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
* winsys/svga: Fix an uninitialized return valueThomas Hellstrom2016-03-041-0/+2
| | | | | | | Reported-by: Brian Paul <brianp@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviwed-by: Brian Paul <brianp@vmware.com> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
* svga: Rename SVGA_HINT_FLAG_DRAW_EMITTEDSinclair Yeh2016-01-061-4/+4
| | | | | | | | Rename SVGA_HINT_FLAG_DRAW_EMITTED to SVGA_HINT_FLAG_CAN_PRE_FLUSH because preemptive flush can be unblocked by more commands than draw. Reviewed-by: Brian Paul <brianp@vmware.com>
* svga: Condition preemptive flush on draw emissionSinclair Yeh2015-10-221-5/+10
| | | | | | | | | | | | | | On ultra high resolution modes, the preemptive flush flag can be set midway through command submission, a condition that cannot be recovered from a flush-retry, causing rendering artifacts. This patch prevents a preemtive_flush until a draw has been emitted. Signed-off-by: Sinclair Yeh <syeh@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* winsys/svga: remove useless assertionBrian Paul2015-09-101-1/+0
| | | | | | An unsigned int is always >= 0. Found with Coverity. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
* svga/winsys: Add support for VGPU10Brian Paul2015-09-0219-119/+362
| | | | | | | This involves a few driver modifications to keep things building. The driver may not actually run properly at this point. Signed-off-by: Brian Paul <brianp@vmware.com>
* winsys/svga: add new vmw_query.c[h] filesBrian Paul2015-09-023-1/+214
| | | | | | Functions for creating, destroying, getting queries, etc. Signed-off-by: Brian Paul <brianp@vmware.com>
* 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 <jfonseca@vmware.com> Acked-by: Brian Paul <brianp@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* gallium: replace INLINE with inlineIlia Mirkin2015-07-2110-23/+23
| | | | | | | | | | | | | | | | 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>
* util: Move gallium's linked list to utilJason Ekstrand2015-05-082-2/+2
| | | | | | | | | 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>
* Fix a few typosZoë Blade2015-04-271-2/+2
| | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* android: use LOCAL_SHARED_LIBRARIES over TARGET_OUT_HEADERSEmil Velikov2015-04-221-2/+2
| | | | | | | | | ... 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>
* gallium: Remove Android files from distribution.Matt Turner2014-12-121-1/+1
| | | | Android builds Mesa from git, so there don't need to be in the tarball.
* Remove useless checks for NULL before freeingMatt Turner2014-12-081-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>
* configure.ac: Add AC_SYS_LARGEFILEMichel Dänzer2014-09-051-1/+1
| | | | | | | Making sure large file support is enabled across the tree even on 32-bit systems. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* winsys/svga: Fix incorrect type usage in IOCTL v2Thomas Hellstrom2014-09-041-4/+9
| | | | | | | | | | | | | | | While similar in layout, the size of the SVGA3dSize type may be smaller than the struct drm_vmw_size type that is part of the ioctl interface. The kernel driver could accordingly overwrite a memory area following the size variable on the stack. Typically that would be another local variable, causing breakage in, for example, ubuntu 12.04.5 where the handle local variable becomes overwritten. v2: Fix whitespace errors Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Cc: "10.1 10.2 10.3" <mesa-stable@lists.freedesktop.org>
* gallium/pb_bufmgr_cache: limit the size of cacheMarek Olšák2014-09-011-1/+2
| | | | | | This should make a machine which is running piglit more responsive at times. e.g. streaming-texture-leak can easily eat 600 MB because of how fast it creates new textures.
* winsys/$(hw): ship the Android/SCons scripts in the tarballEmil Velikov2014-08-281-0/+2
| | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* winsys/$(hw): include headers in Makefile.sourcesEmil Velikov2014-08-281-11/+19
| | | | | | Otherwise 'make dist' will not pick them up :'( Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* winsys/svga: build: cleanup the includesEmil Velikov2014-08-282-6/+1
| | | | | | gallium/drivers is already part fo GALLIUM_WINSYS_CFLAGS. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* android: gallium: use the installed libdrm headersEmil Velikov2014-08-131-2/+1
| | | | | | Saves us a few lines and brings us closer to the automake build. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* svga: Add a limit to the maximum surface sizeCharmaine Lee2014-08-124-2/+59
| | | | | | | | | This patch adds a limit to the maximum surface size which is based on the maximum size of a single mob. If this value is not available, the maximum surface size is by default set to 128 MB. Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* winsys/svga: Fix prime surface references also for guest-backed surfacesThomas Hellstrom2014-04-073-6/+81
| | | | | | | | | Implement guest-backed surface sharing using prime fds. Previously only legacy surfaces could use this functionality. Also use the vmwgfx 2.6 single-ioctl prime fd reference if available. Cc: "10.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
* winsys/svga: Update the vmwgfx_drm.h header to latest version from kernelThomas Hellstrom2014-04-071-1/+12
| | | | | Cc: "10.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
* winsys/svga: Replace the query mm buffer pool with a slab pool v3Thomas Hellstrom2014-04-021-5/+13
| | | | | | | | | | | | | | | This is to avoid running out of query buffer space due to winsys limitations. Instead of a fixed size per screen pool of query buffers, use a slab allocator that allocates a new slab if we run out of space in the first one. v2: Correct email addresses. v3: s/8192/VMW_QUERY_POOL_SIZE/. Improve documentation and log message. Reported-and-tested-by: Brian Paul <brianp@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Cc: "10.1" <mesa-stable@lists.freedesktop.org>
* winsys/svga: Avoid calling drm getparam for max surface size on older kernelsThomas Hellstrom2014-02-281-7/+8
| | | | | | | | | | | | | This avoids the kernel driver spewing out errors about the param not being supported. Also correct the max surface size used when the kernel does not support the query. Reported-by: Brian Paul <brianp@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com> Cc: "10.1" <mesa-stable@lists.freedesktop.org>
* gallium/pipebuffer: change pb_cache_manager_create() size_factor to floatBrian Paul2014-02-141-1/+1
| | | | | | | Requested by Marek. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: "10.1" <mesa-stable@lists.freedesktop.org>
* svga/winsys: Propagate surface shared information to the winsysThomas Hellstrom2014-02-143-24/+29
| | | | | | | | | | | | | | | | | The linux winsys needs to know whether a surface is shared. For guest-backed surfaces we need this information to avoid allocating a mob out of the mob cache for shared surfaces, but instead allocate a shared mob, that is never put in the mob cache, from the kernel. Also previously, all surfaces were given the "shareable" attribute when allocated from the kernel. This is too permissive for client-local surfaces. Now that we have the needed info, only set the "shareable" attribute if the client indicates that it needs to share the surface. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Cc: "10.1" <mesa-stable@lists.freedesktop.org>
* svga/winsys: implement GBS supportBrian Paul2014-02-1419-323/+3064
| | | | | | | This is a squash commit of many commits by Thomas Hellstrom. Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Cc: "10.1" <mesa-stable@lists.freedesktop.org>
* svga: update svga_winsys interface for GBSBrian Paul2014-02-141-0/+1
| | | | | | | | This adds new interface functions for guest-backed surfaces and adds a mobid parameter to the surface_relocation() function. Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Cc: "10.1" <mesa-stable@lists.freedesktop.org>
* svga/winsys: Implement surface sharing using prime fd handlesThomas Hellstrom2013-12-101-18/+61
| | | | | | | | | | This needs a prime-aware vmwgfx kernel module to work properly. (With additions by Christopher James Halse Rogers <raof@ubuntu.com>) Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
* gallium/winsys/drm: Prepare for passing prime fds in winsys_handleChristopher James Halse Rogers2013-12-101-0/+6
| | | | | | Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
* gallium/winsys: compact compiler flags into Automake.incEmil Velikov2013-11-161-5/+2
| | | | | | | | | | | | | | | | Cleanup the duplicating flags and consolidate into a sigle variable. Note: this patch adds VISIBILITY_CFLAGS to the following targets * freedreno/drm * i915/{drm,sw} * nouveau/drm * sw/fbdev * sw/null * sw/wayland * sw/wrapper * sw/xlib Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* winsys/svga: improve error/debug message outputBrian Paul2013-03-193-25/+35
| | | | | | | | Use vmw_printf() just for extra debugging info (off by default). Use vmw_error() for real errors/failures/etc that we definitely want to report. Reviewed-by: José Fonseca <jfonseca@vmware.com>
* gallium/build: Fix visibility CFLAGS in automakeMaarten Lankhorst2013-03-161-0/+2
| | | | | | | | | | | v2: Andreas Boll <andreas.boll.dev@gmail.com> - Fix formatting - use one CFLAG per line NOTE: This is a candidate for the 9.1 branch. Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59238 Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
* 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 <mattst88@gmail.com>
* Remove hacks for static MakefilesMatt Turner2013-01-131-4/+0
| | | | | | | | | | | v2: Andreas Boll <andreas.boll.dev@gmail.com> - don't remove compatibility with scripts for the old build system v3: Andreas Boll <andreas.boll.dev@gmail.com> - remove more obsolete hacks v4: Andreas Boll <andreas.boll.dev@gmail.com> - add a previously removed TOP variable to fix vgapi build
* Clean up .gitignore filesMatt Turner2013-01-101-1/+0
|
* svga/winsys/drm: Convert to automakeMatt Turner2013-01-103-19/+42
|