aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl/vl_winsys_dri.c
Commit message (Collapse)AuthorAgeFilesLines
* gallium/vl: don't use the template keywordMarek Olšák2017-09-301-14/+14
| | | | | | for C++ editors Reviewed-by: Brian Paul <[email protected]>
* pipe-loader: remove config from pipe_loader_create_screenNicolai Hähnle2017-08-041-1/+1
| | | | | | | | | | | | The config passed into the screen should be independent from the state tracker, because at least in the case of radeonsi, the screen structure can be shared between different state trackers. Incidentally, this also fixes crashes that were recently introduced. Fixes: a35a9e7c ("gallium: add driconf options to pipe_screen_config") Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add pipe_screen_config to screen_create functionsNicolai Hähnle2017-08-021-1/+1
| | | | | | | This allows a more generic mechanism for passing user configurations into drivers by accessing the dri options directly. Reviewed-by: Marek Olšák <[email protected]>
* gallium: allow passing 'unsigned flags' to create_screen()Marek Olšák2017-06-231-1/+1
| | | | | | for drirc options Reviewed-by: Nicolai Hähnle <[email protected]>
* vl: remove DRI2DriverPrimeShift compile guardsEmil Velikov2017-02-131-2/+0
| | | | | | | | DRI2DriverPrimeShift was added in dri2proto-2.8, which we now require as of the previous commit. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* gallium: fix more occurences of u_hash.hMarek Olšák2016-11-221-1/+1
| | | | this fixes compile failures since 86514d84e0beec47c82da4888db12bf07f33cb83
* auxiliary/vl/dri: call get_xcb_screen() only onceEmil Velikov2016-11-221-2/+6
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* vl/dri: fix close fd error outLeo Liu2016-05-121-3/+5
| | | | | | fd should be set to -1 only if it got closed by pipe_loader_release. Signed-off-by: Leo Liu <[email protected]>
* gallium: add external usage flags to resource_from(get)_handle (v2)Marek Olšák2016-03-091-1/+2
| | | | | | | | | This will allow drivers to make better decisions about texture sharing for DRI2, DRI3, Wayland, and OpenCL. v2: add read/write flags, take advantage of __DRI_IMAGE_USE_BACKBUFFER Reviewed-by: Axel Davy <[email protected]>
* auxiliary/vl/dri: fd management cleanupsEmil Velikov2015-11-291-2/+5
| | | | | | | | | | Analogous to previous commit, minus the extra dup. We are the one opening the device thus we can directly use the fd. Spotted by Coverity (CID 1339867, 1339877) Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]>
* auxiliary/vl: Don't close the drm fd on failureEmil Velikov2015-11-211-1/+1
| | | | | | | | | | | | | Ported from an identically named commit in st/xa commit 35cf3831d71770211f29da6608313dc1f6213d7b Author: Thomas Hellstrom <[email protected]> Date: Thu Jul 3 02:07:36 2014 -0700 st/xa: Don't close the drm fd on failure v2 Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* {auxiliary,targets}/vl: use static/dynamic pipe-loaderEmil Velikov2015-11-211-8/+0
| | | | | | | | | Analogous to previous commit. v2: rebase on top of vl_winsys_drm.c addition Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* gallium: remove library_path argument from pipe_loader_create_screen()Emil Velikov2015-11-211-1/+1
| | | | | | | | | | | | | | | Currently the location is determined at configure/build time and consistently copied across gallium. Just remove the extra argument, and use PIPE_SEARCH_DIR where appropriate. This will allow us to remove the duplication in the *configuration and *screen_create APIs by moving util_dl_get_proc_address() and friends to probe time. v2: rebase on top of vl_winsys_drm.c addition Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* auxiliary/vl/dri2: coding style fixesEmil Velikov2015-11-201-21/+33
| | | | | | | Rewrap long(ish) lines, add space between struct foo and *. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/dri2: hide internal functionsEmil Velikov2015-11-201-17/+20
| | | | | | | | Analogous to previous commit. While we're here prefix all functions identically -> vl_dri2_foo Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/dri2: setup the dispatchEmil Velikov2015-11-201-6/+13
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl: rename vl_screen_create to vl_dri2_screen_createEmil Velikov2015-11-201-1/+1
| | | | | | | | | | | In a preparation of having proper multi-platform/backend handling in VL. With follow up commits we'll introduce a dispatch within vl_screen similar to the one in pipe_screen. This way any VL state-tracker can operate seamlessly, considering the backend/platform is properly setup. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl: use the correct screen indexEmil Velikov2015-07-131-4/+13
| | | | | | | | | | | Inspired (copied) from Marek's commit for egl/x11 commit 0b56e23e7f3(egl/dri2: use the correct screen index) v2: Fix copy/pasta errors. Cc: 10.6 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* auxiliary/vl: use loader_open_device() over open()Emil Velikov2015-07-131-1/+3
| | | | | | | The former handles O_CLOEXEC (and the lack of it) appropriately. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* pipe-loader: remove pipe_loader_drm_probe_fd() x_auth argumentEmil Velikov2015-07-131-1/+1
| | | | | | | | No longer used by anyone, as of last commit. Cc: Tom Stellard <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* targets/pipe-loader: drop unused authenticationEmil Velikov2014-09-241-1/+1
| | | | | | | | | The dri, vdpau, omx, xvmc and gbm targets don't need any authentication even the VL ones never used it. Either the respective loader or the library itself (vl) is doing its auth prior to calling create_screen() Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]>
* auxiliary/vl: Remove no longer used SPLIT_TARGETSEmil Velikov2014-06-261-8/+0
| | | | | | | | | Required for the conversion stage of all VL targets to a single library per API (static/shared pipe-drivers). No longer required as per last commit. Signed-off-by: Emil Velikov <[email protected]>
* targets/vdpau-nouveau: convert to static/shared pipe-driversEmil Velikov2014-06-221-1/+23
| | | | | | | | | | | | | | | | | | | | | | Create a single library (for the vdpau api) thus reducing the overall size of mesa. Current commit converts vdpau-nouveau, with upcomming commits handling the rest. The library can be built with the relevant pipe-drivers statically linked in, or loaded as shared modules. Currently we default to static. Add SPLIT_TARGETS to guard the other VL targets. Note: symlink handling is rather ugly and will need an update to work with BSD and other non-linux platforms. v2: Split the conversion into per-target basis. Cc: Maarten Lankhorst <[email protected]> Cc: Ilia Mirkin <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Tested-by: Thomas Helland <thomashelland90 at gmail.com>
* vl/winsys_dri: cleanup vl_screen_create error pathEmil Velikov2014-02-221-13/+19
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium: remove PIPE_USAGE_STATICMarek Olšák2014-02-061-1/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/[email protected]/[email protected]/ s/[email protected]/[email protected]/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\[email protected]/[email protected]/g s/keithw\[email protected]/[email protected]/g s/[email protected]/[email protected]/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/[email protected]/[email protected]/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <[email protected]>
* swrast* (gallium, classic): add MESA_copy_sub_buffer support (v3)Dave Airlie2013-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This patches add MESA_copy_sub_buffer support to the dri sw loader and then to gallium state tracker, llvmpipe, softpipe and other bits. It reuses the dri1 driver extension interface, and it updates the swrast loader interface for a new putimage which can take a stride. I've tested this with gnome-shell with a cogl hacked to reenable sub copies for llvmpipe and the one piglit test. I could probably split this patch up as well. v2: pass a pipe_box, to reduce the entrypoints, as per Jose's review, add to p_screen doc comments. v3: finish off winsys interfaces, add swrast classic support as well. Reviewed-by: Jose Fonseca <[email protected]> Signed-off-by: Dave Airlie <[email protected]> swrast: add support for copy_sub_buffer
* gallium/vl: add prime supportDave Airlie2013-07-261-1/+19
| | | | | | | | | | | | | | | | This fixes the dri2 opening to check if DRI_PRIME is set, and picks the correct drm device path to open, this along with a change to libvdpau allows vdpauinfo to work at least, Martin Peres tested with nouveau, and there seems to be a further issue with final displaying, it only works sometimes, but this patch is at least necessary to help debug further. Signed-off-by: Dave Airlie <[email protected]> Cc: [email protected] Reviewed-by: Christian König <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67283 Tested-by: Armin K. <[email protected]>
* vl: Fix off-by-one error in device_name_length allocation.Vinson Lee2013-02-231-2/+1
| | | | | | | | Fixes out-of-bounds write reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* vl: round next_msc to integer frame, and kill skew_mscMaarten Lankhorst2013-01-211-5/+2
| | | | | | | | This reduces jitter slightly in a cleaner way, without desynchronizing mplayer2 as badly when falling behind. Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl: fix the dri winsys helper screen initChristian König2012-10-261-0/+2
| | | | Signed-off-by: Christian König <[email protected]>
* vl: move winsys helper out of winsys directoryChristian König2012-03-281-0/+400
They aren't winsys of their own, just help dealing with them. v2: add some more comments in vl_winsys.h Signed-off-by: Christian König <[email protected]>