aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
Commit message (Collapse)AuthorAgeFilesLines
* winsys/radeon: set/get the scanout flag with the tiling ioctlsMarek Olšák2013-12-122-4/+13
| | | | | | | | | | | | | | | If we assume that all buffers allocated by the DDX are scanout, a new flag that says "this is not scanout" has to be added to support the non-scanout buffers and maintain backward compatibility. This fixes bad rendering on Wayland. The flag is defined as: #define RADEON_TILING_R600_NO_SCANOUT RADEON_TILING_SWAP_16BIT AFAIK, RADEON_TILING_SWAP_16BIT is not used on SI. Reviewed-by: Michel Dänzer <[email protected]>
* 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 <[email protected]>) Signed-off-by: Christopher James Halse Rogers <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* gallium/radeon: Implement hooks for DRI Image 7 (v2)Christopher James Halse Rogers2013-12-101-23/+83
| | | | | | | | | v2: Fix transliteration of lseek arguments Ignore busy return from RADEON_GEM_BUSY ioctl; we're only after the domain Signed-off-by: Christopher James Halse Rogers <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* radeon: Rename bo_handles hashtable to match its actual contents.Christopher James Halse Rogers2013-12-101-8/+8
| | | | | | | | It's a map of GEM name->bo, so identify it as such Signed-off-by: Christopher James Halse Rogers <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* ilo: Support DRI Image 7Christopher James Halse Rogers2013-12-101-2/+0
| | | | | | Signed-off-by: Christopher James Halse Rogers <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* gallium/winsys/drm: Prepare for passing prime fds in winsys_handleChristopher James Halse Rogers2013-12-103-1/+17
| | | | | | Signed-off-by: Christopher James Halse Rogers <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* nvc0: fixup gk110 and up not being listed in various switch statementsBen Skeggs2013-12-061-1/+2
| | | | Signed-off-by: Ben Skeggs <[email protected]>
* winsys/radeon: cleanup virtual memory nonsenseChristian König2013-11-212-20/+18
| | | | | | | | The alignment of a virtual memory area must always be at least 4096 bytes. It only worked because size was aligned to 4096 outside of the function. Signed-off-by: Christian König <[email protected]>
* gallium/winsys: compact compiler flags into Automake.incEmil Velikov2013-11-1613-32/+22
| | | | | | | | | | | | | | | | 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 <[email protected]>
* radeonsi: add support for Hawaii asics (v2)Alex Deucher2013-11-152-0/+2
| | | | | | | Update additional register fields. Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* winsys/radeon: use type-3 NOPs for CS padding on CIKMarek Olšák2013-11-041-2/+7
| | | | The type-2 NOPs are said to be unstable. It doesn't make a difference here.
* winsys: Correct Haiku winsys display target codeAlexander von Gluck IV2013-10-294-8/+41
| | | | | | | | | * Instead of assuming the displaytarget is the same stride / colorspace as the destination, lets actually check the source bitmap. * Fixes random stride issues in rendering Acked-by: Brian Paul <[email protected]>
* winsys/radeon: make radeon_drm_winsys_create publicChristian König2013-10-261-1/+1
| | | | | | Otherwise OpenGL/VDPAU interop won't work as expected. Signed-off-by: Christian König <[email protected]>
* winsys/radeon: add the implementation of fences from r300gMarek Olšák2013-10-252-0/+79
|
* winsys/radeon: cleanup CS offloadingChristian König2013-10-211-21/+10
| | | | | | | | | Using atomic function for ncs is superfluous since it is protected by a mutex anyway. Also lock the mutex only once while retrieving the next CS for submission. Signed-off-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeon/winsys: fix handling in radeon_drm_cs_flush v2Christian König2013-10-102-5/+4
| | | | | | | | | | | | | Calling radeon_drm_cs_flush from multiple threads might cause deadlocks, fix this by immediately signaling the semaphore after waiting for it. This is a candidate for the stable branch(es). Partially fixes: https://bugs.freedesktop.org/show_bug.cgi?id=70123 v2: some fixes on commit message Signed-off-by: Christian König <[email protected]>
* gallium/swrast: don't export any private symbolsMarek Olšák2013-10-081-1/+2
| | | | Reviewed-by: Tom Stellard <[email protected]>
* gallium/radeon: don't export any private symbolsMarek Olšák2013-10-081-1/+2
| | | | Reviewed-by: Tom Stellard <[email protected]>
* haiku: Add first Haiku renderer (softpipe)Alexander von Gluck IV2013-10-041-1/+0
| | | | | * This shared library gets parsed by the system as a system "add-on"
* winsys/freedreno/drm: drop obsolete .gitignoreEmil Velikov2013-10-011-1/+0
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* winsys/freedreno/drm: consolidate C sources list into Makefile.sourcesEmil Velikov2013-10-012-1/+4
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* winsys/nouveau/drm: consolidate C sources list into Makefile.sourcesEmil Velikov2013-10-013-3/+6
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* winsys/i915/sw: consolidate C sources list into Makefile.sourcesEmil Velikov2013-10-013-11/+8
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* radeon/winsys: keep screen pointer in winsys v2Christian König2013-09-252-4/+15
| | | | | | | | | | Only create one screen for each winsys instance. This helps with buffer sharing and interop handling. v2: rebased and some minor cleanup Signed-off-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeon/uvd: move alignment to winsysChristian König2013-09-251-0/+6
| | | | | | | Similar to GFX and DMA. Signed-off-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* winsys/radeon: share winsys between different fd'sChristian König2013-09-221-2/+17
| | | | | | | Share the winsys between different fd's if they point to the same device. Signed-off-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* winsys/radeon: remove cs_queue_emptyChristian König2013-09-223-19/+3
| | | | | | | | | | | | Waiting for an empty queue is nonsense and can lead to deadlocks if we have multiple waiters or another thread that continuously sends down new commands. Just post the cs to the queue and immediately wait for it to finish. This is a candidate for the stable branch. Signed-off-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* winsys/radeon: fix killing the CS threadChristian König2013-09-221-4/+4
| | | | | | | Kill the thread only after we checked that it's not used any more, not before. Signed-off-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* winsys/sw/xlib: fix compile error in xlib_sw_winsys.c.Gaetan Nadon2013-09-191-1/+1
| | | | | | | | | | | | | | | | | xlib_sw_winsys.h:5:22: fatal error: X11/Xlib.h: No such file or directory The compiler cannot find the Xlib.h in the installed system headers. All supplied include directives point to inside the mesa module. The X11_CFLAGS variable is undefined (not defined in config.status). It appears the intent was to use X11_INCLUDES defined in configure.ac. The Xlib.h file is not installed on my workstation. It is supplied in the libx11-dev package. This allows an X developer control over which version of this file is used for X development. Signed-off-by: Gaetan Nadon <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* radeon/winsys: pad IBs to a multiple of 8 DWsAlex Deucher2013-09-061-0/+30
| | | | | | | | | | | | | | | This aligns the gfx, compute, and dma IBs to 8 DW boundries. This aligns the the IB to the fetch size of the CP for optimal performance. Additionally, r6xx hardware requires at least 4 DW alignment to avoid a hw bug. This also aligns the DMA IBs to 8 DW which is required for the DMA engine. This alignment is already handled in the gallium driver, but that patch can be removed now that it's done in the winsys. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Alex Deucher <[email protected]> CC: "9.2" <[email protected]> CC: "9.1" <[email protected]>
* radeonsi: Make sure libdrm_radeon headers are picked up from the right placeJonathan Gray2013-08-291-1/+1
| | | | | | And remove libdrm/ from a winsys include statement. Signed-off-by: Jonathan Gray <[email protected]>
* radeonsi: add flexible shader descriptor management and use it for sampler viewsMarek Olšák2013-08-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | | It moves all sampler view descriptors to a buffer. It supports partial resource updates and it can also unbind resources (required for FMASK texturing). The buffer contains all sampler view descriptors for one shader stage, represented as an array. On top of that, there are N arrays in the buffer, which are used to emulate context registers as implemented by the previous ASICs (each array is a context). This uses the RCU synchronization approach to avoid read-after-write hazards as discussed in the thread: "radeonsi: add FMASK texture binding slots and resource setup" CP DMA is used to clear the descriptors at context initialization and to copy the descriptors from one context to the next. v2: - use PKT3_DMA_DATA on CIK (I'll test CIK later) - turn the bool CP DMA parameters into self-explanatory flags - add a nice simple API for packet emission to radeon_winsys.h - use 256 contexts, 128 causes texture corruption in openarena
* r600g: disable GPUVM by defaultAlex Deucher2013-08-091-1/+1
| | | | | | | | | | | | | | | Cayman and trinity systems still seem to suffer from stability problems with GPUVM. This also fixes compute on these asics. It can still be enabled for testing by setting env var RADEON_VA=true. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=65958 Signed-off-by: Alex Deucher <[email protected]> CC: "9.2" <[email protected]> CC: "9.1" <[email protected]> Reviewed-by: Christian König <[email protected]>
* winsys/radeon: allow a NULL cs pointer in radeon_bo_map to fix a segfaultMarek Olšák2013-07-131-9/+11
| | | | | The original idea was that cs=NULL should be allowed here, but we never used NULL until 862f69fbe1e54e0e9a3c439450a14f. This fixes a segfault in CoreBreach.
* winsys/intel: build with VISIBILITY_CFLAGSChia-I Wu2013-07-111-1/+2
| | | | There is no public symbol in this winsys.
* nvc0: enable very initial support for nvf0 (GK110)Ben Skeggs2013-07-051-0/+1
| | | | | | | Shaders need a lot of work still. Basic stuff generally works, so this is basically just fine for gnome-shell, OA etc at this point. Signed-off-by: Ben Skeggs <[email protected]>
* radeonsi: initial support for CIK chipsAlex Deucher2013-06-282-0/+9
| | | | | | | Add the infrastructure to differentiate them. Just treat them like SI for now. Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: rename SI chip class from TAHITI to SIAlex Deucher2013-06-282-2/+2
| | | | | | Covers the entire family. Signed-off-by: Alex Deucher <[email protected]>
* winsys/intel: fix typo in "ETIMEOUT"Jean-Sébastien Pédron2013-06-261-1/+1
| | | | | | | | Should be "ETIMEDOUT". [olv: commit message slightly re-formatted] Reviewed-by: Chia-I Wu <[email protected]>
* winsys/intel: make struct intel_bo alias drm_intel_boChia-I Wu2013-06-121-122/+50
| | | | | | | | There is really nothing in struct intel_bo, and having it alias drm_intel_bo makes the winsys impose almost zero overhead. We can make the overhead gone completely by making the functions static inline, if needed.
* winsys/intel: reorganize functionsChia-I Wu2013-06-121-249/+249
| | | | Move functions around to match the order of the declarations in the header.
* ilo: update winsys interfaceChia-I Wu2013-06-122-56/+52
| | | | | | The motivation is to kill tiling and pitch in struct intel_bo. That requires us to make tiling and pitch not queryable, and be passed around as function parameters.
* ilo: get rid of function tables in winsysChia-I Wu2013-06-124-560/+464
| | | | | We are moving toward making struct intel_bo alias drm_intel_bo. As a first step, we cannot have function tables.
* winsys/radeon: add env var to disable VM on Cayman/TrinityAlex Deucher2013-06-101-0/+2
| | | | | | | | | | | Set env var RADEON_VA=0 to disable VM on Cayman/Trinity. Useful for debugging. Note: this is a candidate for the 9.1 branch. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Tom Stellard <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeon/winsys: correct RADEON_GEM_WAIT_IDLE useJonathan Gray2013-06-062-2/+2
| | | | | | | | | | | | RADEON_GEM_WAIT_IDLE is declared DRM_IOW but mesa uses it with drmCommandWriteRead instead of drmCommandWrite which leads to the ioctl being unmatched and returning an error on at least OpenBSD. Problem originally noticed in libdrm by Mark Kettenis. Dave Airlie pointed out that mesa has the same issue. Signed-off-by: Jonathan Gray <[email protected]>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-056-6/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* Haiku: Add Gallium winsys and target codeAlexander von Gluck IV2013-05-225-0/+457
| | | | | | | | | | | | * We generate a static library for Haiku Gallium targets as our port system combines the compiled rendering code into a modular ar for each module (for example, our port system combines llvm libsoftpipe.a libllvmpipe.a into a single ar for the Haiku build system. I'd like the Gallium hgl target scons build system to do this some day, however how is beyond me at the moment. This is a first step.
* winsys/intel: test for and expose address swizzlingChia-I Wu2013-05-162-0/+23
| | | | | Without knowing whether addresses are swizzled or not, we cannot manipulate a tiled surface in CPU.
* radeonsi: add support for hainan chipsAlex Deucher2013-05-142-0/+2
| | | | | | | Note: this is a candidate for the 9.1 branch Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* i915g: Optimize batchbuffer sizesStéphane Marchesin2013-05-081-1/+1
| | | | | | | Now that we don't throttle at every batchbuffer, we can shrink the size of batchbuffers to achieve early flushing. This gives a significant speed boost in a lot of games (on the order of 20%).