[pull] amdgpu drm-fixes-5.1

2019-03-20 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.1: - Parially revert a bulk move clean up change to fix a ref count bug - Fix invalid use of change_bit that caused a crash on PPC64 and ARM64 The following changes since commit 9e98c678c2d6ae3a17cb2de55d17f69dddaa231b: Linux 5.1-rc1 (2019-03-17 14:22:26 -0700)

Re: [PATCH 1/9] dma-buf: add new dma_fence_chain container v6

2019-03-20 Thread kbuild test robot
Hi Chunming, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.1-rc1 next-20190320] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci

Re: [PATCH libdrm] tests/amdgpu: minor fix for dispatch/draw test

2019-03-20 Thread Alex Deucher
On Tue, Mar 19, 2019 at 10:47 PM Cui, Flora wrote: > > 1. clear cmd buffer > 2. make amdgpu_memcpy_dispatch_test static > 3. tab/space fix > > Change-Id: Idf55f8881f66458b585092eccb55b6042520e4ad > Signed-off-by: Flora Cui Reviewed-by: Alex Deucher and pushed. Thanks! > --- >

Re: Clang warning in drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

2019-03-20 Thread Alex Deucher
On Wed, Mar 20, 2019 at 4:49 PM Nick Desaulniers wrote: > > On Wed, Mar 20, 2019 at 2:37 AM Koenig, Christian > wrote: > > > > Am 20.03.19 um 05:34 schrieb Nathan Chancellor: > > > On Wed, Mar 20, 2019 at 01:31:27AM +, Pan, Xinhui wrote: > > >> these two enumerated types are same for now.

[PATCH] drm/amd/amdgpu: fix Polaris10 PCIe dpm feature issue.

2019-03-20 Thread Chengming Gui
use pcie_bandwidth_available to get real link state to update pcie table. Signed-off-by: Chengming Gui --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Re: [PATCH 3/4] drm/amd/display: In VRR mode, do DRM core vblank handling at end of vblank.

2019-03-20 Thread Mario Kleiner
Ok, fixed all the style issues and ran checkpatch over the patches. Thanks. On Tue, Mar 19, 2019 at 2:32 PM Kazlauskas, Nicholas wrote: > > On 3/19/19 9:23 AM, Kazlauskas, Nicholas wrote: > > On 3/18/19 1:19 PM, Mario Kleiner wrote: > >> In VRR mode, proper vblank/pageflip timestamps can only be

[PATCH 1/4] drm/amd/display: Prevent vblank irq disable while VRR is active. (v2)

2019-03-20 Thread Mario Kleiner
During VRR mode we can not allow vblank irq dis-/enable transitions, as an enable after a disable can happen at an arbitrary time during the video refresh cycle, e.g., with a high likelyhood inside vblank front-porch. An enable during front-porch would cause vblank timestamp updates/calculations

RE: [PATCH] drm/amd/amdgpu: fix incorrect translation about the PCIe MLW info

2019-03-20 Thread Gui, Jack
Hi Alex, I will rethink the patch. Polaris10 encounted issue about the PCIe dpm feature (some platform, not all). If we update pcie table with X16 link width, system will hang, But update with X8, our driver will modprobe successfully. The link width got from the config register is real X16.

Re: [PATCH] drm/amdgpu: add one rlc version into gfxoff blacklist

2019-03-20 Thread StDenis, Tom
FWIW when I manually apply this to my drm-next kernel on my raven1 devel box it works fine. Tested-by: Tom St Denis Tom On 2019-03-19 9:31 a.m., Huang Rui wrote: > RLC #53815 ucode has the noise issue on 4k playback while gfxoff enabled. > > Signed-off-by: Huang Rui > --- >

[PATCH v13 00/20] arm64: untag user pointers passed to the kernel

2019-03-20 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 v13 08/20] fs, arm64: untag user pointers in fs/userfaultfd.c

2019-03-20 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_register() and userfaultfd_unregister() use provided user pointers for vma lookups, which can only by

[PATCH v13 01/20] uaccess: add untagged_addr definition for other arches

2019-03-20 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

[PATCH v13 02/20] arm64: untag user pointers in access_ok and __uaccess_mask_ptr

2019-03-20 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

