summaryrefslogtreecommitdiff
path: root/amdgpu/amdgpu.h
AgeCommit message (Collapse)AuthorFilesLines
2017-05-16amdgpu: add missing extern "C" headersNicolai Hähnle1-0/+8
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Xie <AlexBin.Xie@amd.com>
2017-04-18amdgpu: add the interface of waiting multiple fencesNicolai Hähnle1-0/+23
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> [v2: allow returning the first signaled fence index] Signed-off-by: monk.liu <Monk.Liu@amd.com> [v3: - cleanup *status setting - fix amdgpu symbols check v4: simplify return from amdgpu_cs_wait_fences (suggested by Edward O'Callaghan)] Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> (v1) Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> (v1) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-04-07amdgpu: allow to query GPU sensor related informationSamuel Pitoiset1-0/+18
This exposes amdgpu_query_sensor_info(). v2: - add amdgpu_query_sensor_info() to the symbols list Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-04-03amdgpu: add amdgpu_bo_va_op_rawNicolai Hähnle1-0/+28
This variant allows the caller full control over flags and size, and allows passing a NULL bo (for PRT support). Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: Jerry Zhang <Jerry.Zhang@amd.com> Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2016-11-07amdgpu: add the function to get the marketing name (v4)Junwei Zhang1-0/+10
This function is used to look up the marking name for a specific board. v2: agd: Squash in subsequent updates to the table. v3: [Michel Dänzer] * Make amdgpu_asic_id_table static, so it's not exported from libdrm_amdgpu.so.1 * Add amdgpu_get_marketing_name to amdgpu-symbols-check * Fix indentation of second line of if statement * Squash in another change removing redundant entries * Change spelling of "RADEON" -> "Radeon" * Remove "(TM)" from a minority of entries v4: [Michel Dänzer] * Use const char* instead of fixed size array for marketing_name (Emil Velikov) Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Flora Cui <Flora.Cui@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-04-07amdgpu: Fix spelling mistakesEric Engestrom1-2/+2
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-01-20amdgpu: add semaphore supportMarek Olšák1-0/+65
the semaphore is a binary semaphore. the work flow is: 1. create sem 2. signal sem 3. wait sem, reset sem after signalled 4. destroy sem. Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-08-17amdgpu: add flag to support 32bit VA address v4Jammy Zhou1-0/+5
The AMDGPU_VA_RANGE_32_BIT flag is added to request VA range in the 32bit address space for amdgpu_va_range_alloc. The 32bit address space is reserved at initialization time, and managed with a separate VAMGR as part of the global VAMGR. And if no enough VA space available in range above 4GB, this reserved range can be used as fallback. v2: add comment for AMDGPU_VA_RANGE_32_BIT, and add vamgr to va_range v3: rebase to Emil's drm_private series v4: fix one warning Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-08-13amdgpu: squash trivial documentation typoEmil Velikov1-1/+1
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-08-13amdgpu: cosmetic chances in license boilerplateEmil Velikov1-1/+1
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-08-05amdgpu: expose the PCI revision IDJammy Zhou1-0/+2
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>
2015-08-05amdgpu: add VCE harvesting instance queryLeo Liu1-0/+2
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>
2015-08-05amdgpu: add amdgpu_bo_va_op for va map/unmap support v3Jammy Zhou1-28/+26
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>
2015-08-05amdgpu: add flags parameter for amdgpu_va_range_allocJammy Zhou1-1/+3
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>
2015-08-05amdgpu : move management of user fence from libdrm to UMDKen Wang1-9/+30
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>
2015-08-05amdgpu: use common fence structure for dependencies as well.Christian König1-31/+8
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>
2015-08-05amdgpu: improve the amdgpu_cs_query_fence_status interfaceJammy Zhou1-7/+4
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>
2015-08-05amdgpu: add va range query interfaceSabre Shao1-0/+21
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>
2015-08-05amdgpu: add va allocation intefacesSabre Shao1-0/+66
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>
2015-08-05drm/amdgpu: allow passing absolute timeouts to amdgpu_cs_query_fence_statusMarek Olšák1-1/+6
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>
2015-08-05amdgpu: remove reference to AMD specific error codesChristian König1-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>
2015-08-05amdgpu: cleanup public interface styleChristian König1-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>
2015-08-05amdgpu: add CS dependencies v2Christian König1-0/+36
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>
2015-08-05amdgpu: cleanup gds specific alloc/free functionsJammy Zhou1-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>
2015-08-05amdgpu: add amdgpu_query_gds_infoJammy Zhou1-3/+2
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-05amdgpu: remove bo_handle from amdgpu_cs_ib_info, IBs should be in buffer listMarek Olšák1-5/+2
Reviewed-by: Christian König <christian.koenig@amd.com>
2015-08-05amdgpu: remove amdgpu_ib helpersMarek Olšák1-70/+0
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-08-05amdgpu: remove amdgpu_ibMarek Olšák1-10/+3
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>
2015-08-05amdgpu: get rid of IB pool management v3Jammy Zhou1-19/+0
v1: by Jammy Zhou v2: remove bo wait when destroy IB by Jammy Zhou v3: more cleanups by Marek Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-08-05amdgpu: add ce_ram_size for interface queryKen Wang1-0/+2
Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-08-05amdgpu: add vram_type and vram_bit_width for interface queryKen Wang1-0/+4
Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-08-05amdgpu: add max_memory_clock for interface queryKen Wang1-0/+2
Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-08-05amdgpu: add IB sharing support v2Jammy Zhou1-0/+3
A new 'offset' flag is added to the amdgpu_cs_ib_info structure, which can be used to specify location of PM4 packets to execute in the IB buffer object v2: remove the shared IB flag, etc Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-05amdgpu: add amdgpu_bo_list_update interface v2Jammy Zhou1-0/+19
v2: some minor improvement Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-08-05amdgpu: remove unused AMDGPU_IB_RESOURCE_PRIORITYJammy Zhou1-11/+0
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-08-05amdgpu: fix the number of IB size enumsJammy Zhou1-6/+6
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-08-05amdgpu: implement amdgpu_cs_query_reset_stateMarek Olšák1-22/+3
v2: also return the number of hangs Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-08-05amdgpu: reuse the kernel IB flags v2Jammy Zhou1-6/+0
v2: remove 'CE' from the preamble flag Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-08-05amdgpu: remove active_rb_pipes from amdgpu_gpu_infoJammy Zhou1-2/+0
The active RB pipes can be retrieved from enabled_rb_pipes_mask, for which each bit indicates one active pipe if it is '1'. Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-08-05amdgpu: add public bo list interface v3Christian König1-10/+41
v2: cleanup comments and function parameter v3: rebased on internal branch Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-05amdgpu: cleanup public interface v2Christian König1-18/+6
Remove the mostly unused device parameter, for the few cases where we really need it keep a copy in the context structure. v2: rebased on internal branch Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-05drm: add libdrm_amdgpu (v7)Alex Deucher1-0/+1276
This is the new ioctl wrapper used by the new admgpu driver. It's primarily used by xf86-video-amdgpu and mesa. v2: fix amdgpu_drm.h install v3: Integrate some of the sugestions from Emil: clean up Makefile.am, configure.ac capitalize header guards fix _FILE_OFFSET_BITS with config.h use drm_mmap/drm_munmap Remove unused ARRAY_SIZE macro use shared list implementation use shared math implementation use drmGetNodeTypeFromFd helper v4: remove unused tiling defines v5: include amdgpu.h in Makefile.am v6: update amdgpu_drm.h v7: libdrm.h -> libdrm_macros.h Signed-off-by: Alex Deucher <alexander.deucher@amd.com>