aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu
AgeCommit message (Collapse)AuthorFilesLines
2016-09-30Merge branch 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie29-297/+674
into drm-next Some additional fixes for 4.9: - The rest of Christian's GTT rework which fixes a long standing bug in the GPUVM code among other things - Changes to the pci shutdown callbacks for certain hypervisors - Fix hpd interrupt storms on eDP panels which have the hpd interrupt enabled by the bios - misc cleanups and bug fixes * 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux: (33 commits) drm/radeon: always apply pci shutdown callbacks drm/amdgpu: always apply pci shutdown callbacks (v2) drm/amdgpu: improve VM PTE trace points drm/amdgpu: fix GART_DEBUGFS define drm/amdgpu: free userptrs even if GTT isn't bound drm/amd/amdgpu: Various cleanups for DCEv6 drm/amdgpu: fix BO move offsets drm/amdgpu: fix amdgpu_move_blit on 32bit systems drm/amdgpu: fix gtt_mgr bo's offset drm/amdgpu: fix initializing the VM BO shadow drm/amdgpu: fix initializing the VM last eviction counter drm/amdgpu: cleanup VM shadow BO unreferencing drm/amdgpu: allocate GTT space for shadow VM page tables drm/amdgpu: rename all rbo variable to abo v2 drm/amdgpu: remove unused member from struct amdgpu_bo drm/amdgpu: add a custom GTT memory manager v2 drm/amdgpu/dce6: disable hpd on local panels drm/amdgpu/dce8: disable hpd on local panels drm/amdgpu/dce11: disable hpd on local panels drm/amdgpu/dce10: disable hpd on local panels ...
2016-09-28drm/amdgpu: always apply pci shutdown callbacks (v2)Alex Deucher1-6/+4
We can't properly detect all hypervisors and we need this to properly tear down the hardware. v2: trivial warning fix Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: improve VM PTE trace pointsChristian König2-5/+25
Use a separate one for the copy operation and log all the interesting parameters. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: fix GART_DEBUGFS defineChristian König1-4/+4
Obviously missed during the rename. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: free userptrs even if GTT isn't boundChristian König1-3/+3
This fixes a memory leak since binding GTT only on demand. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amd/amdgpu: Various cleanups for DCEv6Tom St Denis1-36/+10
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: fix BO move offsetsChristian König1-2/+2
It's pretty pointless to get the offset first and then initialize it. Should fix issues with the new GTT manager. Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: fix amdgpu_move_blit on 32bit systemsChristian König1-2/+2
This bug seems to be present for a very long time. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-09-28drm/amdgpu: fix gtt_mgr bo's offsetFlora Cui1-2/+3
Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: fix initializing the VM BO shadowChristian König1-0/+15
We need to clear the shadows as well. Signed-off-by: Christian König <[email protected]> Acked-by: Edward O'Callaghan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: fix initializing the VM last eviction counterChristian König1-2/+6
Close a very small window where something can go wrong. Signed-off-by: Christian König <[email protected]> Acked-by: Edward O'Callaghan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: cleanup VM shadow BO unreferencingChristian König1-6/+10
Unreference the shadow BOs in the error path as well and drop the NULL checks. Signed-off-by: Christian König <[email protected]> Acked-by: Edward O'Callaghan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: allocate GTT space for shadow VM page tablesChristian König1-0/+17
We need to access those with the system domain. Fixes fallout from only allocating GTT space on demand. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: rename all rbo variable to abo v2Christian König12-159/+159
Just to cleanup some radeon leftovers. sed -i "s/rbo/abo/g" drivers/gpu/drm/amd/amdgpu/*.c sed -i "s/rbo/abo/g" drivers/gpu/drm/amd/amdgpu/*.h v2: rebased Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: remove unused member from struct amdgpu_boChristian König2-3/+0
Not used in a while. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: add a custom GTT memory manager v2Christian König6-11/+265
Only allocate address space when we really need it. v2: fix a typo, add correct function description, stop leaking the node in the error case. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu/dce6: disable hpd on local panelsAlex Deucher1-9/+39
Otherwise we can get a hotplug interrupt storm when we turn the panel off if hpd interrupts were enabled by the bios. bug: https://bugs.freedesktop.org/show_bug.cgi?id=97471 Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu/dce8: disable hpd on local panelsAlex Deucher1-9/+39
Otherwise we can get a hotplug interrupt storm when we turn the panel off if hpd interrupts were enabled by the bios. bug: https://bugs.freedesktop.org/show_bug.cgi?id=97471 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-09-28drm/amdgpu/dce11: disable hpd on local panelsAlex Deucher1-10/+13
Otherwise we can get a hotplug interrupt storm when we turn the panel off if hpd interrupts were enabled by the bios. bug: https://bugs.freedesktop.org/show_bug.cgi?id=97471 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-09-28drm/amdgpu/dce10: disable hpd on local panelsAlex Deucher1-10/+13
Otherwise we can get a hotplug interrupt storm when we turn the panel off if hpd interrupts were enabled by the bios. bug: https://bugs.freedesktop.org/show_bug.cgi?id=97471 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-09-28drm/amdgpu/si/dpm: fix phase shedding setupAlex Deucher2-1/+2
Used the wrong index to setup the phase shedding mask. Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu/si/dpm: sync up quirks from radeonAlex Deucher1-0/+13
Signed-off-by: Alex Deucher <[email protected]>
2016-09-28Merge tag 'v4.8-rc8' into drm-nextDave Airlie11-24/+41
Linux 4.8-rc8 There was a lot of fallout in the imx/amdgpu/i915 drivers, so backmerge it now to avoid troubles. * tag 'v4.8-rc8': (1442 commits) Linux 4.8-rc8 fault_in_multipages_readable() throws set-but-unused error mm: check VMA flags to avoid invalid PROT_NONE NUMA balancing radix tree: fix sibling entry handling in radix_tree_descend() radix tree test suite: Test radix_tree_replace_slot() for multiorder entries fix memory leaks in tracing_buffers_splice_read() tracing: Move mutex to protect against resetting of seq data MIPS: Fix delay slot emulation count in debugfs MIPS: SMP: Fix possibility of deadlock when bringing CPUs online mm: delete unnecessary and unsafe init_tlb_ubc() huge tmpfs: fix Committed_AS leak shmem: fix tmpfs to handle the huge= option properly blk-mq: skip unmapped queues in blk_mq_alloc_request_hctx MIPS: Fix pre-r6 emulation FPU initialisation arm64: kgdb: handle read-only text / modules arm64: Call numa_store_cpu_info() earlier. locking/hung_task: Fix typo in CONFIG_DETECT_HUNG_TASK help text nvme-rdma: only clear queue flags after successful connect i2c: qup: skip qup_i2c_suspend if the device is already runtime suspended perf/core: Limit matching exclusive events to one PMU ...
2016-09-28Merge branch 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie35-3199/+1004
into drm-next Last set of radeon and amdgpu changes for 4.9. This is mostly just the powerplay cleanup for dGPUs. Beyond that, just misc code cleanups and bug fixes. * 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux: (49 commits) drm/amd/amdgpu: Clean up afmt allocation in DCEv6. (v2) drm/amd/amdgpu: Remove division from vblank_wait drm/radeon/atif: Send a hotplug event when we get dgpu display request drm/radeon/atpx: check for ATIF dGPU wake for display events support drm/amdgpu/atif: Send a hotplug event when we get dgpu display request drm/amdgpu/atpx: check for ATIF dGPU wake for display events support drm/amdgpu: bump version for new vce packet support drm/amdgpu/vce: allow the clock table packet drm/amdgpu:cleanup virt related define drm/amdgpu: use powerplay module for dgpu in Vi. drm/amdgpu: set gfx clock gating for tonga/polaris. drm/amdgpu: set system clock gating for tonga/polaris. drm/amd/powerplay: export function to help to set cg by smu. drm/amdgpu: avoid out of bounds access on array interrupt_status_offsets drm/amdgpu: mark symbols static where possible drm/amdgpu: remove unused functions drm/amd/powerplay: Replace per-asic print_performance with generic drm/radeon: narrow asic_init for virtualization drm/amdgpu:add fw version entry to info drm/amdgpu:determine if vPost is needed indeed ...
2016-09-28Merge tag 'topic/drm-misc-2016-09-25' of ↵Dave Airlie1-1/+2
git://anongit.freedesktop.org/drm-intel into drm-next - more core cleanup patches to prep drm_file to be used for kernel-internal contexts (David Herrmann) - more split-up+docs for drm_crtc.c - lots of small fixes and polish all over * tag 'topic/drm-misc-2016-09-25' of git://anongit.freedesktop.org/drm-intel: (37 commits) drm: bridge: analogix/dp: mark symbols static where possible drm/bochs: mark bochs_connector_get_modes() static drm/bridge: analogix_dp: Improve panel on time drm/bridge: analogix_dp: Don't read EDID if panel present drm/bridge: analogix_dp: Remove duplicated code Revert "drm/i2c: tda998x: don't register the connector" drm: Fix plane type uabi breakage dma-buf/sync_file: free fences array in num_fences is 1 drm/i2c: tda998x: don't register the connector drm: Don't swallow error codes in drm_dev_alloc() drm: Distinguish no name from ENOMEM in set_unique() drm: Remove dirty property from docs drm/doc: Document color space handling drm: Extract drm_color_mgmt.[hc] drm/doc: Polish plane composition property docs drm: Conslidate blending properties in drm_blend.[hc] drm/doc: Polish for drm_plane.[hc] drm: Extract drm_plane.[hc] drm/tilcdc: Add atomic and crtc headers to crtc.c drm: Fix typo in encoder docs ...
2016-09-28Merge tag 'drm-amdkfd-next-2016-09-19' of ↵Dave Airlie2-16/+18
git://people.freedesktop.org/~gabbayo/linux into drm-next This is amdkfd's pull request for kernel 4.9. It contains a fix to a possible infinite loop bug and a couple of other minor "cleaning" patches. * tag 'drm-amdkfd-next-2016-09-19' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: Pass 'struct queue_propertices' by reference drm/amdkfd: Unify multiple calls to pr_debug() into one drm/amdkfd: Fix possible infinite loop drm/amdkfd: Reuse function to find a process through pasid drm/amdkfd: Add some missing memset zero'ing in queue init func drm/amdkfd: Tidy up kfd_generate_gpu_id() uint64_t bitshift unpack
2016-09-27drm/amdgpu/vce3: don't forget to tear down some ringsGrazvydas Ignotas1-2/+4
We can use .num_rings for that. Fixes: 6f0359ff7307 ("vce3: add support for third vce ring") Cc: Alex Deucher <[email protected]> Signed-off-by: Grazvydas Ignotas <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-27drm/amdgpu/i2c: add const where appropriateGrazvydas Ignotas2-14/+14
Signed-off-by: Grazvydas Ignotas <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-27drm/amdgpu: don't leave dangling pointers aroundGrazvydas Ignotas2-0/+3
Right now it's possible to trigger fence_drv.fences[] dereference after the array has been freed. While the real problem is elsewhere, this still results in confusing errors that depend on how the freed memory was reused (I've seen "kernel tried to execute NX-protected page"), it's better to clear them and get NULL dereference so that it's obvious what's going wrong. Signed-off-by: Grazvydas Ignotas <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-27drm/amdgpu: clear ring pointer in amdgpu_device on teardownGrazvydas Ignotas1-0/+2
This is in symmetry to setup done in amdgpu_ring_init. Signed-off-by: Grazvydas Ignotas <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-27drm/amdgpu/vce: take all rings into account for idle checksAlex Deucher1-2/+5
Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-27drm/amdgpu: add version bump for raster config programmingAlex Deucher1-1/+2
Reviewed-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-27drm/amdgpu: fix addr handling in amdgpu_vm_bo_update_mappingChristian König1-0/+1
Otherwise we will look at the wrong place in the IB when GART mappings are split into smaller updates. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Tom StDenis <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-27drm/amdgpu: bypass vce clock if vce is idle on Fiji.Rex Zhu1-1/+2
Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-23drm/amdgpu: fix amdgpu_vm_bo_update param errorFlora Cui1-1/+1
Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-22drm/amd/amdgpu: Clean up afmt allocation in DCEv6. (v2)Tom St Denis1-4/+14
v2: minor build fix Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-22drm/amd/amdgpu: Remove division from vblank_waitTom St Denis3-9/+15
Removes division from vblank_wait for DCE v6, v8, and v10. Was already implemented for v11. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-22drm/amdgpu/atif: Send a hotplug event when we get dgpu display requestAlex Deucher1-0/+11
On PX systems, if the platform supports hotplug events ATIF while the dGPU is powered down, handle the event and alert userspace. Signed-off-by: Alex Deucher <[email protected]>
2016-09-22drm/amdgpu/atpx: check for ATIF dGPU wake for display events supportAlex Deucher2-0/+11
Some ATPX laptops implement special circuitry to generate display hotplug events via ACPI when the dGPU is powered off. Check if this is supported. Signed-off-by: Alex Deucher <[email protected]>
2016-09-22drm/amdgpu: bump version for new vce packet supportAlex Deucher1-1/+2
Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-22drm/amdgpu/vce: allow the clock table packetAlex Deucher1-0/+1
This packet allows the user mode driver to specify the required performance for specific use cases. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-22drm/amdgpu:cleanup virt related defineMonk Liu2-31/+58
move virtual machine related structure to amdgpu_virt.h easy for developer to maintain for virualization stuffs Signed-off-by: Monk Liu <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-22drm/amdgpu: use powerplay module for dgpu in Vi.Rex Zhu12-3114/+6
delete non-pp code and files. It was just a temporary solution and not support dynamic power management. Signed-off-by: Rex Zhu <[email protected]> Acked-by: Edward O'Callaghan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-22drm/amdgpu: set gfx clock gating for tonga/polaris.Rex Zhu1-0/+77
Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-22drm/amdgpu: set system clock gating for tonga/polaris.Rex Zhu1-0/+61
Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-22drm/amdgpu: avoid out of bounds access on array interrupt_status_offsetsColin Ian King1-1/+1
The check for an out of bound index into array interrupt_status_offsets is off-by-one. Fix this and also don't compared to a hard coded array size but use adev->mode_info.num_hpd instead. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-22drm/amdgpu: mark symbols static where possibleBaoyou Xie3-6/+8
We get 7 warnings when building kernel with W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1990:5: warning: no previous prototype for 'amdgpu_pre_soft_reset' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c:1548:5: warning: no previous prototype for 'amdgpu_connector_virtual_dpms' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c:1560:5: warning: no previous prototype for 'amdgpu_connector_virtual_set_property' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:330:5: warning: no previous prototype for 'amdgpu_cs_list_validate' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/dce_virtual.c:98:6: warning: no previous prototype for 'dce_virtual_stop_mc_access' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/dce_virtual.c:130:6: warning: no previous prototype for 'dce_virtual_resume_mc_access' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/dce_virtual.c:136:6: warning: no previous prototype for 'dce_virtual_set_vga_render_state' [-Wmissing-prototypes] In fact, all of the functions are only used in the file in which they are declared and don't need a declaration, but can be made static. So this patch marks both functions with 'static'. Reviewed-by: Christian König <[email protected]> Signed-off-by: Baoyou Xie <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-22drm/amdgpu: remove unused functionsBaoyou Xie2-15/+0
We get 2 warnings when building kernel with W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:146:5: warning: no previous prototype for 'pool_to_domain' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/cz_smc.c:104:5: warning: no previous prototype for 'cz_send_msg_to_smc_with_parameter_async' [-Wmissing-prototypes] In fact, both functions are called by no one and not exported, so this patch removes them. Reviewed-by: Christian König <[email protected]> Signed-off-by: Baoyou Xie <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-22drm/amd/powerplay: Replace per-asic print_performance with genericTom St Denis2-7/+65
Replace per-asic print_current_performance() functions with generic that calls read_sensor. Tested on Tonga and Carrizo for aesthetics and accuracy. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-22drm/amdgpu:add fw version entry to infoFrank Min1-0/+42
Signed-off-by: Frank Min <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>