Re: Clang warning in drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

2019-03-20 Thread Nathan Chancellor
On Wed, Mar 20, 2019 at 01:31:27AM +, Pan, Xinhui wrote: > these two enumerated types are same for now. both of them might change in the > future. > > I have not used clang, but would .block_id = (int)head->block fix your > warning? If such change is acceptable, I can make one then. > >

[PATCH] drm/amd/powerplay: Zero initialize num_of_levels in vega20_set_single_dpm_table

2019-03-20 Thread Nathan Chancellor
When building with -Wsometimes-uninitialized, Clang warns: drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:456:2: warning: variable 'num_of_levels' is used uninitialized whenever '?:' condition is false [-Wsometimes-uninitialized] smu_read_smc_arg(smu, _of_levels);

Clang warning in drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

2019-03-20 Thread Nathan Chancellor
Hi all, The introduction of this file in commit dbd249c24427 ("drm/amdgpu: add amdgpu_ras.c to support ras (v2)") introduces the following Clang warnings: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:544:23: warning: implicit conversion from enumeration type 'enum amdgpu_ras_block' to different

Re: [PATCH] drm/amdgpu: revert "XGMI pstate switch initial support"

2019-03-20 Thread Liu, Shaoyun
ok , sounds good .  Please go ahead to revert the change . I will send out another one  for review . Regards shaoyun.liu On 2019-03-20 6:00 a.m., Christian König wrote: > Am 19.03.19 um 19:48 schrieb Liu, Shaoyun: >> As I understand,  if we want to implement the  logic in bo_add/rmv >>

Failed to pin framebuffer with oom error during dm automic commit

2019-03-20 Thread Liang, Prike
Hello everyone , During the GPGPU high loading Abaqus case will encounter failed to pin framebuffer with error -12 when perform dm_plane_helper_prepare_fb as the SWDEV-177756 described. That seems can't evict enough memory for TTM_PL_VRAM more type .Now add debug patch for tracing the definite

[PATCH v13 15/20] drm/radeon, arm64: untag user pointers in radeon_ttm_tt_pin_userptr

2019-03-20 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. radeon_ttm_tt_pin_userptr() uses provided user pointers for vma lookups, which can only by done with untagged

[PATCH v13 07/20] fs, arm64: untag user pointers in copy_mount_options

2019-03-20 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

[PATCH v13 10/20] kernel, arm64: untag user pointers in prctl_set_mm*

2019-03-20 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. prctl_set_mm() and prctl_set_mm_map() use provided user pointers for vma lookups and do some pointer comparisons to

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

2019-03-20 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

[PATCH v13 11/20] tracing, arm64: untag user pointers in seq_print_user_ip

2019-03-20 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. seq_print_user_ip() uses provided user pointers for vma lookups, which can only by done with untagged pointers.

[PATCH v13 19/20] vfio/type1, arm64: untag user pointers in vaddr_get_pfn

2019-03-20 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

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

2019-03-20 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

[PATCH v13 13/20] bpf, arm64: untag user pointers in stack_map_get_build_id_offset

2019-03-20 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. stack_map_get_build_id_offset() uses provided user pointers for vma lookups, which can only by done with untagged

[PATCH v13 12/20] uprobes, arm64: untag user pointers in find_active_uprobe

2019-03-20 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. find_active_uprobe() uses user pointers (obtained via instruction_pointer(regs)) for vma lookups, which can only by

[PATCH v13 16/20] IB/mlx4, arm64: untag user pointers in mlx4_get_umem_mr

2019-03-20 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. mlx4_get_umem_mr() uses provided user pointers for vma lookups, which can only by done with untagged pointers.

[PATCH v13 18/20] tee/optee, arm64: untag user pointers in check_mem_type

2019-03-20 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. check_mem_type() uses provided user pointers for vma lookups (via __check_mem_type()), which can only by done with

[PATCH v13 06/20] mm, arm64: untag user pointers in get_vaddr_frames

2019-03-20 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 v13 04/20] mm, arm64: untag user pointers passed to memory syscalls

2019-03-20 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: madvise, mbind, get_mempolicy,

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

2019-03-20 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

[PATCH v13 09/20] net, arm64: untag user pointers in tcp_zerocopy_receive

