aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)AuthorFilesLines
2016-03-09drm/amdgpu: Revert "add mutex for ba_va->valids/invalids"Christian König2-12/+6
Not needed any more because we need to protect the elements on the list anyway. This reverts commit 38bf516c75b4ef0f5c716e05fa9baab7c52d6c39. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-09drm/amdgpu: Revert "add lock for interval tree in vm"Christian König2-15/+2
Not needed any more because we need to protect the elements on the list anyway. This reverts commit fe237ed7efec8ac147a4572fdf81173a7f8ddda7. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-09drm/amdgpu: Revert "add spin lock to protect freed list in vm (v3)"Christian König1-13/+3
Not needed any more because we need to protect the elements on the list anyway. This reverts commit dae6ecf9e6c9b677e577826c3ac665c6dd9c490b. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-09drm/amdgpu: reserve the PD during unmap and removeChristian König1-10/+24
We not only need to protect the mapping tree and freed list itself, but also the items on those list. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-09drm/amdgpu: Fix two bugs in amdgpu_vm_bo_split_mappingFelix Kuehling1-2/+2
Off-by-one: last is inclusive, so the maximum is start + max_size - 1 Wrong unit: addr is in bytes, max_size is in pages Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-09drm/radeon: Don't drop DP 2.7 Ghz link setup on some cards.Mario Kleiner1-2/+4
As observed on Apple iMac10,1, DCE-3.2, RV-730, link rate of 2.7 Ghz is not selected, because the args.v1.ucConfig flag setting for 2.7 Ghz gets overwritten by a following assignment of the transmitter to use. Move link rate setup a few lines down to fix this. In practice this didn't have any positive or negative effect on display setup on the tested iMac10,1 so i don't know if backporting to stable makes sense or not. Signed-off-by: Mario Kleiner <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-03-09drm/amdgpu: disable runtime pm on PX laptops without dGPU power controlAlex Deucher2-5/+11
Some PX laptops don't provide an ACPI method to control dGPU power. On those systems, the driver is responsible for handling the dGPU power state. Disable runtime PM on them until support for this is implemented. Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-03-09drm/radeon: disable runtime pm on PX laptops without dGPU power controlAlex Deucher2-5/+11
Some PX laptops don't provide an ACPI method to control dGPU power. On those systems, the driver is responsible for handling the dGPU power state. Disable runtime PM on them until support for this is implemented. Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-03-09dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc()Luis R. Rodriguez11-57/+48
Rename dma_*_writecombine() to dma_*_wc(), so that the naming is coherent across the various write-combining APIs. Keep the old names for compatibility for a while, these can be removed at a later time. A guard is left to enable backporting of the rename, and later remove of the old mapping defines seemlessly. Build tested successfully with allmodconfig. The following Coccinelle SmPL patch was used for this simple transformation: @ rename_dma_alloc_writecombine @ expression dev, size, dma_addr, gfp; @@ -dma_alloc_writecombine(dev, size, dma_addr, gfp) +dma_alloc_wc(dev, size, dma_addr, gfp) @ rename_dma_free_writecombine @ expression dev, size, cpu_addr, dma_addr; @@ -dma_free_writecombine(dev, size, cpu_addr, dma_addr) +dma_free_wc(dev, size, cpu_addr, dma_addr) @ rename_dma_mmap_writecombine @ expression dev, vma, cpu_addr, dma_addr, size; @@ -dma_mmap_writecombine(dev, vma, cpu_addr, dma_addr, size) +dma_mmap_wc(dev, vma, cpu_addr, dma_addr, size) We also keep the old names as compatibility helpers, and guard against their definition to make backporting easier. Generated-by: Coccinelle SmPL Suggested-by: Ingo Molnar <[email protected]> Signed-off-by: Luis R. Rodriguez <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2016-03-08PCI: Add QEMU top-level IDs for (sub)vendor & deviceRobin H. Johnson2-4/+5
Introduce PCI_VENDOR/PCI_SUBVENDOR/PCI_SUBDEVICE defines to replace the constants scattered in the kernel already used to detect QEMU. They are defined in the QEMU codebase per docs/specs/pci-ids.txt. Signed-off-by: Robin H. Johnson <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Reviewed-by: Gerd Hoffmann <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Acked-by: Daniel Vetter <[email protected]>
2016-03-09Merge tag 'imx-drm-fixes-2016-02-19' of ↵Dave Airlie3-14/+20
git://git.pengutronix.de/git/pza/linux into drm-fixes ipu-v3 probe and imx-drm crtc and plane fixes - Fix ipu probe if optional port nodes are not present in the device tree - Reset the ipu before initializing interrupts, not thereafter - Notify DRM core about the state of vblank interrupts - Add missing RGB565 format to the list of plate formats * tag 'imx-drm-fixes-2016-02-19' of git://git.pengutronix.de/git/pza/linux: drm/imx: Add missing DRM_FORMAT_RGB565 to ipu_plane_formats drm/imx: notify DRM core about CRTC vblank state gpu: ipu-v3: Reset IPU before activating IRQ gpu: ipu-v3: Do not bail out on missing optional port nodes
2016-03-09Merge branch 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie5-15/+38
into drm-fixes radeon and amdgpu fixes for 4.5. Three regression fixes and some fixups for the error handling in the vblank regression fixes from earlier. * 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux: Revert "drm/radeon/pm: adjust display configuration after powerstate" drm/amdgpu/dp: add back special handling for NUTMEG drm/radeon/dp: add back special handling for NUTMEG drm/radeon: Fix error handling in radeon_flip_work_func. drm/amdgpu: Fix error handling in amdgpu_flip_work_func.
2016-03-08Revert "drm/radeon/pm: adjust display configuration after powerstate"Alex Deucher1-3/+2
This reverts commit 39d4275058baf53e89203407bf3841ff2c74fa32. This caused a regression on some older hardware. bug: https://bugzilla.kernel.org/show_bug.cgi?id=113891 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-03-08Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller36-143/+521
Several cases of overlapping changes, as well as one instance (vxlan) of a bug fix in 'net' overlapping with code movement in 'net-next'. Signed-off-by: David S. Miller <[email protected]>
2016-03-08drm/amdgpu/dp: add back special handling for NUTMEGAlex Deucher1-4/+16
When I fixed the dp rate selection in: 3b73b168cffd9c392584d3f665021fa2190f8612 drm/amdgpu: fix dp link rate selection (v2) I accidently dropped the special handling for NUTMEG DP bridge chips. They require a fixed link rate. Reviewed-by: Christian König <[email protected]> Reviewed-by: Ken Wang <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-03-08drm/radeon/dp: add back special handling for NUTMEGAlex Deucher1-4/+16
When I fixed the dp rate selection in: 092c96a8ab9d1bd60ada2ed385cc364ce084180e drm/radeon: fix dp link rate selection (v2) I accidently dropped the special handling for NUTMEG DP bridge chips. They require a fixed link rate. Reviewed-by: Christian König <[email protected]> Reviewed-by: Ken Wang <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Tested-by: Ken Moffat <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-03-08drm/amd/amdgpu: Fix indentation in do_set_base() (DCEv8)Tom St Denis1-4/+3
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: make afmt_init cleanup if alloc fails (DCEv8)Tom St Denis1-2/+12
If the allocation fails free memory and return error code. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Move config init flag to bottom of sw_init (DCEv8)Tom St Denis1-3/+2
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Don't proceed into audio_fini if audio is disabled (DCEv8)Tom St Denis1-0/+3
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Fix identation in do_set_base() (DCEv10)Tom St Denis1-4/+3
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Make afmt_init cleanup if alloc fails (DCEv10)Tom St Denis1-2/+12
Make the function free memory and return an error code if the allocation fails. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Move initialized flag to bottom of sw_init (DCEv10)Tom St Denis1-3/+2
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Don't proceed in audio_fini if disabled (DCEv10)Tom St Denis1-0/+3
If audio is disabled we shouldn't proceed into the fini function. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Fix indentation in dce_v11_0_crtc_do_set_base()Tom St Denis1-4/+3
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Make afmt_init() cleanup if alloc fails (DCEv11)Tom St Denis1-2/+12
Updated DCEv11 afmt_init to cleanup if any kzalloc fails and then return an error code. Don't continue initializing the audio stack in that case. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Move init flag to after init in sw_init() (DCEv11)Tom St Denis1-3/+3
Don't set config_init to true until all config statements pass. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Whitespace typo fix in sw_init (DCEv11)Tom St Denis1-2/+2
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amd/amdgpu: Don't proceed in audio_fini in DCEv11 if disabledTom St Denis1-0/+3
If amdgpu_audio is disabled then the audio structure is not initialized so we shouldn't read it in the fini function. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amdgpu: move get_user_pages out of amdgpu_ttm_tt_pin_userptr v6Christian König6-24/+174
That avoids lock inversion between the BO reservation lock and the anon_vma lock. v2: * Changed amdgpu_bo_list_entry.user_pages to an array of pointers * Lock mmap_sem only for get_user_pages * Added invalidation of unbound userpointer BOs * Fixed memory leak and page reference leak v3 (chk): * Revert locking mmap_sem only for_get user_pages * Revert adding invalidation of unbound userpointer BOs * Sanitize and fix error handling v4 (chk): * Init userpages pointer everywhere. * Fix error handling when get_user_pages() fails. * Add invalidation of unbound userpointer BOs again. v5 (chk): * Add maximum number of tries. v6 (chk): * Fix error handling when we run out of tries. Signed-off-by: Christian König <[email protected]> Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> (v4) Acked-by: Alex Deucher <[email protected]>
2016-03-08drm/amdgpu: if a GDS switch is needed emit a pipeline sync as wellChristian König1-10/+12
Otherwise we might change the GDS settings while they are still in use. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2016-03-08drm/amdgpu: split pipeline sync and vm flushChristian König4-9/+35
This allows us to use the pipeline sync for other tasks as well. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2016-03-08drm/amdgpu: switch the GDS only on demand v2Christian König3-2/+53
Switching the GDS space to often seems to be problematic. This patch together with the following can avoid VM faults on context switch. v2: extend commit message a bit Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> (v1) Reviewed-by: Chunming Zhou <[email protected]> (v1)
2016-03-08drm/amdgpu: move the GDS switch into vm flush as wellChristian König3-14/+21
After all it's an operation on the VMID. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2016-03-08drm/amdgpu: return the common fence from amdgpu_fence_emitChristian König3-19/+19
Try to avoid using the hardware specific fences even more. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2016-03-08drm/amdgpu: add slap cache for sync objects as wellChristian König3-4/+36
We need them all the time. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2016-03-08drm/amdgpu: remove HW fence ownerChristian König12-43/+16
Not used any more since we now always use the sheduler. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2016-03-08drm/amdgpu: cleanup the sync codeChristian König1-18/+30
No need for two functions doing the same, remove one and add comments what those functions actually do. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]>
2016-03-08drm/amdgpu: prevent get_user_pages recursionChristian König1-10/+38
Remember the tasks which are inside get_user_pages() and ignore MMU callbacks from there. Signed-off-by: Christian König <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amdgpu: group userptr in the BO list v2Christian König3-11/+18
We need them together with the next patch. v2: Don't take bo reference twice Signed-off-by: Christian König <[email protected]> Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amdgpu: sync to the active user on reusing a VMIDChristian König1-0/+7
Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amdgpu: Clear HDP_MISC_CNTL.HDP_FLUSH_INVALIDATE_CACHEChunming Zhou2-2/+2
So that we can invalidate and flush the HDP independently Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amdgpu: add hdp invalidation for sdma v3_0Chunming Zhou1-0/+9
Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amdgpu: add hdp invalidation for sdma v2_4Chunming Zhou1-0/+8
Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amdgpu: add hdp invalidation for cik sdmaChunming Zhou1-0/+8
Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amdgpu: add hdp invalidation for gfx8Chunming Zhou1-0/+14
Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amdgpu: add hdp invalidation for gfx7Chunming Zhou1-0/+21
Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amdgpu: add hdp_invalidate functionChunming Zhou2-0/+7
It's called after emitting ibs. Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amdgpu: wait engine idle before vm flush for sdmaChunming Zhou3-0/+44
Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-03-08drm/amdgpu: Switch to drm_vblank_on/off (v2)Daniel Vetter3-6/+6
Equivalent change to the radeon driver. Note that with radeon this caught a bug in the dri3 DDX implementation, which asked for vblank interrupts when the pipe is off. That bug needs to be fixed before we can merge this patch (if amdgpu is affected too). Michel discovered this one. v2: agd: switch dce8 as well. Acked-by: Michel Dänzer <[email protected]> Cc: Michel Dänzer <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Alex Deucher <[email protected]>