Re: [PATCH 01/12] drm/amdgpu: implement vm_operations_struct.access

2017-07-11 Thread axie
Hi Felix, I think you might want to add a boundary check to limit the ptrace access inside the BO. Otherwise there may be a potential security leak allowing others to access the whole memory by using ptrace system call. -Alex Bin On 2017-07-12 01:37 AM, Felix Kuehling wrote: Any comments

Re: [PATCH] drm/amdgpu: Optimize recursion in amdgpu_vm_update_level

2017-07-11 Thread zhoucm1
On 2017年07月12日 12:56, Felix Kuehling wrote: Hi David, Responses inline ... Yeah, I see your mean, you mainly want to save some cpu overhead. If others have no object, feel free add my RB then. Regards, David Zhou On 17-07-12 12:30 AM, zhoucm1 wrote: nice improvement, just some nitpick in

Re: [PATCH 05/12] drm/amdgpu: Send no-retry XNACK for all fault types

2017-07-11 Thread Felix Kuehling
Any comments? I believe this is a nice stability improvement. In case of VM faults they don't take down the whole GPU with an interrupt storm. With KFD we can recover without a GPU reset in many cases just by unmapping the offending process' queues. Regards, Felix On 17-07-03 05:11 PM, Felix

Re: [PATCH 01/12] drm/amdgpu: implement vm_operations_struct.access

2017-07-11 Thread Felix Kuehling
Any comments on this one? This was requested by the HSA runtime team a long time ago as a debugging feature. It allows gdb to access the content of CPU-mapped BOs. I imagine this may be useful for user mode driver developers. Does anyone dare to give me a Reviewed-by? Regards, Felix On 17-07

[PATCH 5/6] drm/amdgpu: handle foreign BOs in the VM mapping

2017-07-11 Thread Felix Kuehling
From: Amber Lin Set the system bit for foreign BO mappings and use the remote VRAM BAR address as the VRAM base offset. Signed-off-by: Amber Lin Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) dif

[PATCH 2/6] drm/amdgpu: disallow foreign BOs for CS w/o GPUVM mapping

2017-07-11 Thread Felix Kuehling
From: Christian König Signed-off-by: Christian König Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 44ec11d..aef0

[PATCH 1/6] drm: Add helper to cast DMA-buf to GEM object

2017-07-11 Thread Felix Kuehling
Signed-off-by: Felix Kuehling --- drivers/gpu/drm/drm_prime.c | 25 + include/drm/drmP.h | 2 ++ 2 files changed, 27 insertions(+) diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c index 25aa455..b1f8445 100644 --- a/drivers/gpu/drm/drm_prim

[PATCH 6/6] drm/amdgpu: enable foreign DMA-buf objects v2

2017-07-11 Thread Felix Kuehling
From: Christian König We should be able to handle BOs from other instances as well. v2: * Add a module option that is off-by-default * Use new DRM helper function to check the exporting driver Signed-off-by: Christian König Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu.

[PATCH 3/6] drm/amdgpu: disallow foreign BOs in the display path v2

2017-07-11 Thread Felix Kuehling
From: Christian König Pinning them in other devices VRAM would obviously not work. v2: Add checks to DC code paths Signed-off-by: Christian König Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 6 ++ drivers/gpu/drm/amd/amdgpu/dce_v10_0.c

[PATCH 4/6] drm/amdgpu: separate BO from GEM object

2017-07-11 Thread Felix Kuehling
From: Christian König This allows us to have multiple GEM objects for one BO. Signed-off-by: Christian König Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 12 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c| 41 +++--- drivers/gpu/d

[PATCH 0/6] Experimental P2P buffer sharing v2

2017-07-11 Thread Felix Kuehling
This patch series adds experimental P2P buffer sharing in amdgpu. It's disabled by default and can be enabled with amdgpu.p2p_sharing=1. v2: * Changed drm helper function to cast to GEM object * Added foreign BO checks to DC code paths * Updated commit message for amdgpu_cs change Amber Lin (1):

Re: [PATCH 08/12] drm/amdgpu: disallow foreign BOs for UVD/VCE