2019-03-20 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. tcp_zerocopy_receive() uses provided user pointers for vma lookups, which can only by done with untagged pointers.

Re: Clang warning in drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

2019-03-20 Thread Stephen Hines
Why are there 2 different enums for this same thing at all? By casting, you are reducing type safety in the kernel, which can cause bugs later (should the two enums diverge in encoding). In my opinion, the proper solution is to remove one of the enums or provide an explicit helper that does the

Re: [PATCH 1/4] drm/amd/display: Prevent vblank irq disable while VRR is active.

2019-03-20 Thread Mario Kleiner
On Mon, Mar 18, 2019 at 6:29 PM Kazlauskas, Nicholas wrote: > > On 3/18/19 1:19 PM, Mario Kleiner wrote: > > During VRR mode we can not allow vblank irq dis-/enable > > transitions, as an enable after a disable can happen at > > an arbitrary time during the video refresh cycle, e.g., > > with a

Re: Clang warning in drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

2019-03-20 Thread Koenig, Christian
Am 20.03.19 um 05:34 schrieb Nathan Chancellor: > On Wed, Mar 20, 2019 at 01:31:27AM +, Pan, Xinhui wrote: >> these two enumerated types are same for now. both of them might change in >> the future. >> >> I have not used clang, but would .block_id = (int)head->block fix your >> warning? If

Re: [PATCH 8/9] drm/syncobj: add timeline signal ioctl for syncobj v3

2019-03-20 Thread Lionel Landwerlin
On 20/03/2019 03:53, zhoucm1 wrote: On 2019年03月19日 19:54, Lionel Landwerlin wrote: On 15/03/2019 12:09, Chunming Zhou wrote: v2: individually allocate chain array, since chain node is free independently. v3: all existing points must be already signaled before cpu perform signal operation,  

Re: [PATCH 5/8] drm/amdgpu: new VM update backends

2019-03-20 Thread Kuehling, Felix
As far as I can tell, the whole series is a small cleanup and big refactor to enable CPU clearing of PTs without a lot of ugliness or code duplication. It looks good to me. I haven't reviewed all the moved SDMA update code to make sure it all works correctly, but at least the prepare and

RE: [PATCH] drm/amd/amdgpu: fix incorrect translation about the PCIe MLW info

2019-03-20 Thread Xu, Feifei
Hi Jack, Is the failure happens at link width training at X12? Thanks Feifei -Original Message- From: amd-gfx On Behalf Of Gui, Jack Sent: Wednesday, March 20, 2019 4:22 PM To: Alex Deucher Cc: amd-gfx list Subject: RE: [PATCH] drm/amd/amdgpu: fix incorrect translation about the

Re: Potential NULL pointer dereference in radeon_ttm_tt_populate

2019-03-20 Thread Koenig, Christian
Am 19.03.19 um 21:01 schrieb Shaobo He: > > See here: > > #if IS_ENABLED(CONFIG_AGP) > >  if (rdev->flags & RADEON_IS_AGP) { > >  return ttm_agp_tt_populate(ttm, ctx); > >  } > > #endif > > > > This code appears to be after the potential location of NULL pointer >

Re: [PATCH] drm/amdgpu: revert "XGMI pstate switch initial support"

