summaryrefslogtreecommitdiff
path: root/src/gallium/winsys
AgeCommit message (Collapse)AuthorFilesLines
2014-04-29radeon/compute: Implement PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCYTom Stellard2-0/+6
Igor Gnatenko: v2: in define RADEON_INFO_MAX_SCLK use 0x1a instead of 0x19 (upstream changes) Bruno Jiménez: v3: Convert the frequency to MHz from kHz after getting it in 'do_winsys_init' Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2014-04-25r600g: disable async DMA on R700Marek Olšák1-1/+2
Cc: 10.0 10.1 mesa-stable@lists.freedesktop.org
2014-04-17winsys/radeon: remove some unused codeMarek Olšák1-28/+8
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-04-17winsys/radeon: remove is_handle_added arrayMarek Olšák2-30/+34
Use index -1 if a buffer is not added. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-04-17winsys/radeon: remove local variable reloc from radeon_get_relocMarek Olšák1-5/+2
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-04-17winsys/radeon: remove parameter reloc from radeon_get_relocMarek Olšák2-11/+8
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-04-16gallium/radeon: create and return a fence in the flush functionMarek Olšák4-22/+36
All flush functions get a fence parameter. cs_create_fence is removed. Reviewed-by: Christian König <christian.koenig@amd.com>
2014-04-16winsys/radeon: fold cs_set_flush_callback into cs_createMarek Olšák2-26/+12
Reviewed-by: Christian König <christian.koenig@amd.com>
2014-04-16winsys/radeon: remove cs_write_reloc, add simpler cs_get_relocMarek Olšák2-26/+19
The only difference is that it doesn't write to the CS and only returns the index. Reviewed-by: Christian König <christian.koenig@amd.com>
2014-04-16winsys/radeon: consolidate hash table lookupMarek Olšák2-68/+49
I should have done this long ago. Reviewed-by: Christian König <christian.koenig@amd.com>
2014-04-10winsys/radeon: fix a race condition in initialization of radeon_winsys::screenMarek Olšák2-3/+21
Create the screen in the winsys while the mutex is locked. This also results in a nice code cleanup! Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2014-04-10winsys/radeon: fix a race condition between winsys_create and winsys_destroyMarek Olšák3-21/+30
This also hides the reference count from drivers. v2: update the reference count while the mutex is locked in winsys_create Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2014-04-10winsys/radeon: fix a race condition between 2 calls to radeon_winsys_createMarek Olšák1-3/+17
This fixes random crashes of: piglit/glx-multithread-shader-compile. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2014-04-10winsys/radeon: remove unused radeon_info variables, move backend_mapMarek Olšák4-7/+9
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2014-04-10winsys/radeon: unify radeon_bo::flink and radeon_bo::nameMarek Olšák2-14/+10
Both contained the GEM flink name. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2014-04-10winsys/radeon: remove definitions already present in radeon_drm.hMarek Olšák4-205/+5
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2014-04-10winsys/radeon: handle squared micro tiling from GEM_GET_TILINGMarek Olšák1-0/+2
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2014-04-09r600g,radeonsi: add a bunch of useful queries for the HUDMarek Olšák4-4/+31
2014-04-09r600g,radeonsi: set correct initial domain for shared resourcesMarek Olšák2-22/+58
2014-04-09gallium/radeon: fix warningsMarek Olšák1-1/+1
2014-04-07winsys/svga: Fix prime surface references also for guest-backed surfacesThomas Hellstrom3-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>
2014-04-07winsys/svga: Update the vmwgfx_drm.h header to latest version from kernelThomas Hellstrom1-1/+12
Cc: "10.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2014-04-02winsys/svga: Replace the query mm buffer pool with a slab pool v3Thomas Hellstrom1-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>
2014-03-20winsys/radeon: only add duplicate relocations for DMA if VM isn't supportedMarek Olšák1-10/+13
Also rewrite the comment for it to be readable and reorder the code. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-03-17winsys/radeon: Store GPU virtual memory addresses of BOs in a hash tableMichel Dänzer1-48/+26
This allows retrieving the existing BO and incrementing its reference count, instead of creating a separate winsys representation for it, when the kernel reports that the BO was already assigned a virtual memory address. This fixes problems with XWayland using radeonsi and the xf86-video-wlglamor driver, which calls GEM flink outside of the radeon winsys code and creates BOs from the flinked names using the same DRM file descriptor. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-03-11r300g,uvd,vce: set priorities for relocationsMarek Olšák2-5/+7
This updates all occurences of cs_add_reloc.
2014-03-11winsys/radeon: add interface for setting a priority number for each relocationMarek Olšák2-8/+32
The cs_add_reloc change is commented out not to break compilation. The highest priority of all cs_add_reloc calls is send to the kernel.
2014-03-10ilo: do not set I915_EXEC_NO_RELOCChia-I Wu1-11/+1
This reverts most of commit d80f0c34b733a874adfdd3a2267e4deec345cc6b. Upon a closer reading, having the presumed offsets written is not enough to set the flag. EXEC_OBJECT_NEEDS_GTT and/or EXEC_OBJECT_WRITE of the reloc entries must also be set appropriately.
2014-03-10ilo: print a warning when PPGTT is disabledChia-I Wu2-0/+4
Despite what the PRMs say, the driver appears to work fine when PPGTT is disabled. But at least print a warning in that case.
2014-03-10ilo: require hardware logical context supportChia-I Wu2-2/+20
The code paths are not tested for a while, and have some known issues.
2014-03-10ilo: protect the decode context with a mutexChia-I Wu1-7/+20
The decode context is not thread safe.
2014-03-10ilo: set I915_EXEC_NO_RELOC when availableChia-I Wu2-3/+15
The winsys makes it clear that the pipe drivers should write presumed offsets. We can always set I915_EXEC_NO_RELOC when the kernel supports it.
2014-03-10ilo: move ring types to winsysChia-I Wu2-15/+19
It results in less code despite that i915_drm.h specifies the ring type as part of the execution flags.
2014-03-10ilo: winsys may limit the batch buffer sizeChia-I Wu2-0/+3
The maximum batch buffer size is determined at the time of drm_intel_bufmgr_gem_init(). Make sure the pipe driver does not exceed the limit.
2014-03-10ilo: PIPE_CAP_QUERY_TIMESTAMP may not be supportedChia-I Wu2-0/+15
Reading TIMESTAMP register may fail, depending on both kernel and hardware.
2014-03-10ilo: rework winsys batch buffer functionsChia-I Wu2-38/+47
Rename intel_winsys_check_aperture_size() to intel_winsys_can_submit_bo(), intel_bo_exec() to intel_winsys_submit_bo(), and intel_winsys_decode_commands() to intel_winsys_decode_bo(). Make a semantic change to ignore intel_context when the ring is not the render ring.
2014-03-10ilo: replace bo alloc flags by initial domainsChia-I Wu2-13/+12
The only alloc flag is INTEL_ALLOC_FOR_RENDER, which can as well be expressed by specifying the initial write domain. The change makes it obvious that we failed to set INTEL_ALLOC_FOR_RENDER in several places.
2014-03-10ilo: remove intel_bo_get_size()Chia-I Wu2-13/+0
Commit bfa8d21759c5f2b5b0885c696842167bd4c64fee uses it to work around a hardware limitation. But there are other ways to do it without the need for intel_bo_get_size().
2014-03-10ilo: remove intel_bo_get_virtual()Chia-I Wu2-24/+36
Make the map functions return the pointer directly.
2014-03-10ilo: rework winsys bo reloc functionsChia-I Wu2-26/+22
Rename intel_bo_emit_reloc() to intel_bo_add_reloc(), intel_bo_clear_relocs() to intel_bo_truncate_relocs(), and intel_bo_references() to intel_bo_has_reloc(). Besides, we need intel_bo_get_offset() only to get the presumed offset afer adding a reloc entry. Remove the function and make intel_bo_add_reloc() return the presumed offset. While at it, switch to gem_bo->offset64 from gem_bo->offset.
2014-03-10ilo: add a wrapper to cast struct intel_boChia-I Wu1-23/+28
It is just drm_intel_bo, but having a wrapper makes the code cleaner.
2014-03-10ilo: fix DRM_API_HANDLE_TYPE_FD exportChia-I Wu1-2/+0
It can be exported by drm_intel_bo_gem_export_to_prime(). The code is already in winsys, just not enabled.
2014-03-10ilo: improve winsys documentation/commentsChia-I Wu2-15/+107
Document the interface, and add comments as to why some features are enabled and why some checks are made.
2014-03-10ilo: remove intel_winsys_enable_reuse()Chia-I Wu2-11/+3
It should be an (winsys) implementation detail.
2014-03-08Revert "winsys/radeon: if there's VRAM-only usage, keep it"Marek Olšák1-28/+12
This reverts commit 67aef6dafa29fed008ea6065c425a6a92a651be9. It caused GPU hangs. The question is why. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75900
2014-03-07winsys/radeon: if there's VRAM-only usage, keep itMarek Olšák1-12/+28
2014-02-28winsys/svga: Avoid calling drm getparam for max surface size on older kernelsThomas Hellstrom1-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>
2014-02-22winsys/xlib: move xlib_create_sw_winsys within the winsysEmil Velikov2-1/+12
v2: Rebase on top of vl_winsys_xsp.c removal Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1)
2014-02-14gallium/pipebuffer: change pb_cache_manager_create() size_factor to floatBrian Paul2-2/+2
Requested by Marek. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: "10.1" <mesa-stable@lists.freedesktop.org>
2014-02-14svga/winsys: Propagate surface shared information to the winsysThomas Hellstrom3-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>