[PATCH 5/5] drm/amdgpu: add independent DMA-buf import v3

2018-03-25 Thread Christian König
Instead of relying on the DRM functions just implement our own import functions. This adds support for taking care of unpinned DMA-buf. v2: enable for all exporters, not just amdgpu, fix invalidation handling, lock reservation object while setting callback v3: change to new dma_buf attach

[PATCH 6/8] drm/amdgpu: note that we can handle peer2peer DMA-buf

2018-03-25 Thread Christian König
Importing should work out of the box. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c index

[PATCH 7/8] drm/amdgpu: add amdgpu_gem_attach

2018-03-25 Thread Christian König
Check if we can do peer2peer on the PCIe bus. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c

[PATCH 1/8] lib/scatterlist: add sg_set_dma_addr() helper

2018-03-25 Thread Christian König
Use this function to set an sg entry to point to device resources mapped using dma_map_resource(). The page pointer is set to NULL and only the DMA address, length and offset values are valid. Signed-off-by: Christian König --- include/linux/scatterlist.h | 23

[PATCH 4/5] drm/amdgpu: add independent DMA-buf export v2

2018-03-25 Thread Christian König
Instead of relying on the DRM functions just implement our own export functions. This adds support for taking care of unpinned DMA-buf. v2: fix unintended recursion, remove debugging leftovers Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h

[PATCH 2/5] drm/ttm: keep a reference to transfer pipelined BOs

2018-03-25 Thread Christian König
Make sure the transfered BO is never destroy before the transfer BO. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo_util.c | 50 +++ 1 file changed, 30 insertions(+), 20 deletions(-) diff --git

[PATCH 3/5] drm/ttm: remove the backing store if no placement is given

2018-03-25 Thread Christian König
Pipeline removal of the BOs backing store when the placement is given during validation. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c

[PATCH] dma-buf: use parameter structure for dma_buf_attach

2018-03-25 Thread Christian König
Move the parameters into a structure to make it simpler to extend it in follow up patches. This also adds the importer private as parameter so that we can directly work with a completely filled in attachment structure. Signed-off-by: Christian König ---

[PATCH 8/8] drm/amdgpu: add support for exporting VRAM using DMA-buf

2018-03-25 Thread Christian König
We should be able to do this now after checking all the prerequisites. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c| 44 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 9 +++

[PATCH 2/8] PCI: Add pci_find_common_upstream_dev()

2018-03-25 Thread Christian König
From: "wda...@nvidia.com" Add an interface to find the first device which is upstream of both devices. Signed-off-by: Will Davis Signed-off-by: Christian König --- drivers/pci/search.c | 24

[PATCH 5/8] drm/amdgpu: print DMA-buf status in debugfs

2018-03-25 Thread Christian König
Just note if a BO was imported/exported. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index

[PATCH 4/8] dma-buf: add peer2peer flag

2018-03-25 Thread Christian König
Add a peer2peer flag noting that the importer can deal with device resources which are not backed by pages. Signed-off-by: Christian König --- drivers/dma-buf/dma-buf.c | 1 + include/linux/dma-buf.h | 4 2 files changed, 5 insertions(+) diff --git

[PATCH 3/8] PCI: Add pci_peer_traffic_supported()

2018-03-25 Thread Christian König
From: "wda...@nvidia.com" Add checks for topology and ACS configuration to determine whether or not peer traffic should be supported between two PCI devices. Signed-off-by: Will Davis Signed-off-by: Christian König ---

[git pull] amdkfd fixes for 4.16 final

2018-03-25 Thread Oded Gabbay
Hi Dave, Two small fixes for the final 4.16 release: - Programming VMID correctly for scratch memory with HWS - deallocating SDMA queues correctly in various situations Thanks, Oded The following changes since commit 5a9f698feb11b198f17b2acebbfe0e2716a3beed: drm/ast: Fixed 1280x800 Display

Re: [PATCH] dma-buf: use parameter structure for dma_buf_attach

2018-03-25 Thread kbuild test robot
Hi Christian, I love your patch! Yet something to improve: [auto build test ERROR on drm/drm-next] [also build test ERROR on v4.16-rc6 next-20180323] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH 3/4] drm/amdgpu: Fix acquiring VM on large-BAR systems

2018-03-25 Thread Felix Kühling
Am 2018-03-24 um 04:34 AM schrieb Christian König: > Am 23.03.2018 um 20:53 schrieb Felix Kuehling: >> On 2018-03-23 03:35 PM, Christian König wrote: >>> Am 23.03.2018 um 20:30 schrieb Felix Kuehling: On large-BAR systems the VM page tables for compute are accessed by the CPU. Always

Re: [PATCH] drm/amd/pp: silence a static checker warning

2018-03-25 Thread Huang Rui
On Fri, Mar 23, 2018 at 02:39:03PM +0300, Dan Carpenter wrote: > This has a static checker warning because "frev" and "crev" can be > uninitialized if "info" is NULL. I just changed the order of the checks > so that we check "info" first. > > Signed-off-by: Dan Carpenter

Re: [PATCH 1/5] drm/amd/pp: Remove DIDT feature support on driver on Vega12

2018-03-25 Thread Huang Rui
On Fri, Mar 23, 2018 at 09:54:16AM -0400, Alex Deucher wrote: > On Fri, Mar 23, 2018 at 7:10 AM, Rex Zhu wrote: > > Change-Id: I3517bc4402114890d7a2a6b16f1d98bbfcfb524d > > Signed-off-by: Rex Zhu > > Why are we dropping this? Is DiDT not supported? I guess he