aboutsummaryrefslogtreecommitdiffstats
path: root/amdgpu
Commit message (Collapse)AuthorAgeFilesLines
* libdrm: amdgpu: Fix Android.bp build issuesJohn Stultz2018-05-012-0/+7
| | | | | | | Add missing files and required build time defines Change-Id: I4c417ebeef390f2e64c6b019954829cda93c0ec9 Signed-off-by: John Stultz <john.stultz@linaro.org>
* libdrm: amdgpu: Initialize unions with memset rather than "= {0}"John Stultz2018-05-011-2/+4
| | | | | | | | Clang complains when initializing unions using "= {0}" so instead use memset. Change-Id: Ib2fba6226ac4adfde7f0d271b3c953ac66cb84ee Signed-off-by: John Stultz <john.stultz@linaro.org>
* Merge remote-tracking branch 'freedesktop/master' into aosp/masterJohn Stultz2018-04-1319-484/+1149
|\ | | | | | | | | | | | | This merges the freedesktop/master branch into aosp/master Change-Id: I3104d45924f67d37808154d04c15518394204478 Signed-off-by: John Stultz <john.stultz@linaro.org>
| * libdrm: amdgpu: Adding DRM_RDWR flag in amdgpu_bo_exportSatyajit2018-03-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently while exporting prime handle to fd read write access is not granted. mmap fails because of this. mmap was not supported on prime initially. Here is link to related discussion https://lists.freedesktop.org/archives/dri-devel/2017-February/131840.html Adding the DRM_RDWR flag in amdgpu_bo_export to support mmap. Signed-off-by: Satyajit <satyajit.sahu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
| * meson,configure: include config.h automaticallyEric Engestrom2018-03-2012-48/+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>
| * meson: use pkg-config to detect libatomic_opsEric Engestrom2018-03-091-1/+1
| | | | | | | | | | Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
| * drm/amdgpu: Remove IB count checkingSabre Shao2018-03-081-2/+0
| | | | | | | | | | Signed-off-by: Sabre Shao <Sabre.Shao@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
| * Revert "amdgpu:support 16 ibs per submit for PAL/SRIOV"Marek Olšák2018-03-081-1/+1
| | | | | | | | | | | | This reverts commit 924f856a9047b87e8bfdc2867f7fe484e3f71343. Wrong patch.
| * amdgpu:support 16 ibs per submit for PAL/SRIOVQiang Yu2018-03-081-1/+1
| | | | | | | | | | | | | | | | | | to support SRIOV and MCBP, need 16 IBs per submit Signed-off-by: Qiang Yu <Qiang.Yu@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
| * amdgpu: fix "add AMDGPU_VA_RANGE_HIGH"Christian König2018-02-281-2/+2
| | | | | | | | | | | | | | | | | | The range is stored as exclusive, not inclusive. Subtracts one to get the inclusive interval for the calculation. This fixes crashes when 32bit addresses are in use. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
| * amdgpu: add AMDGPU_VA_RANGE_HIGHChristian König2018-02-284-8/+24
| | | | | | | | | | | | | | Return high addresses if requested and available. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
| * amdgpu: mostly revert "use the high VA range if possible v2"Christian König2018-02-282-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 07ea20d5beb24315b721adf83bbfa72ce016e146. Unfortunately it turned out that this change broke some corner cases in Mesa. Revert it for now, but keep the high range in separate VA managers. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
| * *-symbol-check: Don't hard-code nm executableHeiko Becker2018-02-232-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Helpful if your nm executable has a prefix based on the architecture, for example. Signed-off-by: Heiko Becker <heirecka@exherbo.org> Cc: Timo Gurr <timo.gurr@gmail.com> [Eric: v2: rebase and add Meson support] Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
| * amdgpu: Fix mistake in initial hole size calculation.Andrey Grodzovsky2018-02-191-1/+2
| | | | | | | | | | Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
| * amdgpu: Add amdgpu_query_sw_info to amdgpu-symbol-checkMichel Dänzer2018-02-121-0/+1
| | | | | | | | Fixes make check. Trivial.
| * amdgpu: add amdgpu_query_sw_info for querying high bits of 32-bit address spaceMarek Olšák2018-02-093-0/+36
| | | | | | | | Reviewed-by: Christian König <christian.koenig@amd.com>
| * amdgpu: clean up non list code path for vamgr v2Chunming Zhou2018-02-092-80/+44
| | | | | | | | | | | | | | | | v2: Add missing "goto out" Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com>
| * Revert "amdgpu: clean up non list code path for vamgr"Michel Dänzer2018-02-082-43/+80
| | | | | | | | | | | | This reverts commit 41b94a3fb6e87d057fad78568d920d29489e5060. It caused crashes with radeonsi in at least glxgears and Xorg.
| * amdgpu: clean up non list code path for vamgrChunming Zhou2018-02-082-80/+43
| | | | | | | | | | Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
| * amdgpu: fix inefficient vamgr algorithmChunming Zhou2018-02-081-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | issue: UMD allocates top 4GB, but don't do anything, just reserve top 4GB space, but the performance of VP13 drops from 162fps to 99fps. root cause: our va hole list of vamgr is too long by time going. fix: reusing old hole as much as possible can make the list shortest. result: performance recovers as non-list path, next patch will remove non-list code path. Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
| * remove unnecessary double-semicolonEric Engestrom2018-01-291-1/+1
| | | | | | | | | | | | Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
| * amdgpu: fix high VA maskChristian König2018-01-231-1/+1
| | | | | | | | | | | | | | | | | | That constant needs to be 64bits. Fixes: amdgpu: use the high VA range if possible v2 Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
| * meson: fix the install path of amdgpu.idsChristoph Haag2018-01-181-2/+2
| | | | | | | | Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
| * amdgpu: Don't print error message if parse_one_line returned -EAGAINMichel Dänzer2018-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | It means it just didn't find an entry for the GPU in the amdgpu.ids file. Fixes spurious amdgpu_parse_asic_ids: Cannot parse ASIC IDs: Resource temporarily unavailable error messages in that case. Reported-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
| * Add meson build systemDylan Baker2018-01-122-0/+69
| | | | | | | | | | | | | | | | | | | | This patch adds a complete meson build system, including tests and install. It has the necessary hooks to allow it be used as a subproject for other meson based builds such as mesa. Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-and-tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
| * amdgpu: use the high VA range if possible v2Christian König2018-01-091-4/+14
| | | | | | | | | | | | | | | | | | Retire the low range on Vega10 this frees up everything below 0xffff800000000000 for HMM. v2: keep the 32bit range working. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
| * amdgpu: fix 32bit VA manager max addressChristian König2018-01-091-1/+1
| | | | | | | | | | | | | | The range is exclusive not inclusive. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
| * amdgpu: Add syncobj reset & signal wrappers.Bas Nieuwenhuizen2017-12-173-0/+48
| | | | | | | | Signed-off-by: Dave Airlie <airlied@redhat.com>
| * amdgpu: Only remember the device's marketing nameMichel Dänzer2017-12-055-102/+28
| | | | | | | | | | | | | | | | | | There's no point in keeping around the full table of marketing names, when amdgpu_get_marketing_name only ever returns the device's marketing name. Acked-by: Slava Abramov <slava.abramov@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
| * amdgpu: Simplify error handling in parse_one_lineMichel Dänzer2017-12-051-29/+16
| | | | | | | | | | | | | | | | | | | | * Move empty/commented line check before the strdup and return -EAGAIN directly * Initialize r = -EAGAIN and remove redundant assignments * Set r = -ENOMEM if last strdup fails, and remove redundant goto Acked-by: Slava Abramov <slava.abramov@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
| * amdgpu: Clean up amdgpu_parse_asic_ids error handlingMichel Dänzer2017-12-013-12/+12
| | | | | | | | | | | | | | | | | | | | | | * Move error message printing into amdgpu_parse_asic_ids and make it return void * Print only "Invalid format" error message if parse_one_line returns -EINVAL * Use strerror instead of printing the (negative) error code in hex Acked-by: Slava Abramov <slava.abramov@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
| * amdgpu: Add amdgpu_cs_create_syncobj2 to amdgpu-symbol-checkMichel Dänzer2017-11-301-0/+1
| | | | | | | | Fixes make check. Trivial.
| * amdgpu: Adding amdgpu_cs_create_syncobj2 to create syncobj as signaled initiallyDavid Mao2017-11-292-0/+25
| | | | | | | | | | | | Signed-off-by: David Mao <david.mao@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * Revert "amdgpu: fix 32bit VA manager max address"Christian König2017-11-091-1/+1
| | | | | | | | | | | | | | | | This reverts commit 944f6665de36b6a6c36263f23b7b9d1730e544fa. Accidentially pushed an imcomplete patch. Signed-off-by: Christian König <christian.koenig@amd.com>
| * Revert "amdgpu: use the high VA range if possible"Christian König2017-11-091-7/+2
| | | | | | | | | | | | | | | | This reverts commit 6c0ea4b0c5452bfc1e67b74ce723696ef3c80b25. Accidentially pushed an incomplete patch. Signed-off-by: Christian König <christian.koenig@amd.com>
| * amdgpu: use the high VA range if possibleChristian König2017-11-081-2/+7
| | | | | | | | | | | | This frees up the low range for HMM. Signed-off-by: Christian König <christian.koenig@amd.com>
| * amdgpu: fix 32bit VA manager max addressChristian König2017-11-081-1/+1
| | | | | | | | | | | | The range is exclusive not inclusive. Signed-off-by: Christian König <christian.koenig@amd.com>
| * amdgpu: sanitize 64bit VA managerChristian König2017-11-083-27/+8
| | | | | | | | | | | | | | Adding the extra reservation of the 32bit space to the 64bit manager is complete nonsense and just a waste of memory and CPU cycles. Signed-off-by: Christian König <christian.koenig@amd.com>
| * amdpgu: fix coding style in amdgpu_vamgr.cChristian König2017-11-071-13/+14
| | | | | | | | | | | | No functional change. Signed-off-by: Christian König <christian.koenig@amd.com>
| * amdgpu: Fix wrappers for AMDGPU_VM IOCTL.Andrey Grodzovsky2017-11-032-6/+6
| | | | | | | | | | | | | | | | | | Rmove amdgpu_context_handle from the interface and use amdgpu_device_handle instead. Uupdate VMID reservation test accordingly. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
| * amdgpu: fix 32-bit buildMarek Olšák2017-10-311-0/+3
| |
| * amdgpu: Add wrappers for AMDGPU_VM IOCTL.Andrey Grodzovsky2017-10-274-0/+71
| | | | | | | | | | | | | | | | | | v2: Rename wrappers to match the IOCTL naming, fix identation and fix make check error. Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
| * amdgpu: implement context priority for amdgpu_cs_ctx_create2 v3Andres Rodriguez2017-10-203-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new context creation function that allows specifying the context priority. A high priority context has the potential of starving lower priority contexts. The current kernel driver implementation allows only apps that hold CAP_SYS_NICE or DRM_MASTER to acquire a priority above AMDGPU_CTX_PRIORITY_NORMAL. v2: corresponding changes for kernel patch v2 v3: Fixed 'make check' symbol error Signed-off-by: Andres Rodriguez <andresx7@gmail.com> Acked-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
| * amdgpu: add amdgpu_cs_fence_to_handleMarek Olšák2017-10-123-0/+37
| | | | | | | | | | | | v2: update amdgpu-symbol-check Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
| * amdgpu: add amdgpu_cs_syncobj_waitMarek Olšák2017-10-123-0/+33
| | | | | | | | | | | | v2: update amdgpu-symbol-check Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
| * amdgpu: add sync_file import and export functionsMarek Olšák2017-10-123-0/+52
| | | | | | | | | | | | v2: update amdgpu-symbol-check Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
| * Android: move libraries to /vendorRob Herring2017-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | As part of Treble project in Android O, all the device specific files have to be located in a separate vendor partition. This is done by setting LOCAL_PROPRIETARY_MODULE (the name is misleading). This change will not break existing platforms without a vendor partition as it will just move files to /system/vendor. Signed-off-by: Rob Herring <robh@kernel.org>
| * amdgpu: print error messages when amdgpu_device_initialize is failingMarek Olšák2017-09-281-3/+16
| | | | | | | | Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
| * amdgpu: Do not write beyond allocated memory when parsing idsJan Vesely2017-09-041-7/+8
| | | | | | | | | | | | | | | | | | Fixes crash when/usr/share/libdrm/amdgpu.ids contains ASIC_ID_TABLE_NUM_ENTRIES + 1 entries. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102432 Fixes: 7e6bf88cac315a9fa41818cf72a7b5d18a2cb1fc (amdgpu: move asic id table to a separate file) Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
| * android: amdgpu: fix build breakChih-Wei Huang2017-08-211-0/+6
| | | | | | | | | | | | | | | | Define two macros to avoid building errors. Fixes: 7e6bf88cac (amdgpu: move asic id table to a separate file) Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>