2017-07-11 Thread Felix Kuehling
On 17-07-03 10:55 PM, Alex Deucher wrote: > On Mon, Jul 3, 2017 at 5:11 PM, Felix Kuehling wrote: >> From: Christian König >> >> They don't support VM mode yet. >> >> Signed-off-by: Christian König >> Reviewed-by: Felix Kuehling > This could probably be refined since newer asics support VM for

Re: [PATCH] drm/amdgpu: Optimize recursion in amdgpu_vm_update_level

2017-07-11 Thread Felix Kuehling
Hi David, Responses inline ... On 17-07-12 12:30 AM, zhoucm1 wrote: > nice improvement, just some nitpick inline, otherwise the patch is > Reviewed-by: Chunming Zhou . > > On 2017年07月12日 11:56, Felix Kuehling wrote: >> When lots of virtual address spaces is used, there can be thousands >> of page

[PATCH] drm/amdgpu: ttm_bind only when user needs gpu_addr in bo pin

2017-07-11 Thread Chunming Zhou
Change-Id: I282e1212346ed76470cadf39153109ab135f32f3 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object

Re: [PATCH] drm/amdgpu: Optimize recursion in amdgpu_vm_update_level

2017-07-11 Thread zhoucm1
nice improvement, just some nitpick inline, otherwise the patch is Reviewed-by: Chunming Zhou . On 2017年07月12日 11:56, Felix Kuehling wrote: When lots of virtual address spaces is used, there can be thousands of page table BOs. amdgpu_vm_update_level iterates over all of them recursively. In man

[PATCH] drm/amdgpu: Optimize recursion in amdgpu_vm_update_level

2017-07-11 Thread Felix Kuehling
When lots of virtual address spaces is used, there can be thousands of page table BOs. amdgpu_vm_update_level iterates over all of them recursively. In many cases only a few or none at all need to be updated. Minimize unnecessary code execution and memory usage in those cases. This speeds up memor

Re: [PATCH 1/2] drm/amdgpu: add get_clock_info for atomfirmware

2017-07-11 Thread zhoucm1
On 2017年07月12日 03:30, Alex Deucher wrote: On Mon, Jul 10, 2017 at 5:15 PM, Alex Deucher wrote: The information has moved to different tables, notably smu_info for core refclk and umc_info for mem refclk. Signed-off-by: Alex Deucher ping? this fixes looking up the reference clocks on vega1

Re: [PATCH] drm/amdgpu/soc15: drop dead function

2017-07-11 Thread zhoucm1
Reviewed-by: Chunming Zhou On 2017年07月12日 07:00, Alex Deucher wrote: Maybe a leftover from bringup? Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/

[PATCH] drm/amdgpu/soc15: drop dead function

2017-07-11 Thread Alex Deucher
Maybe a leftover from bringup? Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index dd58de9..9dff294 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc1

[bug report] drm/amdkfd: Add SDMA user-mode queues support to QCM

2017-07-11 Thread Dan Carpenter
Hello Ben Goz, The patch bcea30817574: "drm/amdkfd: Add SDMA user-mode queues support to QCM" from Jan 3, 2015, leads to the following static checker warning: drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c:191 create_queue_nocpsch() error: uninitialized symbol 'retval'. d

[PATCH] drm/amdgpu: Off by one sanity checks

2017-07-11 Thread Dan Carpenter
This is just future proofing code, not something that can be triggered in real life. We're testing to make sure we don't shift wrap when we do "1ull << i" so "i" has to be in the 0-63 range. If it's 64 then we have gone too far. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/amd/amd

Re: [PATCH] drm/syncobj: add sync obj wait interface. (v6)

2017-07-11 Thread Jason Ekstrand
On Tue, Jul 11, 2017 at 12:22 AM, Daniel Vetter wrote: > On Mon, Jul 10, 2017 at 02:09:42PM -0700, Jason Ekstrand wrote: > > On Mon, Jul 10, 2017 at 9:15 AM, Christian König < > deathsim...@vodafone.de> > > wrote: > > > > > Am 10.07.2017 um 17:52 schrieb Jason Ekstrand: > > > > > > On Mon, Jul 10

Re: [PATCH 1/2] drm/amdgpu: add get_clock_info for atomfirmware

