[PATCH] drm/amdgpu: limit DMA size to PAGE_SIZE for scatter-gather buffers

2018-04-10 Thread Sinan Kaya
right thing is to tell the DMA layer how much combining IOMMU can do. Signed-off-by: Sinan Kaya --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index e4bb435..02

[PATCH V2] drm/amdgpu: limit DMA size to PAGE_SIZE for scatter-gather buffers

2018-04-11 Thread Sinan Kaya
right thing is to tell the DMA layer how much combining IOMMU can do. Signed-off-by: Sinan Kaya --- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 1 + 4 files chang

Re: [PATCH V2] drm/amdgpu: limit DMA size to PAGE_SIZE for scatter-gather buffers

2018-04-11 Thread Sinan Kaya
On 4/11/2018 8:03 AM, Robin Murphy wrote: > On 10/04/18 21:59, Sinan Kaya wrote: >> Code is expecing to observe the same number of buffers returned from >> dma_map_sg() function compared to sg_alloc_table_from_pages(). This >> doesn't hold true universally especia

[PATCH V3] drm/amdgpu: limit DMA size to PAGE_SIZE for scatter-gather buffers

2018-04-11 Thread Sinan Kaya
tiple consecutive pages into one entry is just additional overhead which we don't need. Signed-off-by: Sinan Kaya --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_devi

Re: [PATCH v2 2/3] drm/amdgpu: Allow dma_map_sg() coalescing

2018-04-17 Thread Sinan Kaya
> r = -ENOMEM; > nents = dma_map_sg(adev->dev, ttm->sg->sgl, ttm->sg->nents, direction); > - if (nents != ttm->sg->nents) > + if (nents == 0) > goto release_sg; > > drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm-&

Re: [PATCH v2 2/3] drm/amdgpu: Allow dma_map_sg() coalescing

2018-04-25 Thread Sinan Kaya
On 4/17/2018 5:13 PM, Sinan Kaya wrote: > Tested-by: Sinan Kaya > > using QDF2400 and XFX Vega64 GPU for the first two patches. > > ./builddir/tests/amdgpu/amdgpu_test -s 1 > > Suite: Basic Tests > Test: Userptr Test ...passed > > Userptr Test fails without

Re: [PATCH v2 2/3] drm/amdgpu: Allow dma_map_sg() coalescing

2018-04-30 Thread Sinan Kaya
if (dma_sg) { + dma_len = sg_dma_len(dma_sg); + addr = sg_dma_address(dma_sg); + } } -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qua

Re: [PATCH v2 2/3] drm/amdgpu: Allow dma_map_sg() coalescing

2018-04-30 Thread Sinan Kaya
ferent test. Previous DRM library unit test is still passing. It must have some unique characteristic. I'll test your patch and report. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aur

Re: [PATCH v3 1/3] drm/prime: Iterate SG DMA addresses separately

2018-04-30 Thread Sinan Kaya
eviewed-by: Christian König > Signed-off-by: Robin Murphy > --- Much better Tested-by: Sinan Kaya for the first two patches. (1/3 and 2/3) -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of