aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
Commit message (Collapse)AuthorAgeFilesLines
* winsys/radeon: test the userptr ioctl to see if it's presentMarek Olšák2015-02-175-19/+35
| | | | | | There is no other way to check for support. Reviewed-by: Christian König <[email protected]>
* winsys/radeon: allow unaligned size for user-memory buffersMarek Olšák2015-02-171-1/+1
| | | | | | This is not required, but being user-friendly doesn't hurt. Reviewed-by: Christian König <[email protected]>
* winsys/radeon: allow mapping a user bufferMarek Olšák2015-02-173-2/+8
| | | | | | OpenGL requires this. Reviewed-by: Christian König <[email protected]>
* winsys/radeon: add user pointer supportChristian König2015-02-172-0/+113
| | | | | Signed-off-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* dir-locals.el: Don't set variables for non-programming modesNeil Roberts2015-02-021-1/+1
| | | | | | | | | | | | | | This limits the style changes to modes inherited from prog-mode. The main reason to do this is to avoid setting fill-column for people using Emacs to edit commit messages because 78 characters is too many to make it wrap properly in git log. Note that makefile-mode also inherits from prog-mode so the fill column should continue to apply there. v2: Apply to all the .dir-locals.el files, not just the one in the root directory. Acked-by: Michel Dänzer <[email protected]>
* gallium: Replace u_simple_list.h with util/simple_list.hEric Anholt2015-01-281-1/+1
| | | | | | | The code was exactly the same, except util/ has c++ guards and a struct simple_node declaration. Reviewed-by: Marek Olšák <[email protected]>
* winsys/radeon: increase the size of buffer cacheMarek Olšák2015-01-191-1/+1
| | | | | | | This should fix this performance regression: https://bugs.freedesktop.org/show_bug.cgi?id=88227 Reviewed-by: Michel Dänzer <[email protected]>
* gallium/state_tracker: Rewrite Haiku's state trackerAlexander von Gluck IV2015-01-011-4/+20
| | | | | * More gallium-like * Leverage stamps properly and don't call mesa functions
* gallium: Remove Android files from distribution.Matt Turner2014-12-126-10/+2
| | | | Android builds Mesa from git, so there don't need to be in the tarball.
* Remove useless checks for NULL before freeingMatt Turner2014-12-081-4/+2
| | | | | | | See commits 5067506e and b6109de3 for the Coccinelle script. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* winsys/radeon: Always report at least 1 compute unitTom Stellard2014-12-081-0/+2
| | | | | | | | All uses of this require that the value be at least one, so it's easier to report at least one than having to wrap all uses in MAX2(max_compute_units, 1). Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: Program RASTER_CONFIG for harvested GPUs v5Tom Stellard2014-12-082-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Harvested GPUs have some of their render backends disabled, so in order to prevent the hardware from trying to render things with these disabled backends we need to correctly program the PA_SC_RASTER_CONFIG register. v2: - Write RASTER_CONFIG for all SEs. v3: - Set GRBM_GFX_INDEX.INSTANCE_BROADCAST_WRITES bit. - Set GRBM_GFX_INFEX.SH_BROADCAST_WRITES bit when done setting PA_SC_RASTER_CONFIG. - Get num_se and num_sh_per_se from kernel. v4: - Get correct value for num_se - Remove loop for setting PA_SC_RASTER_CONFIG - Only compute raster config when a backend has been disabled. v5: Michel Dänzer - Fix computation for chips with multiple SEs https://bugs.freedesktop.org/show_bug.cgi?id=60879 CC: "10.4 10.3" <[email protected]>
* winsys/sw/wrapper: implement is_displaytarget_format_supported for swrastChristoph Bumiller2014-11-181-0/+14
| | | | | Acked-by: Jose Fonseca <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
* dri/kms: Always zero out struct drm_mode_create_dumbThierry Reding2014-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The DRM_IOCTL_MODE_CREATE_DUMB (and others) IOCTL isn't very rigorously specified, which has the effect that some kernel drivers do not consider the .pitch and .size fields of struct drm_mode_create_dumb outputs only. Instead they will use these as lower bounds and overwrite them only if the values that they compute are larger than what userspace provided. This works if and only if userspace initializes the fields explicitly to either 0 or some meaningful value. However, if userspace just leaves the values uninitialized and the struct drm_mode_create_dumb is allocated on the stack for example, the driver may try to overallocate buffers. Fortunately most userspace does zero out the structure before passing it to the IOCTL, but there are rare exceptions. Mesa is one of them. In an attempt to rectify this situation, kernel drivers are being updated to not use the .pitch and .size fields as inputs. However in order to fix the issue with older kernels, make sure that Mesa always zeros out the structure as well. Future IOCTLs should be more rigorously defined so that structures can be validated and IOCTLs rejected if output fields aren't set to zero. Signed-off-by: Thierry Reding <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* ilo: fix intel_bo_wait() on kernel 3.17Chia-I Wu2014-11-061-1/+7
| | | | | | drm_intel_gem_bo_wait() with negative timeout is broken on kernel 3.17. Signed-off-by: Chia-I Wu <[email protected]>
* r300g: remove enabled/disabled hyperz and AA compression messagesMarek Olšák2014-10-301-2/+0
| | | | | | It's annoying with octave. Reported by Michael Burian. Cc: 10.2 10.3 <[email protected]>
* 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
|