summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
Commit message (Collapse)AuthorAgeFilesLines
* winsys/radeon: Use a single buffer cache manager againMichel Dänzer2014-10-173-37/+21
| | | | | | | | | | The trick is to generate a unique buffer usage value for each possible combination of domains and flags, with only one bit set each for the domains and flags. This ensures pb_check_usage() only returns TRUE when the domains and flags the cached buffer was created for exactly match the requested ones. Reviewed-by: Marek Olšák <[email protected]>
* winsys/radeon: Use separate caching buffer manager for each set of flagsMichel Dänzer2014-10-153-41/+32
| | | | | | | | Otherwise the caching buffer manager may return a buffer which was created with a different set of flags, which can cause trouble. Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]>
* r600g,radeonsi: Set RADEON_GEM_NO_CPU_ACCESS flag for tiled BOsMichel Dänzer2014-09-102-5/+12
| | | | | | | This lets the kernel know that such BOs can be pinned outside of the CPU accessible part of VRAM. Reviewed-by: Marek Olšák <[email protected]>
* winsys/intel: drop intel_winsys.h from makefile.sourcesEmil Velikov2014-09-051-2/+1
| | | | | | | | | | | With the last revisions of commit 664c2d76947(gallium/ilo: cleanup intel_winsys.h) we moved the header from winsys to drivers, but we forgot to update the makefile.sources to reflect this. Cc: Chia-I Wu <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Chia-I Wu <[email protected]> Acked-by: Matt Turner <[email protected]>
* kms-swrast: Support Prime fd handlingAndreas Pokorny2014-09-051-11/+71
| | | | | | | | Allows using prime fds as display target and from display target. Test for PRIME capability after initializing kms_swrast screen. Cc: [email protected] Signed-off-by: Andreas Pokorny <[email protected]>
* configure.ac: Add AC_SYS_LARGEFILEMichel Dänzer2014-09-052-2/+1
| | | | | | | Making sure large file support is enabled across the tree even on 32-bit systems. Reviewed-by: Emil Velikov <[email protected]>
* 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 <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Cc: "10.1 10.2 10.3" <[email protected]>
* r600g,radeonsi: Inform the kernel if a BO will likely be accessed by the CPUMichel Dänzer2014-09-022-2/+9
| | | | | | | This allows the kernel to prevent such BOs from ever being stored in the CPU inaccessible part of VRAM. Reviewed-by: Marek Olšák <[email protected]>
* gallium/pb_bufmgr_cache: limit the size of cacheMarek Olšák2014-09-012-5/+10
| | | | | | 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.
* sw/hgl: struct haiku_displaytarget is not public structEmil Velikov2014-08-282-23/+21
| | | | | | | | It is meant to be private within the actual winsys. Remove it from the exported header, and fold it into it's only user. Cc: Alexander von Gluck IV <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* gallium/targets: Break haiku state_tracker out to own directoryAlexander von Gluck IV2014-08-283-209/+1
| | | | Ack'ed by Emil Velikov <[email protected]>
* winsys/sw: add the final files to the tarballEmil Velikov2014-08-286-0/+12
| | | | | | | | Add the final remaining files into the tarball (make dist), namely: - SConscripts - Non-autotooled winsys' - android, gdi and hgl. Signed-off-by: Emil Velikov <[email protected]>
* winsys/sw: automake: consistently use Makefile.sourcesEmil Velikov2014-08-2820-31/+41
| | | | | | | | - Include the headers within. - Update scons to use them. - Drop useless include (gallium/drivers) from scons. Signed-off-by: Emil Velikov <[email protected]>
* winsys/$(hw): ship the Android/SCons scripts in the tarballEmil Velikov2014-08-286-1/+11
| | | | Signed-off-by: Emil Velikov <[email protected]>
* winsys/$(hw): include headers in Makefile.sourcesEmil Velikov2014-08-288-14/+39
| | | | | | Otherwise 'make dist' will not pick them up :'( Signed-off-by: Emil Velikov <[email protected]>
* winsys/radeon: move radeon_cs_dump.h to drmEmil Velikov2014-08-282-2/+2
| | | | | | | | | | ... to ease packaging (make dist). Update it to fetch libdrm's include/libs via pkg-config. Cc: Marek Olšák <[email protected]> Cc: Michel Dänzer <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* 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 <[email protected]>
* winsys/i915: remove the software winsysEmil Velikov2014-08-288-490/+0
| | | | | | | | | We stopped building it recently as it was unused and not tested. Good bye, it's been nice knowing you :) Cc: Stephane Marchesin <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Stephane Marchesin <[email protected]>
* gallium/ilo: cleanup intel_winsys.hEmil Velikov2014-08-284-315/+11
| | | | | | | | | | | | | | | | Make the header location, inclusion and contents more common with its i915,r* and nouveau counterparts: - Move the header within drivers/ilo. - Separate out intel_winsys_create_for_fd into 'drm_public' header. - Cleanup the compiler includes. v2: Move the header to drivers/ilo. Suggested by Chia-I. v3: Correct intel_winsys.h inclusion. Spotted by Chia-I. Cc: Chia-I Wu <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
* ilo: rename intel_bo_map_unsynchronized()Chia-I Wu2014-08-262-4/+3
| | | | Rename it to intel_bo_map_gtt_async().
* ilo: remove max_batch_sizeChia-I Wu2014-08-262-6/+3
| | | | | It is used to derive an artificial limit on max relocs per bo. We choose not to export it anymore.
* ilo: replace domains by reloc flagsChia-I Wu2014-08-262-32/+43
| | | | | It is simpler and is supported by the kernel. It cannot be used with libdrm_intel yet though.
* ilo: fold drm_intel_get_aperture_sizes() within probe_winsys()Emil Velikov2014-08-192-13/+10
| | | | | | | | | ... and store the value in intel_winsys_info/ilo_dev_info. Suggested-by: Chia-I Wu <[email protected]> Signed-off-by: Emil Velikov <[email protected]> olv: check for errors and report raw values
* gallium/ilo: handle query_renderer capsEmil Velikov2014-08-152-0/+13
| | | | | | | | | | | Implementation based on the classic driver with the following changes: - Use auxiliarry function os_get_total_physical_memory to get the total amount of memory. - Move the libdrm_intel specific get_aperture_size to the winsys. Cc: Chia-I Wu <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* gallium/i915: handle query_renderer capsEmil Velikov2014-08-151-0/+12
| | | | | | | | | | | Implementation based on the classic driver with the following changes: - Use auxiliarry function os_get_total_physical_memory to get the total amount of memory. - Move the libdrm_intel specific get_aperture_size to the winsys. Cc: Stephane Marchesin <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* winsys/radeon: fix hawaii accel_working2 commentAndreas Boll2014-08-131-1/+1
| | | | | | | | | | accel_working2 returns 3 if the new firmware is used. The comment wasn't updated in v3 of commit: 36771dc winsys/radeon: fix nop packet padding for hawaii Signed-off-by: Andreas Boll <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* android: gallium: use the installed libdrm headersEmil Velikov2014-08-133-10/+3
| | | | | | Saves us a few lines and brings us closer to the automake build. Signed-off-by: Emil Velikov <[email protected]>
* automake: compact gallium/drivers and gallium/winsys makefilesEmil Velikov2014-08-131-77/+0
| | | | | | | | | | | | Rather than having two separate almost empty and identical makefiles, compact them thus improving the configure and build time. Additionally this makes the automake build symmetrical to the scons and android one. v2: Rebase on top of vc4, compact drivers + winsys on a single line. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* android: gallium/freedreno: add preliminary buildEmil Velikov2014-08-131-0/+37
| | | | | | | | | | | | | | | | | | For all the people interested in testing the freedreno driver on their Android devices. The next commit will hook these up within the libEGL driver (via the gallium-egl backend). There may be some rough edges but those can be sorted when a willing builder/tester comes along. v2: - s/freefreno/freedreno/. Spotted by Matt Turner. - Use the installed libdrm headers. Cc: "10.1 10.2" <[email protected]> Cc: Rob Clark <[email protected]> Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]>
* android: gallium/radeon: attempt to fix the android buildPaulo Sergio Travaglia2014-08-131-3/+1
| | | | | | | | | | | - include the correct folders - add a new buildscript for the common radeon folder v2: Use the installed libdrm headers over the DRM_TOP ones. Cc: "10.1 10.2" <[email protected]> [Emil Velikov] Split up and add commit message. Signed-off-by: Emil Velikov <[email protected]>
* android: gallium/nouveau: fix include folders, link against libstlportEmil Velikov2014-08-131-4/+1
| | | | | | | | | | | nouveau uses STL for a while now thus we need to include external/stlport/libstlport.mk in order to get the build at least partially working. v2: Use the installed libdrm headers over the DRM_TOP ones. Cc: "10.1 10.2" <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* winsys/radeon: fix nop packet padding for hawaiiAndreas Boll2014-08-123-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The initial firmware for hawaii does not support type3 nop packet. Detect the new hawaii firmware with query RADEON_INFO_ACCEL_WORKING2. If the returned value is 3, then the new firmware is used. This patch uses type2 for the old firmware and type3 for the new firmware. It fixes the cases when the old firmware is used and the user wants to manually enable acceleration. The two possible scenarios are: - the kernel has no support for the new firmware. - the kernel has support for the new firmware but only the old firmware is available. Additionaly this patch disables GPU acceleration on hawaii if the kernel returns a value < 2. In this case the kernel hasn't the required fixes for proper acceleration. v2: - Fix indentation - Use private struct radeon_drm_winsys instead of public struct radeon_info - Rename r600_accel_working2 to accel_working2 v3: - Use type2 nop packet for returned value < 3 v4: - Fail to initialize winsys for returned value < 2 Cc: [email protected] Cc: Alex Deucher <[email protected]> Cc: Jérôme Glisse <[email protected]> Cc: Marek Olšák <[email protected]> Cc: Michel Dänzer <[email protected]> Signed-off-by: Andreas Boll <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* 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 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* winsys/radeon: fix compile warningsMarek Olšák2014-08-091-3/+4
|
* radeonsi: always prefer SWITCH_ON_EOP(0) on CIKMarek Olšák2014-08-091-0/+20
| | | | | | | | | | | | | | The code is rewritten to take known constraints into account, while always using 0 by default. This should improve performance for multi-SE parts in theory. A debug option is also added for easier debugging. (If there are hangs, use the option. If the hangs go away, you have found the problem.) Reviewed-by: Alex Deucher <[email protected]> v2: fix a typo, set max_se for evergreen GPUs according to the kernel driver
* vc4: Initial skeleton driver import.Eric Anholt2014-08-085-0/+102
| | | | | | | | | | | | | | | | | | | This mostly just takes every draw call and turns it into a sequence of commands that clear the FBO and draw a single shaded triangle to it, regardless of the actual input vertices or shaders. I copied the initial driver skeleton mostly from freedreno, and I've preserved Rob Clark's copyright for those. I also based my initial hardcoded shaders and command lists on Scott Mansell (phire)'s "hackdriver" project, though the bit patterns of the shaders emitted end up being different. v2: Rebase on gallium megadrivers changes. v3: Rebase on PIPE_SHADER_CAP_MAX_CONSTS change. v4: Rely on simpenrose actually being installed when building for simulation. v5: Add more header duplicate-include guards. v6: Apply Emil's review (protection against vc4 sim and ilo at the same time, and dropping the dricommon drm bits) and fix a copyright header (thanks, Roland)
* dri: Add a new capabilities for drivers that can't share buffersGiovanni Campagna2014-07-301-3/+9
| | | | | | | | | | | | | | | | | | | The kms-dri swrast driver cannot share buffers using the GEM, so it must tell the loader to disable extensions relying on that, without disabling the image DRI extension altogether (which would prevent the loader from working at all). This requires a new gallium capability (which is queried on the pipe_screen and for swrast drivers it's forwarded to the winsys), and requires a new version of the DRI image extension. [Emil Velikov] - Rebased on top of gallium-dri megadrivers. - Drop PIPE_CAP_BUFFER_SHARE and sw_winsys::get_param hook. The can_share_buffer cap is set at InitScreen. We use a different InitScreen (and thus value for the cap) function for kms_dri, due to deeper differences originating from dri megadrivers. Signed-off-by: Emil Velikov <[email protected]>
* gallium: Add a dumb drm/kms winsys backed swrast providerGiovanni Campagna2014-07-305-0/+411
| | | | | | | | | | | | | | | | | | | | | | Add a new winsys and target that can be used with a dri2 state tracker and loader instead of drisw. This allows to use gbm as a dri2/image loader and avoid the extra copy from the backbuffer to the shadow frontbuffer. The new driver is called "kms_swrast", and is loaded by gbm as a fallback, because it is only useful with the gbm platform (as no buffer sharing is possible) To force select the driver set the environment variable GBM_ALWAYS_SOFTWARE [Emil Velikov] - Rebase on top of gallium megadriver. - s/text/test/ in configure.ac (Spotted by Andreas Pokorny). - Add scons support for winsys/sw/kms-dri and fix the build. - Provide separate DriverAPI, due to different InitScreen hook. Signed-off-by: Emil Velikov <[email protected]>
* gallium/radeon: Add some Emacs .dir-locals.el filesMichel Dänzer2014-07-291-0/+12
| | | | | | Based on the toplevel one but adapted to the driver/winsys coding styles. Reviewed-by: Marek Olšák <[email protected]>
* winsys/radeon: fix vram_size overflow with HawaiiMarek Olšák2014-07-282-4/+4
| | | | | | | This fixes piglit spec/!OpenGL 3.1/minmax. Cc: [email protected] Reviewed-by: Alex Deucher <[email protected]>
* winsys/radeon: fix indentationJerome Glisse2014-07-241-29/+29
| | | | | | | Can we please keep it clean and avoid ending up in messy situation like ddx. Signed-off-by: Jérôme Glisse <[email protected]>
* r600g/radeonsi: Use write-combined CPU mappings of some BOs in GTTMichel Dänzer2014-07-236-6/+43
| | | | Reviewed-by: Marek Olšák <[email protected]>
* winsys/radeon: Use separate caching buffer managers for VRAM and GTTMichel Dänzer2014-07-233-9/+20
| | | | | | | Should reduce overhead because the caching buffer manager doesn't need to consider buffers of the wrong type. Reviewed-by: Marek Olšák <[email protected]>
* winsys/radeon: Query the kernel for the number of SEs and SHs per SETom Stellard2014-07-212-0/+8
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ilo: move away from drm_intel_bo_alloc_tiledChia-I Wu2014-07-152-54/+59
| | | | | We want to know the exact sizes of the BOs, and the driver has the knowledge to do so. Refactoring of the resource allocation code is needed though.
* nouveau: dup fd before passing it to deviceIlia Mirkin2014-06-241-2/+17
| | | | | | | | | | | | | | | | nouveau screens are reused for the same device node. However in the scenario where we create screen 1, screen 2, and then delete screen 1, the surrounding code might also close the original device node. To protect against this, dup the fd and use the dup'd fd in the nouveau_device. Also tell the nouveau_device that it is the owner of the fd so that it will be closed on destruction. Also make sure to free the nouveau_device in case of any failure. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79823 Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2" <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]>
* scons: avoid building any piece of i915Emil Velikov2014-06-211-12/+0
| | | | | | | Leftover from commit c21fca8bf24. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* automake: stop building i915-sw and drop explicit linking to softpipeEmil Velikov2014-06-191-1/+1
| | | | | | | Unused and possibly broken. Will be completely removed in upcomming commits. Signed-off-by: Emil Velikov <[email protected]>
* radeon/compute: Implement PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITSBruno Jiménez2014-06-132-0/+8
| | | | | | | | v2: Add RADEON_INFO_ACTIVE_CU_COUNT as a define, as suggested by Tom Stellard Reviewed-by: Tom Stellard <[email protected]>
* scons: remove dri-i915 build targetEmil Velikov2014-06-091-14/+0
| | | | | | | | Unmaintained and broken. Cc: Jakob Bornecrantz <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>