summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd
AgeCommit message (Collapse)Author
2015-06-12Merge tag 'drm-amdkfd-next-fixes-2015-06-10' of ↵Dave Airlie
git://people.freedesktop.org/~gabbayo/linux into drm-next - Make the reset wavefronts action be per process per device instead of per process, because one device can be stuck but the other one won't be - Add some missing properties to the CZ device_info structure - Rename symbols to not have CONFIG_ prefix - Some more cleanups and debug prints * tag 'drm-amdkfd-next-fixes-2015-06-10' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: remove not used defines from cik_regs.h drm/amdkfd: Add missing properties to CZ device info drm/amdkfd: make reset wavefronts per process per device drm/amdkfd: add debug print to kfd_events.c drm/amdkfd: avoid CONFIG_ prefix for non-Kconfig symbols
2015-06-10drm/amdgpu: fix a amdgpu_dpm=0 bugSonny Jiang
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10drm/amdgpu: don't enable/disable display twice on suspend/resumeAlex Deucher
We were doing it in the common code and in the IP specific code. Remove the IP specific code. The common code handles the ordering properly. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10drm/amdgpu: fix UVD/VCE VM emulationChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10drm/amdgpu: enable vce powergatingSonny Jiang
Enable VCE dpm and powergating. VCE dpm dynamically scales the VCE clocks on demand. Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-06-10drm/amdgpu/iceland: don't call smu_init on resumeAlex Deucher
smu_init allocates buffers and initializes them. It does not touch the hw. There is no need to do it again on resume. It should really be part of sw_init (and smu_fini should be part of sw_fini), but we need the firmware sizes from the other IPs for firmware loading so we have to wait until sw init is done for all other IPs. Reviewed-by: Sonny Jiang <Sonny.Jiang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10drm/amdgpu/tonga: don't call smu_init on resumeAlex Deucher
smu_init allocates buffers and initializes them. It does not touch the hw. There is no need to do it again on resume. It should really be part of sw_init (and smu_fini should be part of sw_fini), but we need the firmware sizes from the other IPs for firmware loading so we have to wait until sw init is done for all other IPs. Reviewed-by: Sonny Jiang <Sonny.Jiang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10drm/amdgpu/cz: don't call smu_init on resumeAlex Deucher
smu_init allocates buffers and initializes them. It does not touch the hw. There is no need to do it again on resume. It should really be part of sw_init (and smu_fini should be part of sw_fini), but we need the firmware sizes from the other IPs for firmware loading so we have to wait until sw init is done for all other IPs. Reviewed-by: Sonny Jiang <Sonny.Jiang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10drm/amdgpu: update to latest gfx8 golden register settingsAlex Deucher
Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10drm/amdgpu: whitespace cleanup in gmc8 golden regsAlex Deucher
Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10drm/admgpu: move XDMA golden registers to dce codeAlex Deucher
Already moved other display registers. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10drm/amdgpu: fix the build on big endianAlex Deucher
Some leftover copy and pastes from radeon that never got updated. Reviewed-by: Christian König <christian.koenig@amd.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10drm/amdgpu: remove the VI hardware semaphore in ring syncDavid Zhang
Signed-off-by: David Zhang <david1.zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-06-09drm/amdgpu: set the gfx config properly for all CZ variants (v2)Alex Deucher
Need to adjust the number of CUs and RBs. v2: get proper values Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Samuel Li <samuel.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-09drm/amdgpu: also print the pci revision when printing the pci idsAlex Deucher
The driver makes use of this information so print if to aid in debugging. Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Samuel Li <samuel.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-09drm/amdgpu: cleanup VA IOCTLChristian König
Remove the unnecessary returned status and make the IOCTL write only. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-09drm/amdgpu: fix saddr handling in amdgpu_vm_bo_unmapChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-09drm/amdgpu: fix amdgpu_vm_bo_mapChristian König
We need to reset the bo_va address, otherwise new mappings wouldn't be updated in the page table. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-06drm/amdkfd: remove not used defines from cik_regs.hOded Gabbay
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-06-06drm/amdkfd: Add missing properties to CZ device infoOded Gabbay
This patch adds two missing properties initializations to the device info structure of CZ. As we don't have CZ support yet, it isn't critical, but its important to fix this now instead of forgetting about it later. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-06-06drm/amdkfd: make reset wavefronts per process per deviceBen Goz
This commit moves the reset wavefront flag to per process per device data structure, so we can support multiple devices. Signed-off-by: Ben Goz <ben.goz@amd.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-06-06drm/amdkfd: add debug print to kfd_events.cOded Gabbay
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-06-06drm/amdkfd: avoid CONFIG_ prefix for non-Kconfig symbolsValentin Rothberg
The CONFIG_ prefix is reserved for Kconfig options in Make and CPP syntax. Various static analysis tools rely on this naming convention and check if CONFIG_ prefixed symbols are defined Kconfig. Hence add yet another prefix AMD_ to CONFIG_REG_{BASE,END,SISE} to apply to this convention and make static analysis tools happy. Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-06-05drm/amdgpu: disable user fence interrupt (v2)Chunming Zhou
amdgpu submits both kernel and user fences, but just need one interrupt, disable user fence interrupt and don't effect user fence. v2: fix merge error Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-05drm/amdgpu: fix user ptr race conditionChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: monk liu <monk.liu@amd.com>
2015-06-05drm/amdgpu: add zero timeout check in amdgpu_fence_wait_seq_timeoutJack Xiao
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-06-04drm/amdgpu: only support IBs in the buffer list (v2)Marek Olšák
amdgpu_cs_find_mapping doesn't work without all buffers being validated, so the TTM validation must be done first. v2: only use amdgpu_cs_find_mapping for UVD/VCE VM emulation Signed-off-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-06-04drm/amdgpu: add vram_type and vram_bit_width for interface query (v2)Ken Wang
Track the type of vram on the board and provide a query for it. User mode drivers and tools want this information for determining bandwidth information and form informational purposes. v2: fix build when CI support is not enabled Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-06-04drm/amdgpu: add ib_size/start_alignment interface queryKen Wang
Query the IB alignment requirements from the kernel rather than hardcoding them in the user mode drivers. Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-06-04drm/amdgpu: add me/ce/pfp_feature_version interface queryKen Wang
Provide this information to usermode drivers. We were previously missing this info. Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-06-04drm/amdgpu add ce_ram_size for interface queryKen Wang
Add a query for the CE ram size. User mode drivers will want to use this to determine how much size of the cache on the CE. Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Reviewd-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-06-04drm/amdgpu add max_memory_clock for interface query (v2)Ken Wang
Add a query for the max memory clock. v2: handle the dpm enabled case properly Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Reviewd-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-06-04drm/amdgpu: add hdp flush for gfx8 compute ringmonk.liu
We had forgotten to register the callback. Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: jammy zhou <jammy.zhou@amd.com>
2015-06-04drm/amdgpu: fix no hdp flush for compute ringmonk.liu
No pfp on compute. Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-06-04drm/amdgpu: add HEVC/H.265 UVD supportChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-04drm/amdgpu: stop loading firmware with pm.mutex lockedChristian König
Loading firmware is a rather complicated process, in the end we add a dependency between the pm mutex and the mm semaphore which results in a harmless but annoying error message. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-06-04drm/amdgpu: remove mclk_lockChristian König
Not needed any more. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-04drm/amdgpu: fix description of vm_size module parameter (v2)Alex Deucher
default is 8GB, not 4GB. v2: fix fallback setting when the user provides an invalid input Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-04drm/amdgpu: remove all sh mem register modification in vm flushmonk.liu
Leave that at the values set during init. No need to update them repeatedly. Signed-off-by: monk.liu <monk.liu@amd.com> Signed-off-by: David Zhang <david1.zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
2015-06-04drm/amdgpu: rename GEM_OP_SET_INITIAL_DOMAIN -> GEM_OP_SET_PLACEMENTMarek Olšák
Signed-off-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-04drm/amdgpu: fence should be added to shared slotmonk.liu
Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: jammy zhou <jammy.zhou@amd.com>
2015-06-04drm/amdgpu: sync fence of clear_invalids (v2)monk.liu
bo_va may un-initialized, fix it. Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
2015-06-04drm/amdgpu: max_pde_used usage should be under protectmonk.liu
Need to take the lock when accessing this. Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
2015-06-04drm/amdgpu: fix bug of vm_bo_map (v2)monk.liu
call reservation_object_reserve_shared before amdgpu_bo_fence Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
2015-06-04drm/amdgpu: implement the allocation range (v3)Chunming Zhou
Pass a ttm_placement pointer to amdgpu_bo_create_restricted add min_offset to amdgpu_bo_pin_restricted. This makes it easier to allocate memory with address restrictions. With this patch we can also enable 2-ended allocation again. v2: fix rebase conflicts v3: memset placements before using Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-04drm/amdgpu: rename amdgpu_ip_funcs to amd_ip_funcs (v2)yanyang1
The structure is renamed and moved to amd_shared.h to make the component independent. This makes it easier to add new components in the future. v2: fix include path Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: yanyang1 <young.yang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-04drm/amdgpu: drop AMDGPU_FENCE_SIGNALED_SEQChristian König
It's causing issues with VMID handling and comparing the fence value two times actually doesn't make handling faster. Port of radeon commit "d6d5c5b8364bcc4d52cddc68bcb0a330d2af20f3". Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com>
2015-06-04drm/amdgpu: port fault_reserve_notify changes from radeonChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-04drm/amdgpu: enable uvd dpm and powergatingSonny Jiang
Enable UVD dpm (dynamic power management) and powergating. UVD dpm dynamically scales the UVD clocks on demand. Powergating turns off the power to the block when it's not in use. Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-04drm/amdgpu: implement VCE two instances supportLeo Liu
VCE 3.0 has two indentical instances in the engine, they share the same registers name in differrent memory block distinguished by the grbm_gfx_index, we set to master instance after init, it will dispatch task to slave instance. These two instances will share the same firmware, but have their own stacks and heaps. v2: add mutex for using grbm_gfx_index 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>