2019-03-20 Thread Christian König
Am 19.03.19 um 19:48 schrieb Liu, Shaoyun: As I understand,  if we want to implement the  logic in bo_add/rmv function ,  I need following conditions are all to be true for a valid XGMI request. 1.  check the adev and the bo_adev are different .     This is correct on rocm implementation .(

Re: [PATCH] drm/amd/powerplay: Zero initialize num_of_levels in vega20_set_single_dpm_table

2019-03-20 Thread Nick Desaulniers
On Tue, Mar 19, 2019 at 6:00 PM Nathan Chancellor wrote: > > When building with -Wsometimes-uninitialized, Clang warns: > > drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:456:2: warning: > variable 'num_of_levels' is used uninitialized whenever '?:' condition > is false

Re: Clang warning in drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

2019-03-20 Thread Nathan Chancellor
On Wed, Mar 20, 2019 at 07:58:09AM -0700, Stephen Hines wrote: > Why are there 2 different enums for this same thing at all? By casting, you > are reducing type safety in the kernel, which can cause bugs later (should > the two enums diverge in encoding). In my opinion, the proper solution is > to

Re: Clang warning in drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

2019-03-20 Thread Stephen Hines
Resending as plain-text to rest of list. Steve On Wed, Mar 20, 2019 at 7:58 AM Stephen Hines wrote: > > Why are there 2 different enums for this same thing at all? By casting, you > are reducing type safety in the kernel, which can cause bugs later (should > the two enums diverge in

Re: [PATCH 1/4] drm/amd/display: Prevent vblank irq disable while VRR is active. (v2)

2019-03-20 Thread Kazlauskas, Nicholas
On 3/20/19 4:12 AM, Mario Kleiner wrote: > During VRR mode we can not allow vblank irq dis-/enable > transitions, as an enable after a disable can happen at > an arbitrary time during the video refresh cycle, e.g., > with a high likelyhood inside vblank front-porch. An > enable during front-porch

Re: [PATCH 8/9] drm/syncobj: add timeline signal ioctl for syncobj v3

2019-03-20 Thread Lionel Landwerlin
On 20/03/2019 03:53, zhoucm1 wrote: On 2019年03月19日 19:54, Lionel Landwerlin wrote: On 15/03/2019 12:09, Chunming Zhou wrote: v2: individually allocate chain array, since chain node is free independently. v3: all existing points must be already signaled before cpu perform signal operation,  

Re: [PATCH 3/4] drm/amd/display: In VRR mode, do DRM core vblank handling at end of vblank.

2019-03-20 Thread Kazlauskas, Nicholas
On 3/20/19 3:51 AM, Mario Kleiner wrote: > Ok, fixed all the style issues and ran checkpatch over the patches. Thanks. > > On Tue, Mar 19, 2019 at 2:32 PM Kazlauskas, Nicholas > wrote: >> >> On 3/19/19 9:23 AM, Kazlauskas, Nicholas wrote: >>> On 3/18/19 1:19 PM, Mario Kleiner wrote: In VRR

[bug report] drm/amdgpu: add amdgpu_ras.c to support ras (v2)

2019-03-20 Thread Dan Carpenter
Hello xinhui pan, This is a semi-automatic email about new static checker warnings. The patch dbd249c24427: "drm/amdgpu: add amdgpu_ras.c to support ras (v2)" from Oct 31, 2018, leads to the following Smatch complaint: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1215 amdgpu_ras_add_bad_pages()

[PATCH -next] drm/ttm: remove set but not used variable 'rdev'

2019-03-20 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/radeon/radeon_ttm.c: In function 'radeon_move_vram_ram': drivers/gpu/drm/radeon/radeon_ttm.c:254:24: warning: variable 'rdev' set but not used [-Wunused-but-set-variable] drivers/gpu/drm/radeon/radeon_ttm.c: In function

[PATCH] drm/amdgpu/display: fix build when DCN KCONFIG is not set

2019-03-20 Thread Alex Deucher
Leads to an undefined symbol otherwise. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c index

[PATCH][next] drm/amd/powerplay: fix spelling mistake "unknow" -> "unknown"

2019-03-20 Thread Colin King
From: Colin Ian King There is a spelling mistake in pr_warn message; fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c

Re: Clang warning in drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

2019-03-20 Thread Nick Desaulniers
On Wed, Mar 20, 2019 at 2:37 AM Koenig, Christian wrote: > > Am 20.03.19 um 05:34 schrieb Nathan Chancellor: > > On Wed, Mar 20, 2019 at 01:31:27AM +, Pan, Xinhui wrote: > >> these two enumerated types are same for now. both of them might change in > >> the future. Please consider if the

[PATCH] drm/amdgpu: XGMI pstate switch initial support

2019-03-20 Thread Liu, Shaoyun
Driver vote low to high pstate switch whenever there is an outstanding XGMI mapping request. Driver vote high to low pstate when all the outstanding XGMI mapping is terminated. Change-Id: I197501f853c47f844055c0e28c0ac00a1ff06607 Signed-off-by: shaoyunl --- drivers/gpu/drm/amd/amdgpu/amdgpu.h