2017-07-11 Thread Alex Deucher
On Mon, Jul 10, 2017 at 5:15 PM, Alex Deucher wrote: > The information has moved to different tables, notably > smu_info for core refclk and umc_info for mem refclk. > > Signed-off-by: Alex Deucher ping? this fixes looking up the reference clocks on vega10 and raven. Alex > --- > drivers/gp

Re: [PATCH 0/5] amdgpu: Visible VRAM Management Improvements, next take

2017-07-11 Thread John Brooks
On Tue, Jul 11, 2017 at 05:29:38PM +0900, Michel Dänzer wrote: > On 08/07/17 07:50 AM, John Brooks wrote: > > On Thu, Jul 06, 2017 at 07:51:25PM +0900, Michel Dänzer wrote: > >> From: Michel Dänzer > >> > >> This is a rearrangement of some patches of John's, with some improvements > >> of mine, an

Re: [PATCH v8 4/6] x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 30h-3fh) Processors v4

2017-07-11 Thread Andy Shevchenko
On Tue, Jul 11, 2017 at 3:07 PM, kbuild test robot wrote: > make ARCH=i386 Yeah, either this code shouldn't have been built on 32-bit arch at all, or be portable. >arch/x86/pci/fixup.c: In function 'pci_amd_enable_64bit_bar': >>> arch/x86/pci/fixup.c:674:15: warning: large integer i

Re: [PATCH libdrm] libdrm_amdgpu: add kernel semaphore support

2017-07-11 Thread Marek Olšák
On Tue, Jul 11, 2017 at 11:20 AM, Dave Airlie wrote: > On 11 July 2017 at 18:36, Christian König wrote: >> Am 11.07.2017 um 08:49 schrieb Dave Airlie: >>> >>> On 7 July 2017 at 19:07, Christian König wrote: Hi Dave, on first glance that looks rather good to me, but there is o

Re: [PATCH] drm/amdgpu/gfx: keep all compute queues on the same pipe

2017-07-11 Thread Andres Rodriguez
Hey Alex, Which apps are having perf problems? Also, is the issue present when the queue gets mapped to pipe0? (i.e. it the perf regression only happens on pipe1+) Regards, Andres On 2017-07-11 11:13 AM, Alex Deucher wrote: Spreading them causes performance regressions using compute queues.

Re: [PATCH xf86-video-ati 2/2] If a TearFree flip fails, fall back to non-TearFree operation

2017-07-11 Thread Alex Deucher
On Tue, Jul 11, 2017 at 5:17 AM, Michel Dänzer wrote: > From: Michel Dänzer > > In order to avoid possible freeze / log file spam in that case. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99769 > Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Alex > --- > src/drmmode_

Re: [PATCH] drm/syncobj: add sync obj wait interface. (v6)

2017-07-11 Thread Jason Ekstrand
On Tue, Jul 11, 2017 at 12:17 AM, Christian König wrote: > Am 11.07.2017 um 04:36 schrieb Michel Dänzer: > >> On 11/07/17 06:09 AM, Jason Ekstrand wrote: >> >>> On Mon, Jul 10, 2017 at 9:15 AM, Christian König >>> mailto:deathsim...@vodafone.de>> wrote: >>> >>> Am 10.07.2017 um 17:52 schrieb

Re: [PATCH xf86-video-ati 1/2] Use drmmode_crtc->scanout_id instead of 0 to check for scanout buffer

2017-07-11 Thread Alex Deucher
On Tue, Jul 11, 2017 at 5:17 AM, Michel Dänzer wrote: > From: Michel Dänzer > > Preparation for following change, no functional change intended. > > Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher > --- > src/radeon_dri2.c| 5 +++-- > src/radeon_kms.c | 4 ++-- > src/radeon_p

[PATCH] drm/amdgpu/gfx: keep all compute queues on the same pipe

2017-07-11 Thread Alex Deucher
Spreading them causes performance regressions using compute queues. Cc: Jim Qu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdg

Re: [PATCH v8 2/6] PCI: add resizeable BAR infrastructure v5

