summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/virgl
Commit message (Collapse)AuthorAgeFilesLines
* virgl: mark function as staticDave Airlie2016-02-021-1/+1
| | | | | | | | This is fallout from the previous changes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93961 Signed-off-by: Dave Airlie <airlied@redhat.com>
* virgl: also build vtest for AndroidRob Herring2016-02-021-0/+33
| | | | | | | Enabling swrast on Android causes a link error because vtest is missing. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* virgl: fix reference counting of prime handlesRob Herring2016-02-022-12/+33
| | | | | | | | | | The virgl reference counting of buffers is broken for prime fd buffers. Each prime fd passed into virgl_drm_winsys_resource_create_handle creates a new resource. The solution requires creating a separate hash table to track flink names separately from prime handles. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* virgl: reuse screen when fd is already openRob Herring2016-02-022-2/+89
| | | | | | | | | | It is necessary to share the screen between mesa and gralloc to properly ref count resources. This implements a hash lookup on the file description to re-use an already created screen. This is a similar implementation as freedreno and radeon. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* virgl: enable building on AndroidRob Herring2016-01-231-0/+34
| | | | | | | | This is just a copy-n-paste and rename of vc4 Android makefiles. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* virgl: wrap ret assignment with braces to do correct thingDave Airlie2015-11-082-2/+2
| | | | | | | Coverity reported that ret could only be 0 or 1, since it was setting ret = fn() > 0, instead of doing (ret = fn()) > 0. Signed-off-by: Dave Airlie <airlied@redhat.com>
* virgl/vtest: fix extra mallocDave Airlie2015-10-311-1/+1
| | | | | | | | This somehow got added twice, drop the first one. Reported by Coverity. Signed-off-by: Dave Airlie <airlied@redhat.com>
* gallium/swrast: fixup build breakage and warningsDave Airlie2015-10-311-1/+1
| | | | | | | The front buffer rendering changes broke an interface, I didn't fix up all of them. Signed-off-by: Dave Airlie <airlied@redhat.com>
* winsys/virgl: rework line wrapping/indentEmil Velikov2015-10-304-92/+124
| | | | | | | | Wrap some of the 'omg it's getting out of hand' long lines, and re-indent where things feel off. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* virgl: unwrap the includesEmil Velikov2015-10-306-26/+27
| | | | | | | | Include what you want, rather than relying on a header foo.h N levels down the include chain, to provide something that you need. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* winsys/virgl: remove temporary ret variableEmil Velikov2015-10-301-9/+3
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* winsys/virgl: always memset prior to ioctlEmil Velikov2015-10-301-4/+8
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* winsys/virgl: use MALLOC to match FREEEmil Velikov2015-10-301-1/+1
| | | | | | | The uppercase versions are wrappers which must be matched. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* winsys/virgl: remove calloc/malloc castsEmil Velikov2015-10-302-5/+3
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* winsys/virgl: throw in some inline wrappersEmil Velikov2015-10-304-10/+40
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* winsys/virgl/drm: drop unneeded forward declarationEmil Velikov2015-10-301-2/+0
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* virgl: move virgl_hw.h into the driver dirEmil Velikov2015-10-306-291/+2
| | | | | | | | | | | Strictly speaking virgl_hw.h should reside in the driver folder, as it describes the hardware. Moving it allows us to nuke the following strange dependency winsys/vtest > driver > winsys/drm Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* virgl: straighten the includes confusionEmil Velikov2015-10-303-5/+5
| | | | | | | | | Use the relevant GALLIUM_foo_CFLAGS which has all the requirements (not to mention VISIBITY_CFLAGS) and keep ../ out of the include directives. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* virgl: remove the _FILE_OFFSET_BITS definesEmil Velikov2015-10-303-7/+0
| | | | | | | The build already sets it as needed. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* winsys/virgl/drm: add all files to the tarballEmil Velikov2015-10-301-1/+5
| | | | | Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* winsys/virgl/vtest: list all files in Makefile.sourcesEmil Velikov2015-10-301-1/+4
| | | | | Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* virgl: fix drm.h include pathEmil Velikov2015-10-301-1/+1
| | | | | | | | | | | | The drm/ prefix is required, if using the kernel provided headers. As most distros don't ship them it and we already depend on libdrm (which adds the relevant -I flag) just drop the drm/ from the include. Once a libdrm release with the virtgpu_drm.h header is released, we can drop our local copy of the file. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* virgl/vtest: add vtest driverDave Airlie2015-10-237-0/+1227
| | | | | | | | | | | | | | | | | | | | | virgl/vtest is a swrast driver that allows the virgl acceleration to be tested without having a virtual machine. The backend has a unix socket server that this connects to. This is run by setting LIBGL_ALWAYS_SOFTWARE=y GALLIUM_DRIVER=virpipe In this mode all renderering is sent over a socket to the remote renderer, and the results are readback and copies to the screen using drisw. This works well enough to develop new features and to help debug. Signed-off-by: Dave Airlie <airlied@redhat.com>
* virgl: add driver for virtio-gpu 3D (v2)Dave Airlie2015-10-237-0/+1377
virgl is the 3D acceleration backend for the virtio-gpu shipping with qemu. The 3D acceleration is designed around gallium and TGSI as the virtualisation layer. The backend renderer translates the virgl interface into OpenGL currently. This is the initial import of the driver to mesa. The kernel driver portions are lined up for drm-next. Currently this driver supports up to GL3.3 and some misc extensions if the host driver exposes it. It is planned to iterate the virgl API to new GL levels as mesa host drivers gain features. v2: fix resource tracking across flushes to avoid ->bind hack in mapping. consolidate mapping and waiting code for transfers. use u_range for dirt tracking. handle larger shaders in protocol. include virtgpu_drm.h in mesa for now. add translation layer for gallium tgsi to virgl tgsi. Signed-off-by: Dave Airlie <airlied@redhat.com>