aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* meson,configure: include config.h automaticallyEric Engestrom2018-03-201-4/+0
| | | | | | | | | This will prevent any more missing `#include "config.h"` bug, at the cost of having to recompile some files that didn't need to be when changing build options. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* xf86atomic: fix -Wundef warningEric Engestrom2018-01-291-1/+1
| | | | | | Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
* Fix SunOS/NetBSD atomic macroEmil Velikov2015-09-211-1/+1
| | | | | Reported-by: Evgeny Litvinenko <evgeny.v.litvinenko@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* Use __sync_add_and_fetch instead of __sync_fetch_and_add for atomic_dec_and_testMaarten Lankhorst2015-03-131-1/+1
| | | | | Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Acked-By: Emil Velikov <emil.l.velikov@gmail.com>
* Add atomic_inc_return to atomics.Maarten Lankhorst2015-03-131-0/+3
| | | | | Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Acked-By: Emil Velikov <emil.l.velikov@gmail.com>
* Stop undefining _ATOMIC_TYPE in Solaris/NetBSD section of xf86atomic.hAlan Coopersmith2015-02-121-5/+4
| | | | | | | | | | | | | | Since the atomic_set() macro references _ATOMIC_TYPE, undefining it broke that macro, resulting in build errors of: "intel_bufmgr_gem.c", line 775: undefined symbol: _ATOMIC_TYPE Now that we're leaving the macro in the namespace, renamed it to start with LIBDRM_ instead of _ to avoid polluting others namespace. Regression introduced in 87fdd32c8779648 Add NetBSD atomic ops support. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-By: Thomas Klausner <wiz@NetBSD.org>
* Add NetBSD atomic ops support.Thomas Klausner2015-01-261-3/+10
| | | | | | Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
* Fix libdrm's atomic_dec_and_test on Solaris.Thomas Klausner2015-01-261-1/+1
| | | | | | | | _nv means new value, not old value! Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
* atomic: add atomic_add_unless()Lionel Landwerlin2014-09-151-0/+9
| | | | | | Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
* Correct the Solaris definitions of atomic_add & atomic_decAlan Coopersmith2010-04-161-2/+2
| | | | | | | The #defines added in 966c9907c040b4fe4b288b4a9d82598797aee743 were mapping these to functions that don't exist. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* libdrm_radeon: Optimize cs_gem_reloc to do less looping.Pauli Nieminen2010-03-171-0/+6
| | | | | | | | | | | | | | | | | | | bo->referenced_in_cs is checked if bo is already in cs. Adding and removing reference in bo is done with atomic operations to allow parallel access to a bo from multiple contexts. cs->id generation code quarentees there is not duplicated ids which limits number of cs->ids to 32. If there is more cs objects rest will get id 0. V2: - Fix configure to check for atomics operations if libdrm_radeon is only selected. - Make atomic operations private to libdrm. This optimization decreases cs_write_reloc share of torcs profiling from 4.3% to 2.6%. Tested-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
* libdrm: Move intel_atomic.h to libdrm core for sharing.Pauli Nieminen2010-03-171-0/+93
intel_atomic.h includes very usefull atomic operations for lock free parrallel access of variables. Moving these to core libdrm for code sharing with radeon. Signed-off-by: Pauli Nieminen <suokkos@gmail.com>