summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-05-27tests/amdgpu: bypass UVD CS tests on ravenHawking Zhang1-0/+17
raven doesn't support UVD decode Change-Id: Ibc3a3a1b1007aaf7cf8de8b6ccd2457167f11fcb Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Xiaojie Yuan <Xiaojie.Yuan@amd.com>
2017-05-24amdgpu: don't print version of amdgpu.idsXiaojie Yuan1-1/+0
Change-Id: I017ccc4bd25c31ccd937615c556c01359942246e Signed-off-by: Xiaojie Yuan <Xiaojie.Yuan@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
2017-05-17tests/amdgpu: implement vcn dec unit testsLeo Liu2-3/+166
Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
2017-05-17tests/amdgpu: add vcn tests support and setsLeo Liu4-1/+300
Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
2017-05-17tests/amdgpu: move decode sum to commonLeo Liu2-1/+3
Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
2017-05-17tests/amdgpu: separate decode messagesLeo Liu2-1/+5
AVC decode messages will be common with VCN decode Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
2017-05-17tests/amdgpu: rename uvd messages to decode messagesLeo Liu2-5/+5
It will be shared with VCN decode Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
2017-05-17amdgpu/drm: add AMDGPU_HW_IP_VCN_ENCLeo Liu1-1/+2
Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-05-17amdgpu/drm: add AMDGPU_HW_IP_VCN_DECLeo Liu1-1/+2
Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-05-17amdgpu: add raven family idHawking Zhang1-0/+1
Change-Id: Ie2d8f6a6cd53e2747c815ecc5cc0b296e64184d3 Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
2017-05-17amdgpu: move asic id table to a separate fileXiaojie Yuan6-173/+229
v2: refine error handling extend marketing_name for future extension add version header for marketing.ids v3: adjust struct amdgpu_asic_id considering cache line alignment v4: rename marketing.ids to amdgpu.ids following the naming convention of usb.ids and pci.ids v5: e8447913bf8d6f1606573d0510266224ac40b634 ignore empty line and commented line in amdgpu.ids b8846df6646c23c576111a7f72a126595d7e9581 free asic_ids at the right place to avoid double free 21321a1a0cf46993da310f963cd54d085e7c7239 ignore leading whitespaces or tabs when parsing marketing names 5fba2c1f31289cf302a692527be8db74065c3c8d ignore empty and commented lines before version Signed-off-by: Xiaojie Yuan <Xiaojie.Yuan@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
2017-05-17amdgpu: [HYBRID] add AMDGPU_CAPABILITY_SSG_FLAGQiang Yu1-0/+2
This is for UMD be able to query SSG present. Change-Id: Id52286984c8a43b77ad443799b267a6d0b23df54 Signed-off-by: Qiang Yu <Qiang.Yu@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
2017-05-17amdgpu: add interface for reserve/unserve vmid v2Chunming Zhou2-0/+41
v2: delete unused comments. Change-Id: If533576eb8a65bd019a3480d6fe2a64f23e3c944 Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
2017-05-17amdgpu: add vm ioctl support for reserved vmidChunming Zhou1-0/+22
Change-Id: I3c1ea377dad8f6d64a992b071a6ec36a1143e416 Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
2017-05-17amdgpu: export more gpu info for gfx9 (v2)Junwei Zhang1-0/+19
v2: 64-bit aligned Change-Id: If477c7f7499f8ac6766d0b7c29221616e93ff0e2 Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Qiang Yu <Qiang.Yu@amd.com>
2017-05-17[HYBRID] amdgpu: unify dk drm header changesQiang Yu1-5/+12
This is needed by close source components only (OGL). Change-Id: I069da74ed41c40561cd95ef28bb8810fe4d64353 Signed-off-by: Qiang Yu <Qiang.Yu@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
2017-05-17amdgpu: [hybrid] add a flag of memory allcation from topJunwei Zhang1-0/+2
Change-Id: I740c9f93a483b9cb728892963c7a0d6577819d59 Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
2017-05-17amdgpu:support 16 ibs per submit for PAL/SRIOVQiang Yu1-1/+1
to support SRIOV and MCBP, need 16 IBs per submit Change-Id: I1da908821e808c368a0c114a57445da682beb6f9 Signed-off-by: Qiang Yu <Qiang.Yu@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
2017-05-17tests/amdgpu: implement hevc encode test v2Boyuan Zhang2-30/+233
v2: 2fc4b7adae824313a169fc33e80aa62c1105be99 [Ken Wang] fix test failure on pre-vega10 card (part) Change-Id: I3d77e1e7f60b2b806a9134f94ba851cee699f4a9 Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Ken Wang <Qingqing.Wang@amd.com>
2017-05-17tests/amdgpu: add uve ib headerBoyuan Zhang1-0/+323
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
2017-05-17tests/amdgpu: add uvd enc unit tests v2Leo Liu4-1/+326
v2: 2fc4b7adae824313a169fc33e80aa62c1105be99 [Ken Wang] fix test failure on pre-vega10 card (part) Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Ken Wang <Qingqing.Wang@amd.com>
2017-05-17amdgpu: Sparse resource support for Vulkan v2David Mao5-0/+174
v2: 4836092b3c2ae93a1970a343137da6a6a8658152 forget to clean up the va remaps if the sparse image/buffer is going to be destroyed 7d339e3d804f23e4a1e72a82302e5e976b4d5794 [Xiaojie Yuan] fix null ptr dereference in va range free 6c11e6bffd882ae40784ed5d8822be0ae9295249 [Monk Liu] fix incorrect use on the remap_mutex In order to support sparse resource required by Vulkan, some changes are applied to libdrm. - va_map/unmap need to inc/dec the ref count of the buffer object, otherwise, the buffer may be freed ahead of va unmapping. - UMD want to unmap the va range without passing in the bo handle, libdrm have to maintain the mapping between va/offset/size and amdgpu_bo_handle. the remap_list is added to each device to maintain the va mapping. - It is a valid use case to remap the va to different bo. but Kernel did not support that. Therefore, I modify the libdrm to find the overlapped va and unmap the va first before mapping the va to the new bo. After these changes, dEQP-VK.api.buffer_[0,1,5,7] test are passed now. Signed-off-by: David Mao <david.mao@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Monk Liu <Monk.Liu@amd.com> Signed-off-by: Xiaojie Yuan <Xiaojie.Yuan@amd.com>
2017-05-17test case for export/import semDavid Mao1-0/+60
Test covers basic functionality includes create/destroy/import/export/wait/signal Change-Id: I8a8d767e5ef1889f8ac214fef98befba83969d8d Signed-off-by: David Mao <david.mao@amd.com> Signed-off-by: Flora Cui <Flora.Cui@amd.com> Acked-by: Hawking Zhang <Hawking.Zhang@amd.com>
2017-05-17implement import/export semFlora Cui3-0/+53
Change-Id: I4900fbb046c912a905eded8a8349fa98b3ba822b Signed-off-by: Flora Cui <Flora.Cui@amd.com> Acked-by: Hawking Zhang <Hawking.Zhang@amd.com>
2017-05-17amdgpu: add new semaphore support v2Chunming Zhou3-0/+194
v2: 612336476adaffdd715fcc74c5aabceee8d53add [Flora Cui] refine semaphore implementation to keep align with kmd 65f50d04e5083f9ed6f641a83b2b6d9190fc4cae [Monk Liu] fix SEM paramter issue for SEM ioctl, seq 0 means nothing to signal/wait and ~0ull means use the latest fence number to signal/wait Change-Id: I40ef6126efda61a4dcfff59531cd2a7b85ae8f01 Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com> Signed-off-by: Flora Cui <Flora.Cui@amd.com> Signed-off-by: Monk Liu <Monk.Liu@amd.com>
2017-05-17tests/amdgpu: add direct gma testFlora Cui1-1/+63
Change-Id: Ib00252eff16a84f16f01039ff39f957bff903bae Signed-off-by: Flora Cui <Flora.Cui@amd.com>
2017-05-17amdgpu: implement direct gmaFlora Cui3-1/+109
Change-Id: I37a6a0f79a91b8e793fc90eb3955045bebf24848 Signed-off-by: Flora Cui <Flora.Cui@amd.com>
2017-05-17drm/amdgpu: add freesync ioctl definesHawking Zhang1-0/+17
Change-Id: Id5d607fee4ae119015ca685a508a2ee140a8e331 Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Flora Cui <Flora.Cui@amd.com>
2017-05-17amdgpu/tests: Add the test case for amdgpu_get_fb_id and ↵jqdeng1-0/+22
amdgpu_get_bo_from_fb_id v2 v2: 502c3f21127b5253c46ae23bdd563dbce4fb57ae [Flora Cui] stop fb_id test for ASIC without output Signed-off-by: jqdeng <Emily.Deng@amd.com> Reviewed-by: Chunming Zhou <David1.Zhou@amd.com> Signed-off-by: Flora Cui <Flora.Cui@amd.com>
2017-05-17amdgpu: Add interface amdgpu_get_bo_from_fb_id v2jqdeng3-0/+119
The amdgpu_get_bo_from_fb_id is used to export the crtc's framebuffer's buffer object to OpenGL driver for capturing desktop to OpenGL texture.This is alse used by linux rapidfire server. v2: 51547965007f4e4cdbd47a40b3879528412be7eb Fix memory leak in amdgpu_get_bo_from_fb_id Change-Id: Id315a05147035b4ce16f72d627881c5166015473 Signed-off-by: jqdeng <Emily.Deng@amd.com> Reviewed-by: Chunming Zhou <David1.Zhou@amd.com>
2017-05-17amdgpu: Add interface amdgpu_get_fb_id v2jqdeng3-0/+68
The amdgpu_get_fb_id is used to export the crtc's framebuffer's buffer id to OpenGL driver for capturing desktop to OpenGL texture. This is for linux rapidfire server. v2: c73ce6e5a9df8827b480f9104de6c28b5f9bc6f0 Fix memory leak in amdgpu_get_fb_id Change-Id: I336fab1585bbdcf6f789c4bab533e4d1f01842ec Signed-off-by: jqdeng <Emily.Deng@amd.com> Reviewed-by: Chunming Zhou <David1.Zhou@amd.com>
2017-05-17amdgpu: Make amdgpu_get_auth to non-staticjqdeng2-1/+15
The amdgpu_get_auth will be used by another two functions amdgpu_get_fb_id and amdgpu_get_bo_from_fb_id, so make it to non-static, and add definition to amdgpu_internal.h. Signed-off-by: jqdeng <Emily.Deng@amd.com> Reviewed-by: Chunming Zhou <David1.Zhou@amd.com>
2017-05-17amdgpu: add amdgpu_bo_inc_ref() function.Qiang Yu2-1/+20
Change-Id: Icdc00d3e22e48120ca6f4d73ffd05ba43551ad2c Signed-off-by: Qiang Yu <Qiang.Yu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2017-05-17amdgpu: add bo handle to hash table when cpu mappingChunming Zhou1-1/+1
Change-Id: Id79d98877c61510a1986d65befec6ce6713edae7 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>
2017-05-17amdgpu: change max allocationChunming Zhou1-2/+2
Change-Id: I83f8f33140609d4d2c3e54954cc2dc96eeaec6ba Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-05-17tests/amdgpu: add alloc va from range test v2Flora Cui1-0/+54
v2: ce907d89891ead5f26ffe821d47848a8c4241c82 move va_range_test above svm_test svm_test won't release va range at exit. va_range_test would desired range is occupied. Change-Id: Ie430345b42da6884d5296f057d4214b2d3f12788 Signed-off-by: Flora Cui <Flora.Cui@amd.com> Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
2017-05-17amdgpu: support alloc va from range v2Flora Cui2-0/+230
v2: 7f0478c3a7aea7a1a85ade12b2091d41ce5fcf15 [Junwei Zhang] va allocation may fall to the range outside of requested [min,max] 8a0a75fbbe641bb3c7b4564004ed2cbb10a68ffd [Ken Wang] fix a bug in va range allocation Change-Id: I05f24e44863aeffa7bcd735bf787a5328d587044 Signed-off-by: Flora Cui <Flora.Cui@amd.com> Reviewed-by: Ken Wang <Qingqing.Wang@amd.com> Signed-off-by: David Mao <david.mao@amd.com>
2017-05-17amdgpu: add amdgpu_find_bo_by_cpu_mapping interfaceChunming Zhou3-0/+75
userspace needs to know if the user memory is from BO or malloc. Change-Id: I7fdb494c31f6d9f96b4d7238bf0998d0fe701608 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>
2017-05-17amdgpu: add amdgpu_query_capability interface v2jimqu3-0/+39
v2: ef1af912181c816eae8136ed2a4ad398731a51d3 amdgpu: add query amdgpu capability defination a3e54ad86d25445b77f69e4224206b4629a03333 add query amdgpu pinning memory capability defination c4f4bec65e64524c54dfd156dd36ae3fd3facf1f add more capability query Change-Id: I89aab43caf4a45edb6bd5ed3fe6c7d3213045fb3 Signed-off-by: JimQu <Jim.Qu@amd.com> Signed-off-by: Flora Cui <Flora.Cui@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2017-05-17amdgpu: add sparse flag for bo creatation v2Junwei Zhang1-0/+2
v2: 7987cf4262d2cf83f32eb5debef9aefa791c1505 update GEM flag bit for 64-bit extension Change-Id: Ie291d391d0f68e7ff9028b3713808c38002d84c6 Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Flora Cui <Flora.Cui@amd.com>
2017-05-17amdgpu: expose the AMDGPU_GEM_CREATE_NO_EVICT flag v2Jammy Zhou1-0/+4
With this flag specified, the buffer will be pinned at allocation time. v2: 8991a3cc7ff9947474aa071c1dc2fd88d9808f16 [Flora Cui] change AMDGPU_GEM_CREATE_NO_EVICT flag definition to avoid conflict with upstream flags. 7987cf4262d2cf83f32eb5debef9aefa791c1505 [Junwei Zhang] update GEM flag bit for 64-bit extension Change-Id: Iad8c81302ebf468dc45233ca7a91e6c83cb27a5f Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Signed-off-by: Flora Cui <Flora.Cui@amd.com> Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
2017-05-17amdgpu: add query for aperture va rangeFlora Cui3-0/+93
Change-Id: I65814c6f8db2fa51f8267ae202c1d9999e9fe82b Signed-off-by: Flora Cui <flora.cui@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-05-17tests/amdgpu: Add test for multi GPUs SVM test v4Qiang Yu1-0/+70
1. We try to open all GPUs when test starts. 2. Test multi GPUs for SVM v2: 1. Adjust title 2. Use drmGetDevices to get the number of cards available. 3. Add warning output option and facility into this unit test app. 4. Adjust a comment and delete useless C statement when open function call fails. 5. Add two informative outputs in single SVM test. v3: 1. Use general device name from drmGetDevices instead of fixed name. 2. open devices in a single "for" statement. 3. Create a function to close all devices. v4: [Qiang Yu] drop open all devices and amdgpu_printf changes [Jammy Zhou] 2f8e2d2e4a406bc290986eac600f4263259b5ac5 amdgpu_multi_svm_test part Signed-off-by: Alex Xie <AlexBin.Xie@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Qiang Yu <Qiang.Yu@amd.com> Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Change-Id: I481155784e7ebcfda3bfc7e68932a33d01d6843a
2017-05-17amdgpu: Implement multiGPU SVM support v3Alex Xie3-22/+63
With this change, if there are multiple GPU devices, SVM range and allocation is global to all GPU devices. This is to meet the OpenCL 2.0 SVM requirement. This is not a perfect solution. But we have not found better solution. Constraints: 1. Application should initialize all relevant devices before allocate SVM address. 2. If devices do not have similar GPU VM configuration, libdrm can disable SVM when new device are initialized. v3: a912dddb82071781c21265725556404ee2837e5e undo reference counter when SVM init fails 869a8f1c8a73aeddaf9439796df89955044553fb fix to free va for svm at deinit 885418a66eb9922f416ce2551bac9f1297599af9 Mark SVM invalid when deinit SVM in any GPU device. To make SVM valid again, application should deinte all devices and re-initialize all GPU devices again. v2: 1. Put svm_refcount and svm_valid as a field of amdgpu_bo_va_mgr. 2. Adjust title. Signed-off-by: Alex Xie <AlexBin.Xie@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Xiaojie Yuan <Xiaojie.Yuan@amd.com>
2017-05-17amdgpu: SVM test v3Alex Xie1-0/+54
SWDEV-75927: Coarse Grain SVM support for OpenCL 2.0 Add SVM relevant test. v3: 2f8e2d2e4a406bc290986eac600f4263259b5ac5 [Jammy Zhou] amdgpu_svm_test part 35425ab8b66de8d9a375f62317c26ebe3c44b7bc amdgpu_svm_test part v2: 1. Update the description of this commit. 2. Fix an issue that the SVM feature should not be tested when SVM range is not supported. 3. Remove test for query function for general VM range. Signed-off-by: Alex Xie <AlexBin.Xie@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2017-05-17amdgpu: Implement SVM v3Alex Xie3-5/+193
SWDEV-75927: Coarse Grain SVM support for OpenCL 2.0 Add SVM API. Implement SVM to reserve CPU and GPU VM address space for SVM. Implement commit/uncommit function for SVM. v3: 2f8e2d2e4a406bc290986eac600f4263259b5ac5 [Jammy Zhou] reserve SVM range explicitly by clients The SVM range is only used by OCL 2.0 now, and it shouldn't be reserved when only other clients are used. With this change: amdgpu_svm_init() should be called to reserve the SVM range amdgpu_svm_deinit() should be called to unreserve this range v2: 1. Merge patch1 and patch2. 2. Update description of the commit. 3. Address review comments on coding style. 4. Update comments in source code. 5. Fix one issue in function amdgpu_va_range_query. The start of the range should be dev->vamgr_svm->va_min. 6. Fix an error code. Signed-off-by: Alex Xie <AlexBin.Xie@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
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-05-04Fix stray caller of drmCompareDevicesAdam Jackson1-1/+1
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-05-04configure: Fix the <sys/sysmacros.h> checkAdam Jackson1-0/+4
AC_HEADER_MAJOR only defines MAJOR_IN_SYSMACROS if major() is _not_ defined by <sys/types.h> alone. It is, but it warns, and that's ugly. To fix this, push -Werror into CFLAGS when invoking AC_HEADER_MAJOR so the warning makes the compilation test fail. Reviewed-by: Emil Velikov <emil.velilkov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-05-04Export drmDevicesEqualAdam Jackson2-9/+11
drmCompareBusInfo was almost this already, but it wasn't exported, its name didn't match its functionality, and while it almost looks like it was usable for sorting due to memcmp it wouldn't work if you had multiple bus types. I don't really want to think about defining a sensible sort order for bus types, so let's at least make it less of a trap for the caller. Invert its boolean sense to be 'true if equal', rename it to describe the types it actually operates on, and export. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velilkov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>