Re: [PATCH v15 13/17] IB, arm64: untag user pointers in ib_uverbs_(re)reg_mr()

2019-05-06 Thread Leon Romanovsky
On Mon, May 06, 2019 at 04:50:20PM -0300, Jason Gunthorpe wrote: > On Mon, May 06, 2019 at 06:30:59PM +0200, Andrey Konovalov wrote: > > This patch is a part of a series that extends arm64 kernel ABI to allow to > > pass tagged user pointers (with the top byte set to something else other > > than 0

RE: Bug Report: [PowerPlay] MCLK can't be set above 1107MHz on Vega 64

2019-05-06 Thread Quan, Evan
Hi Yanik, I just sent out several patches(with you in the CC list) and I believe the 1st patch may fix your issue(raise SOCCLK with mclk). Regards, Evan From: Yanik Yiannakis Sent: 2019年5月6日 18:56 To: Quan, Evan ; amd-gfx@lists.freedesktop.org; Deucher, Alexander Subject: Re: Bug Report: [Pow

[PATCH 1/4] drm/amd/powerplay: fix Vega10 mclk/socclk voltage link setup

2019-05-06 Thread Evan Quan
This may affects the Vega10 MCLK OD functionality. Change-Id: Icd685187501b4ec8867fb3c5077ea2664edbd114 Signed-off-by: Evan Quan --- .../drm/amd/powerplay/hwmgr/vega10_hwmgr.c| 35 +-- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/powerpl

[PATCH 3/4] drm/amd/powerplay: avoid repeat AVFS enablement/disablement

2019-05-06 Thread Evan Quan
No need to enable or disable AVFS if it's already in wanted state. Change-Id: I862c0c3d642e6a0dc7bb34e04c5a59f17b6b8deb Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega

[PATCH 2/4] drm/amd/powerplay: valid Vega10 DPMTABLE_OD_UPDATE_VDDC settings

2019-05-06 Thread Evan Quan
With user specified voltage(DPMTABLE_OD_UPDATE_VDDC), the AVFS will be disabled. However, the buggy code makes this actually not working as expected. Change-Id: Ifa83a6255bb3f6fa4bdb4de616521cb7bab6830a Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 7 +--

[PATCH 4/4] drm/amd/powerplay: update Vega10 power state on OD

2019-05-06 Thread Evan Quan
Update Vega10 top performance level power state accordingly on OD. Change-Id: Iaadeefb2904222bf5f4d54b39d7179ce53f92ac0 Signed-off-by: Evan Quan --- .../drm/amd/powerplay/hwmgr/vega10_hwmgr.c| 59 +++ 1 file changed, 59 insertions(+) diff --git a/drivers/gpu/drm/amd/powerpla

[PATCH AUTOSEL 4.19 28/81] drm/amd/display: If one stream full updates, full update all planes

2019-05-06 Thread Sasha Levin
From: David Francis [ Upstream commit c238bfe0be9ef7420f7669a69e27c8c8f4d8a568 ] [Why] On some compositors, with two monitors attached, VT terminal switch can cause a graphical issue by the following means: There are two streams, one for each monitor. Each stream has one plane current state:

[PATCH AUTOSEL 4.19 20/81] drm/amd/display: extending AUX SW Timeout

2019-05-06 Thread Sasha Levin
From: Martin Leung [ Upstream commit f4bbebf8e7eb4d294b040ab2d2ba71e70e69b930 ] [Why] AUX takes longer to reply when using active DP-DVI dongle on some asics resulting in up to 2000+ us edid read (timeout). [How] 1. Adjust AUX poll to match spec 2. Extend the SW timeout. This does not affect no

[PATCH AUTOSEL 5.0 23/99] drm/amd/display: extending AUX SW Timeout

2019-05-06 Thread Sasha Levin
From: Martin Leung [ Upstream commit f4bbebf8e7eb4d294b040ab2d2ba71e70e69b930 ] [Why] AUX takes longer to reply when using active DP-DVI dongle on some asics resulting in up to 2000+ us edid read (timeout). [How] 1. Adjust AUX poll to match spec 2. Extend the SW timeout. This does not affect no

[PATCH AUTOSEL 5.0 27/99] drm/amdgpu: shadow in shadow_list without tbo.mem.start cause page fault in sriov TDR

2019-05-06 Thread Sasha Levin
From: wentalou [ Upstream commit b575f10dbd6f84c2c8744ff1f486bfae1e4f6f38 ] shadow was added into shadow_list by amdgpu_bo_create_shadow. meanwhile, shadow->tbo.mem was not fully configured. tbo.mem would be fully configured by amdgpu_vm_sdma_map_table until calling amdgpu_vm_clear_bo. If sriov

[PATCH AUTOSEL 5.0 38/99] drm/amd/display: If one stream full updates, full update all planes

2019-05-06 Thread Sasha Levin
From: David Francis [ Upstream commit c238bfe0be9ef7420f7669a69e27c8c8f4d8a568 ] [Why] On some compositors, with two monitors attached, VT terminal switch can cause a graphical issue by the following means: There are two streams, one for each monitor. Each stream has one plane current state:

[PATCH 2/2] drm/amdgpu: Skip IH reroute in Vega20 SR-IOV VF

2019-05-06 Thread Trigger Huang
IH reroute commands are not supported on Vega20 VF Signed-off-by: Trigger Huang --- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c index b91df7b..4bdd70a 100644 --- a/

[PATCH 0/2] Skip IH re-route on Vega SR-IOV

2019-05-06 Thread Trigger Huang
IH re-route is not supported on Vega SR-IOV, need to be skipped Trigger Huang (2): drm/amdgpu: Skip IH reroute in Vega10 SR-IOV VF drm/amdgpu: Skip IH reroute in Vega20 SR-IOV VF drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 4 drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 4 2 files changed

[PATCH 1/2] drm/amdgpu: Skip IH reroute in Vega10 SR-IOV VF

2019-05-06 Thread Trigger Huang
IH reroute commands are not supported on Vega10 VF Signed-off-by: Trigger Huang --- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c index 143f0fa..9d6e603 100644 --- a/dri

RE: [PATCH] drm/amdgpu: Use FW addr returned by PSP for VF MM

2019-05-06 Thread Huang, Trigger
Thanks Alex's comments Yes, they are only in the SR-IOV HW initialization path of UVD/VCE. Thanks & Best Wishes, Trigger Huang From: Deucher, Alexander Sent: Monday, May 06, 2019 10:52 PM To: Huang, Trigger ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: Use FW addr returned by

RE: [PATCH] drm/amdgpu: treat negative lockup timeout as 'infinite timeout'

2019-05-06 Thread Quan, Evan
Thanks! Just sent out a V2 version with this addressed. > -Original Message- > From: Christian König > Sent: 2019年5月6日 19:26 > To: Quan, Evan ; amd-gfx@lists.freedesktop.org > Cc: Koenig, Christian > Subject: Re: [PATCH] drm/amdgpu: treat negative lockup timeout as 'infinite > timeout' >

[PATCH] drm/amdgpu: treat negative lockup timeout as 'infinite timeout' V2

2019-05-06 Thread Evan Quan
Negative lockup timeout is valid and will be treated as 'infinite timeout'. - V2: use msecs_to_jiffies for negative values Change-Id: I0d8387956a9c744073c0281ef2e1a547d4f16dec Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 20 1 file changed, 12 inse

Re: [PATCH v15 13/17] IB, arm64: untag user pointers in ib_uverbs_(re)reg_mr()

2019-05-06 Thread Jason Gunthorpe
On Mon, May 06, 2019 at 06:30:59PM +0200, Andrey Konovalov wrote: > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > ib_uverbs_(re)reg_mr() use provided user

Re: [PATCH] drm/amdgpu: rename amdgpu_prime.[ch] into amdgpu_dma_buf.[ch]

2019-05-06 Thread Kuehling, Felix
On 2019-05-06 7:24 a.m., Christian König wrote: > [CAUTION: External Email] > > We are getting a dma-buf implementation completely separate from drm prime, > so rename the files now and cleanup the code a bit. > > No functional change. > > Signed-off-by: Christian König Acked-by: Felix Kuehling

[PATCH 1/1] drm/amdgpu: Reserve shared fence for eviction fence

2019-05-06 Thread Kuehling, Felix
Need to reserve space for the shared eviction fence when initializing a KFD VM. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgp

[PATCH] drm/radeon: prefer lower reference dividers

2019-05-06 Thread Christian König
Instead of the closest reference divider prefer the lowest, this fixes flickering issues on HP Compaq nx9420. Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=108514 Suggested-by: Paul Dufresne Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon_display.c | 4 ++-- 1 file change

Re: [PATCH] drm/radeon: prefer lower reference dividers

2019-05-06 Thread Deucher, Alexander
Acked-by: Alex Deucher From: amd-gfx on behalf of Christian König Sent: Monday, May 6, 2019 2:01 PM To: amd-gfx@lists.freedesktop.org; dufres...@gmail.com; werner.luec...@googlemail.com Subject: [PATCH] drm/radeon: prefer lower reference dividers [CAUTION: Ext

[PATCH v15 16/17] vfio/type1, arm64: untag user pointers in vaddr_get_pfn

2019-05-06 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. vaddr_get_pfn() uses provided user pointers for vma lookups, which can only by done with untagged pointers. Untag us

[PATCH v15 15/17] tee, arm64: untag user pointers in tee_shm_register

2019-05-06 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. tee_shm_register()->optee_shm_unregister()->check_mem_type() uses provided user pointers for vma lookups (via __check

[PATCH v15 01/17] uaccess: add untagged_addr definition for other arches

2019-05-06 Thread Andrey Konovalov
To allow arm64 syscalls to accept tagged pointers from userspace, we must untag them when they are passed to the kernel. Since untagging is done in generic parts of the kernel, the untagged_addr macro needs to be defined for all architectures. Define it as a noop for architectures other than arm64

[PATCH v15 11/17] drm/amdgpu, arm64: untag user pointers

2019-05-06 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. In amdgpu_gem_userptr_ioctl() and amdgpu_amdkfd_gpuvm.c/init_user_pages() an MMU notifier is set up with a (tagged) u

[PATCH v15 08/17] mm, arm64: untag user pointers in get_vaddr_frames

2019-05-06 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. get_vaddr_frames uses provided user pointers for vma lookups, which can only by done with untagged pointers. Instead

[PATCH v15 14/17] media/v4l2-core, arm64: untag user pointers in videobuf_dma_contig_user_get

2019-05-06 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. videobuf_dma_contig_user_get() uses provided user pointers for vma lookups, which can only by done with untagged poin

[PATCH v15 10/17] fs, arm64: untag user pointers in fs/userfaultfd.c

2019-05-06 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. userfaultfd code use provided user pointers for vma lookups, which can only by done with untagged pointers. Untag us

[PATCH v15 12/17] drm/radeon, arm64: untag user pointers in radeon_gem_userptr_ioctl

2019-05-06 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. In radeon_gem_userptr_ioctl() an MMU notifier is set up with a (tagged) userspace pointer. The untagged address shoul

[PATCH v15 04/17] mm: add ksys_ wrappers to memory syscalls

2019-05-06 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. This patch adds ksys_ wrappers to the following memory syscalls: brk, get_mempolicy (renamed kernel_get_mempolicy ->

[PATCH v15 03/17] lib, arm64: untag user pointers in strn*_user

2019-05-06 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. strncpy_from_user and strnlen_user accept user addresses as arguments, and do not go through the same path as copy_fr

[PATCH v15 13/17] IB, arm64: untag user pointers in ib_uverbs_(re)reg_mr()

2019-05-06 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. ib_uverbs_(re)reg_mr() use provided user pointers for vma lookups (through e.g. mlx4_get_umem_mr()), which can only b

[PATCH v15 02/17] arm64: untag user pointers in access_ok and __uaccess_mask_ptr

2019-05-06 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. copy_from_user (and a few other similar functions) are used to copy data from user memory into the kernel memory or v

[PATCH v15 00/17] arm64: untag user pointers passed to the kernel

2019-05-06 Thread Andrey Konovalov
=== Overview arm64 has a feature called Top Byte Ignore, which allows to embed pointer tags into the top byte of each pointer. Userspace programs (such as HWASan, a memory debugging tool [1]) might use this feature and pass tagged user pointers to the kernel through syscalls or other interfaces.

[PATCH v15 17/17] selftests, arm64: add a selftest for passing tagged pointers to kernel

2019-05-06 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. This patch adds a simple test, that calls the uname syscall with a tagged user pointer as an argument. Without the ke

Re: [PATCH v14 13/17] IB/mlx4, arm64: untag user pointers in mlx4_get_umem_mr

2019-05-06 Thread Andrey Konovalov
On Fri, May 3, 2019 at 7:03 PM Catalin Marinas wrote: > > On Tue, Apr 30, 2019 at 03:25:09PM +0200, Andrey Konovalov wrote: > > This patch is a part of a series that extends arm64 kernel ABI to allow to > > pass tagged user pointers (with the top byte set to something else other > > than 0x00) as

[PATCH v15 05/17] arms64: untag user pointers passed to memory syscalls

2019-05-06 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. This patch allows tagged pointers to be passed to the following memory syscalls: brk, get_mempolicy, madvise, mbind,

[PATCH v15 06/17] mm: untag user pointers in do_pages_move

2019-05-06 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. do_pages_move() is used in the implementation of the move_pages syscall. Untag user pointers in this function. Sign

[PATCH v15 07/17] mm, arm64: untag user pointers in mm/gup.c

2019-05-06 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. mm/gup.c provides a kernel interface that accepts user addresses and manipulates user pages directly (for example get

[PATCH v15 09/17] fs, arm64: untag user pointers in copy_mount_options

2019-05-06 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. In copy_mount_options a user address is being subtracted from TASK_SIZE. If the address is lower than TASK_SIZE, the

Re: [PATCH] drm/amdgpu: rename amdgpu_prime.[ch] into amdgpu_dma_buf.[ch]

2019-05-06 Thread Alex Deucher
On Mon, May 6, 2019 at 7:24 AM Christian König wrote: > > We are getting a dma-buf implementation completely separate from drm prime, > so rename the files now and cleanup the code a bit. > > No functional change. > > Signed-off-by: Christian König Acked-by: Alex Deucher > --- > drivers/gpu/d

Re: [PATCH v14 10/17] fs, arm64: untag user pointers in fs/userfaultfd.c

2019-05-06 Thread Andrey Konovalov
On Fri, May 3, 2019 at 6:56 PM Catalin Marinas wrote: > > On Tue, Apr 30, 2019 at 03:25:06PM +0200, Andrey Konovalov wrote: > > This patch is a part of a series that extends arm64 kernel ABI to allow to > > pass tagged user pointers (with the top byte set to something else other > > than 0x00) as

Re: [PATCH] drm/amdgpu: Use FW addr returned by PSP for VF MM

2019-05-06 Thread Deucher, Alexander
As long as this doesn't break bare metal, I'm ok with it. Acked-by: Alex Deucher From: amd-gfx on behalf of Trigger Huang Sent: Thursday, May 2, 2019 8:56 AM To: amd-gfx@lists.freedesktop.org Cc: Huang, Trigger Subject: [PATCH] drm/amdgpu: Use FW addr returned b

Re: [PATCH v14 11/17] drm/amdgpu, arm64: untag user pointers

2019-05-06 Thread Andrey Konovalov
On Tue, Apr 30, 2019 at 8:03 PM Kuehling, Felix wrote: > > On 2019-04-30 9:25 a.m., Andrey Konovalov wrote: > > [CAUTION: External Email] > > > > This patch is a part of a series that extends arm64 kernel ABI to allow to > > pass tagged user pointers (with the top byte set to something else other

Re: [PATCH v14 08/17] mm, arm64: untag user pointers in get_vaddr_frames

2019-05-06 Thread Andrey Konovalov
On Fri, May 3, 2019 at 6:51 PM Catalin Marinas wrote: > > On Tue, Apr 30, 2019 at 03:25:04PM +0200, Andrey Konovalov wrote: > > This patch is a part of a series that extends arm64 kernel ABI to allow to > > pass tagged user pointers (with the top byte set to something else other > > than 0x00) as

Re: [PATCH v14 12/17] drm/radeon, arm64: untag user pointers

2019-05-06 Thread Andrey Konovalov
On Tue, Apr 30, 2019 at 7:57 PM Kuehling, Felix wrote: > > On 2019-04-30 9:25 a.m., Andrey Konovalov wrote: > > [CAUTION: External Email] > > > > This patch is a part of a series that extends arm64 kernel ABI to allow to > > pass tagged user pointers (with the top byte set to something else other

RE: [PATCH] drm/amdgpu: Use FW addr returned by PSP for VF MM

2019-05-06 Thread Huang, Trigger
Ping again. Thanks & Best Wishes, Trigger Huang -Original Message- From: Trigger Huang Sent: Thursday, May 02, 2019 8:57 PM To: amd-gfx@lists.freedesktop.org Cc: Huang, Trigger Subject: [PATCH] drm/amdgpu: Use FW addr returned by PSP for VF MM One Vega10 SR-IOV VF, the FW address ret

Re: [PATCH v3 00/26] compat_ioctl: cleanups

2019-05-06 Thread Andy Shevchenko
On Tue, Apr 16, 2019 at 11:23 PM Arnd Bergmann wrote: > > Hi Al, > > It took me way longer than I had hoped to revisit this series, see > https://lore.kernel.org/lkml/20180912150142.157913-1-a...@arndb.de/ > for the previously posted version. > > I've come to the point where all conversion handler

Re: Bug Report: [PowerPlay] MCLK can't be set above 1107MHz on Vega 64

2019-05-06 Thread Yanik Yiannakis
Hello Evan, Yes I always used that command to commit my changes. I also have amdgpu.ppfeaturemask=0x as a boot parameter and I set power_dpm_force_performance_level to manual. Sorry for omitting that I assumed it was evident. I have heard that the MCLK can only be as high as the SOCC

Re: How to dump gfx and waves after GPU reset happened?

2019-05-06 Thread Koenig, Christian
Am 06.05.19 um 14:20 schrieb Mikhail Gavrilov: > [CAUTION: External Email] > > On Sun, 5 May 2019 at 15:18, Christian König > wrote: >> Yeah, but for most end users we need to get the GPU working as fast as >> possible on a lockup. >> >> Saving all the state (which actually can be a couple of giga

Re: How to dump gfx and waves after GPU reset happened?

2019-05-06 Thread Mikhail Gavrilov
On Sun, 5 May 2019 at 15:18, Christian König wrote: > > Yeah, but for most end users we need to get the GPU working as fast as > possible on a lockup. > > Saving all the state (which actually can be a couple of gigabytes if you > include all textures etc..) is not really an option then. > > What w

[PATCH] drm/amdgpu: rename amdgpu_prime.[ch] into amdgpu_dma_buf.[ch]

2019-05-06 Thread Christian König
We are getting a dma-buf implementation completely separate from drm prime, so rename the files now and cleanup the code a bit. No functional change. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 1 +

Re: [PATCH] drm/amdgpu: treat negative lockup timeout as 'infinite timeout'

2019-05-06 Thread Christian König
Am 05.05.19 um 16:23 schrieb Evan Quan: Negative lockup timeout is valid and will be treated as 'infinite timeout'. Change-Id: I0d8387956a9c744073c0281ef2e1a547d4f16dec Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 14 ++ 1 file changed, 10 insertions(+),

RE: Bug Report: [PowerPlay] MCLK can't be set above 1107MHz on Vega 64

2019-05-06 Thread Quan, Evan
+Alex, Hi Yanik, Did you ever run the following command to let your OD settings take effect (before running games)? Otherwise, they did not take effect actually. echo "c" > /sys/devices/pci:00/:00:01.0/:01:00.0/:02:00.0/:03:00.0/pp_od_clk_voltage Regards, Evan From: Yanik Y