aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* remove usage of 'c_plusplus' preprocessor macroTapani Pälli2015-08-103-6/+6
| | | | | | | Use only __cplusplus which is supported by the C++ standard. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* add a note about which version of cunit is fixed for debian/ubuntuAlex Deucher2015-08-061-0/+1
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* move up cunit workaround for ubuntu/debianAlex Deucher2015-08-061-13/+11
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* fix amdgpu cunit configure test harderAlex Deucher2015-08-061-2/+3
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* fix configuration when amdgpu is disabledAlex Deucher2015-08-061-1/+1
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: Remove unused local variables bo_size/offset from amdgpu_cs_submitMichel Dänzer2015-08-051-2/+0
| | | | Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* amdgpu: expose the PCI revision IDJammy Zhou2015-08-052-0/+3
| | | | | | | The PCI revision ID can be used to differentiate ASICs. Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* libdrm/amdgpu: Use private fd for amdgpu_device and winsys hash table to fix ↵Mario Kleiner2015-08-051-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ZaphodHeads. (v2) The amdgpu_device for a device node needs its own dup'ed fd, instead of using the original fd passed in for a screen, to make multi-x-screen ZaphodHeads configurations work on amdgpu. The original fd's lifetime differs from that of the amdgpu_device, and from the one stored in the hash. The hash key is the fd, and in order to compare hash entries we fstat them, so the fd must be around for as long as the amdgpu_device is. This patch for libdrm/amdgpu is a translation of the radeon-winsys ZaphodHeads fix for mesa's radeon-winsys, from mesa commit 28dda47ae4d974e3e032d60e8e0965c8c068c6d8 "winsys/radeon: Use dup fd as key in drm-winsys hash table to fix ZaphodHeads." Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> v2: Check for valid fd's being >= 0, because fd == 0 is in theory a valid, although unlikely, fd and fd == -1 would denote an invalid fd. Thanks to William Lewis for pointing this out. Reported-by: William Lewis <minutemaidpark@hotmail.com> Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
* libdrm/amdgpu: Fixed drm.h include.Alexandr Akulich2015-08-051-1/+1
| | | | | | | The include type changed from system to own. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alexandr Akulich <akulichalexander@gmail.com>
* amdgpu/tests: Cast CPU map argument of amdgpu_bo_alloc_and_map to void**Michel Dänzer2015-08-051-6/+8
| | | | | | Silences incompatible pointer type compiler warnings. Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu/tests: Use buf_handle in amdgpu_bo_alloc_and_map() error pathsMichel Dänzer2015-08-051-3/+3
| | | | | | The compiler pointed out that bo has the wrong type. Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: add VCE harvesting instance queryLeo Liu2015-08-053-0/+5
| | | | | | Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* test/amdgpu : fix a bug in VCE/UVD test introduced by previous changeKen Wang2015-08-052-0/+4
| | | | | Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* amdgpu: add amdgpu_bo_va_op for va map/unmap support v3Jammy Zhou2015-08-058-243/+391
| | | | | | | | | | | | The following interfaces are changed accordingly: - amdgpu_bo_alloc - amdgpu_create_bo_from_user_mem v2: update the interfaces v3: remove virtual_mc_base_address from amdgpu_bo Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: add flags parameter for amdgpu_va_range_allocJammy Zhou2015-08-052-2/+5
| | | | | | | | The flags is added for extensibility to cover some special requirements in the future, i.e, request VA range in the first 4GB of address space Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu : move management of user fence from libdrm to UMDKen Wang2015-08-056-134/+69
| | | | | | Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* amdgpu: fix bs buffer size for vce testChristian König2015-08-051-1/+1
| | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* tests/amdgpu: remove the duplicate IB allocation for VCE testJammy Zhou2015-08-051-8/+0
| | | | | Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* drm: fix the ALIGN macro to avoid value clampJammy Zhou2015-08-051-1/+2
| | | | | | | | If the value is 64bit, but the alignment is 32bit type, the high 32bit will be clamped with previous definition Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: Use drmIoctl in amdgpu_ioctl_wait_csMichel Dänzer2015-08-051-6/+2
| | | | | | | | | | This is safe now because the ioctl uses an absolute timeout. This prevents amdgpu_cs_query_fence_status from returning early e.g. when a signal is delivered, which in turn caused Mesa winsys code to assume a BO was idle when it actually wasn't yet. Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: use common fence structure for dependencies as well.Christian König2015-08-055-40/+17
| | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* amdgpu: improve the amdgpu_cs_query_fence_status interfaceJammy Zhou2015-08-055-22/+27
| | | | | | | make amdgpu_cs_query_fence reusable to support multi-fence query Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: add va range query interfaceSabre Shao2015-08-052-0/+32
| | | | | | | | amdgpu_va_range_query interface is added so that client can query va range supported by specific device. Signed-off-by: Sabre Shao <Sabre.Shao@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* amdgpu: add va allocation intefacesSabre Shao2015-08-053-1/+118
| | | | | | | | | | Two new interfaces are added to support client request for allocate virtual address without physical memory committed to. The virtual address space can be managed by client itself. Signed-off-by: Sabre Shao <Sabre.Shao@amd.com> Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* amdgpu: add base_preferred parameter to amdgpu_vamgr_find_vaKen Wang2015-08-053-17/+35
| | | | | | | | base_preferred parameter is added to amdgpu_vamgr_find_va so UMD can specify preferred va address when allocating. Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* amdgpu: check the user fence only if the IP supports user fencesMarek Olšák2015-08-051-13/+18
| | | | | | Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* drm/amdgpu: allow passing absolute timeouts to amdgpu_cs_query_fence_statusMarek Olšák2015-08-052-3/+14
| | | | | | | Useful when Mesa wants to wait for a lot of fences at the same time and doesn't want to recalculate the relative timeout after every call. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: remove reference to AMD specific error codesChristian König2015-08-051-32/+2
| | | | | | | We just have never defined any. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* amdgpu: cleanup public interface styleChristian König2015-08-051-136/+90
| | | | | | | | | | Fix some style problems, adjust to a common indentation, reorder two function definitions and remove stale comments. No intended functional change. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* gitignore: add some generated amdgpu filesChristian König2015-08-051-0/+2
| | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* amdgpu: add CS dependencies v2Christian König2015-08-052-1/+69
| | | | | | | | | | This allows the driver to specify on which previous CS to wait. v2: fix spelling in comment Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1) Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* amdgpu: update to the latest kernel headerAlex Deucher2015-08-051-44/+91
| | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: remove pointer arithmetic from command submissionChristian König2015-08-051-12/+6
| | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* amdgpu: do NULL check for bo handle in amdgpu_bo_query_infoJammy Zhou2015-08-051-0/+4
| | | | | Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: cleanup VA IOCTL handlingChristian König2015-08-052-32/+18
| | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: remove flink export workaround v2Christian König2015-08-051-6/+0
| | | | | | | | | Alternative solution to Mareks patch to stop causing trouble with render nodes. v2: rebased Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: explicitly unmap GPU mapping on BO destructionChristian König2015-08-051-24/+57
| | | | | | | That exercises the IOCTL and stops relying us on implicit unmapping. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: merge amdgpu_drm.h from kernelJammy Zhou2015-08-051-10/+7
| | | | | Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: cleanup gds specific alloc/free functionsJammy Zhou2015-08-051-60/+0
| | | | | | | amdgpu_bo_alloc/free can be used with GDS/OA/QWS domains specified Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: add amdgpu_query_gds_infoJammy Zhou2015-08-052-3/+27
| | | | | Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: fix double mutex_unlock in amdgpu_bo_importMarek Olšák2015-08-051-1/+1
| | | | | | | The handles array is used below, which is followed by another unlock, so remove the first one. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: fix valgrind warningsMarek Olšák2015-08-052-2/+2
| | | | Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: use alloca and malloc in critical codepaths (v2)Marek Olšák2015-08-052-12/+23
| | | | | | | | And don't clear the memory when it's unnecessary. v2: use malloc for arrays that can be big Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: allow exporting KMS handles with render nodesMarek Olšák2015-08-051-3/+5
| | | | Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: add zero timeout check in amdgpu_cs_query_fence_statusJack Xiao2015-08-051-0/+5
| | | | | Signed-off-by: Jack Xiao <Jack.Xiao@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
* amdgpu: remove bo_handle from amdgpu_cs_ib_info, IBs should be in buffer listMarek Olšák2015-08-057-27/+68
| | | | Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: remove amdgpu_ib helpersMarek Olšák2015-08-056-214/+102
| | | | | Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: remove amdgpu_ibMarek Olšák2015-08-056-80/+32
| | | | | | | Not useful if we're gonna use BO handles directly. Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: don't use amdgpu_cs_create_ib for allocation of the fence BOMarek Olšák2015-08-052-9/+28
| | | | | | | amdgpu_cs_create_ib will go away. Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* tests/amdgpu: manage IB in client sideJammy Zhou2015-08-052-7/+15
| | | | | Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>