2017-07-11 Thread kbuild test robot
-resource-type-mask-v2/20170711-104904 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next reproduce: make htmldocs All warnings (new ones prefixed by >>): WARNING: convert(1) not found, for SVG to PDF conversion install ImageMagick (https://www.imagemagick.org)

Re: [PATCH v8 4/6] x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 30h-3fh) Processors v4

2017-07-11 Thread kbuild test robot
-define-for-the-PCI-resource-type-mask-v2/20170711-104904 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next config: i386-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree

Re: [PATCH libdrm] amdgpu: revert semaphore support

2017-07-11 Thread Christian König
That's irrelevant now, Dave Airlied noted in another thread that radv is already using this. So we can't remove it anyway because that would break Mesa as well. Christian. Am 11.07.2017 um 11:30 schrieb Mao, David: This is not true. Can we keep this for a while until we have sync object in pl

Re: [PATCH umr] top vram add visible vram usage info

2017-07-11 Thread Yu, Qiang
From my side, it should be like: VRAM: 249/4096 vis 50/237 (MiB) steam:( 3203) : 63304 KiB VRAM, 14088 KiB vis VRAM, 20072 KiB GTT compiz:( 2510): 82144 KiB VRAM, 7072 KiB vis VRAM, 20460 KiB GTT Xorg:( 1682)

Re: [PATCH umr] top vram add visible vram usage info

2017-07-11 Thread Tom St Denis
Hi Qiang, Apologies I booted a 4.9 kernel I was testing and I guess it doesn't have the ioctl you're using to read visvram. Booted into 4.11 it's working as expected. I'll add my Rb and push it momentarily. Cheers, Tom On 11/07/17 07:30 AM, Yu, Qiang wrote: From my side, it should be lik

Re: [PATCH libdrm] amdgpu: revert semaphore support

2017-07-11 Thread Emil Velikov
On 11 July 2017 at 10:15, Christian König wrote: > From: Christian König > > This reverts commit 6b79c66b841dded6ffa6b56f14e4eb10a90a7c07 > and commit 6afadeaf13279fcdbc48999f522e1dc90a9dfdaf. > If/when you're going ahead with this please squash a revert for 25712f1d35f6f64167ede45d3dc72a410f367c

Re: [PATCH umr] top vram add visible vram usage info

2017-07-11 Thread Tom St Denis
Trying out the patch I see the following in the "vram" list VRAM: 1096/2048 vis 195/238 (MiB) xonotic-glx:( 4364) : 965612 KiB VRAM, 0 KiB vis VRAM, 5064 KiB GTT umr:( 4315) : 0 KiB VRAM, 0 KiB vis VRAM, 0 KiB

Re: [PATCH libdrm] amdgpu: revert semaphore support

2017-07-11 Thread Mao, David
Hi Christian, When will sync object support landed in upstream kernel, which version in specific? We still rely on legacy semaphore implementation and we have to use it if sync object still takes time. Thanks. Best Regards, David > On 11 Jul 2017, at 5:15 PM, Christian König wrote: > > From:

Re: [PATCH libdrm 2/2] radeon: use asic id table to get chipset name

2017-07-11 Thread Emil Velikov
On 6 July 2017 at 13:46, Deucher, Alexander wrote: >> Attach it to analogous primitive? > > Radeon libdrm is much different than amdgpu. There is no analog. > Upon a closer look, indeed there isn't. Must have gotten confused earlier. >> >> > I think the current radeon API is simpler. Maybe a fo

Re: [PATCH libdrm] libdrm_amdgpu: add kernel semaphore support

2017-07-11 Thread Christian König
Am 11.07.2017 um 11:20 schrieb Dave Airlie: On 11 July 2017 at 18:36, Christian König wrote: Am 11.07.2017 um 08:49 schrieb Dave Airlie: On 7 July 2017 at 19:07, Christian König wrote: Hi Dave, on first glance that looks rather good to me, but there is one things I don't really like and I s

Re: [PATCH libdrm] amdgpu: revert semaphore support

2017-07-11 Thread Mao, David
This is not true. Can we keep this for a while until we have sync object in place? Thanks. Best Regards, David > On 11 Jul 2017, at 5:28 PM, Christian König wrote: > > I hoped that Dave Airlied will land it together with this patch. > > As far as I know the closed source driver already doesn't

Re: [PATCH libdrm] amdgpu: revert semaphore support

2017-07-11 Thread Christian König
I hoped that Dave Airlied will land it together with this patch. As far as I know the closed source driver already doesn't use that any more either. Regards, Christian. Am 11.07.2017 um 11:20 schrieb Mao, David: Hi Christian, When will sync object support landed in upstream kernel, which ver

Re: [PATCH libdrm] libdrm_amdgpu: add kernel semaphore support

2017-07-11 Thread Dave Airlie
On 11 July 2017 at 18:36, Christian König wrote: > Am 11.07.2017 um 08:49 schrieb Dave Airlie: >> >> On 7 July 2017 at 19:07, Christian König wrote: >>> >>> Hi Dave, >>> >>> on first glance that looks rather good to me, but there is one things I >>> don't really like and I strongly think Marek wi

[PATCH xf86-video-ati 2/2] If a TearFree flip fails, fall back to non-TearFree operation

2017-07-11 Thread Michel Dänzer
From: Michel Dänzer In order to avoid possible freeze / log file spam in that case. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99769 Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 12 +++- src/drmmode_display.h | 2 ++ src/radeon_kms.c | 21 +

[PATCH xf86-video-ati 1/2] Use drmmode_crtc->scanout_id instead of 0 to check for scanout buffer

2017-07-11 Thread Michel Dänzer
From: Michel Dänzer Preparation for following change, no functional change intended. Signed-off-by: Michel Dänzer --- src/radeon_dri2.c| 5 +++-- src/radeon_kms.c | 4 ++-- src/radeon_present.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/radeon_dri2.c b/s

[PATCH libdrm] amdgpu: revert semaphore support

2017-07-11 Thread Christian König
From: Christian König This reverts commit 6b79c66b841dded6ffa6b56f14e4eb10a90a7c07 and commit 6afadeaf13279fcdbc48999f522e1dc90a9dfdaf. Semaphore support was never used by any open source project and not even widely by any closed source driver. This should be replaced by sync object support. S

Re: [PATCH libdrm] libdrm_amdgpu: add kernel semaphore support

2017-07-11 Thread Christian König
Am 11.07.2017 um 08:49 schrieb Dave Airlie: On 7 July 2017 at 19:07, Christian König wrote: Hi Dave, on first glance that looks rather good to me, but there is one things I don't really like and I strongly think Marek will absolutely agree on that: When we add a new CS function then let's get

Re: [PATCH 0/5] amdgpu: Visible VRAM Management Improvements, next take

2017-07-11 Thread Michel Dänzer
On 08/07/17 07:50 AM, John Brooks wrote: > On Thu, Jul 06, 2017 at 07:51:25PM +0900, Michel Dänzer wrote: >> From: Michel Dänzer >> >> This is a rearrangement of some patches of John's, with some improvements >> of mine, and a patch of mine, rebased on current amd-staging-4.11. >> Details about ch

Re: [PATCH] drm/syncobj: add sync obj wait interface. (v6)

2017-07-11 Thread Daniel Vetter
On Mon, Jul 10, 2017 at 02:09:42PM -0700, Jason Ekstrand wrote: > On Mon, Jul 10, 2017 at 9:15 AM, Christian König > wrote: > > > Am 10.07.2017 um 17:52 schrieb Jason Ekstrand: > > > > On Mon, Jul 10, 2017 at 8:45 AM, Christian König > > wrote: > > > >> Am 10.07.2017 um 17:28 schrieb Jason Ekstr

Re: [PATCH] drm/syncobj: add sync obj wait interface. (v6)

2017-07-11 Thread Christian König
Am 11.07.2017 um 04:36 schrieb Michel Dänzer: On 11/07/17 06:09 AM, Jason Ekstrand wrote: On Mon, Jul 10, 2017 at 9:15 AM, Christian König mailto:deathsim...@vodafone.de>> wrote: Am 10.07.2017 um 17:52 schrieb Jason Ekstrand: On Mon, Jul 10, 2017 at 8:45 AM, Christian König mail