Re: [PATCH] drm/amd/powerplay: Fix double unlock bug in smu_sys_set_pp_table()

2019-03-21 Thread Wang, Kevin(Yang)
Hi Dan, Thank you for your careful attention to the problem. I made the mistake of this patch, when we do code rebase internally. and your patch is looks fine for me. Reviewed-by: Kevin Wang Thanks. Best Regards, Kevin From: Dan Carpenter Sent: Thursday, Mar

[PATCH 1/5] drm/amdgpu: Fix some sanity check

2019-03-21 Thread Pan, Xinhui
Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index a71668b8a7d0..a2ab70a24314 100644 --- a/dri

[PATCH 2/5] drm/amdgpu: use macro instead of enum for flags

2019-03-21 Thread Pan, Xinhui
Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index a2ab70a24314..5ece0671f108 100644 --- a/drivers/gpu/drm/amd/amdgpu/

[PATCH 3/5] drm/amdgpu: Fix amdgpu ras to ta enums conversion

2019-03-21 Thread Pan, Xinhui
Signed-off-by: xinhui pan Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 12 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 56 + 2 files changed, 62 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/

[PATCH 4/5] drm/amdgpu: remove per obj debugfs write

2019-03-21 Thread Pan, Xinhui
there is ras_ctrl node which can do the job. Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 42 + 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c inde

[PATCH 5/5] drm/amdgpu: add more inject control

2019-03-21 Thread Pan, Xinhui
TA accept some options like address is in sram or vram. Most default options are enough to use. But allow user to setup them. reuse inject.value to place these options. At the same time, we need translate the address to a physical/gpu address which the pages are mapped at. Signed-off-by: xinhui

Re: [PATCH] drm/amd/powerplay: Fix double unlock bug in smu_sys_set_pp_table()

2019-03-21 Thread Dan Carpenter
On Thu, Mar 21, 2019 at 09:20:38AM +0100, Julia Lawall wrote: > > > On Thu, 21 Mar 2019, Huang, Ray wrote: > > > > -Original Message- > > > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > > > Sent: Thursday, March 21, 2019 2:28 PM > > > To: Deucher, Alexander ; Wang, Kevin(Yang)

RE: [PATCH] drm/amd/powerplay: Fix double unlock bug in smu_sys_set_pp_table()

2019-03-21 Thread Julia Lawall
On Thu, 21 Mar 2019, Huang, Ray wrote: > > -Original Message- > > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > > Sent: Thursday, March 21, 2019 2:28 PM > > To: Deucher, Alexander ; Wang, Kevin(Yang) > > > > Cc: Koenig, Christian ; Zhou, David(ChunMing) > > ; David Airlie ; Da

[PATCH] drm/amd/powerplay: Off by one in vega20_get_smu_msg_index()

2019-03-21 Thread Dan Carpenter
The > should be >= so that we don't read one element beyond the end of the vega20_message_map[] array. Fixes: 3ec3c931489f ("drm/amd/powerplay: implement smu vega20_message_map for vega20") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 3 ++- 1 file changed, 2 in

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

2019-03-21 Thread Mario Kleiner
On Wed, Mar 20, 2019 at 2:11 PM Kazlauskas, Nicholas wrote: > > 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 hi

Re: [PATCH] drm/amd/powerplay: Off by one in vega20_get_smu_msg_index()

2019-03-21 Thread Wang, Kevin(Yang)
From: Dan Carpenter Sent: Thursday, March 21, 2019 5:19 PM To: Deucher, Alexander; Wang, Kevin(Yang) Cc: Koenig, Christian; Zhou, David(ChunMing); David Airlie; Daniel Vetter; Huang, Ray; Gao, Likun; Gui, Jack; amd-gfx@lists.freedesktop.org; kernel-janit...@vger

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

2019-03-21 Thread Mario Kleiner
On Wed, Mar 20, 2019 at 1:53 PM Kazlauskas, Nicholas wrote: > > 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

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

2019-03-21 Thread Christian König
Hi David, For the cmpxchg() case I of hand don't know either. Looks like so far nobody has used cmpxchg() with rcu protected structures. The other cases should be replaced by RCU_INIT_POINTER() or rcu_dereference_protected(.., true); Regards, Christian. Am 21.03.19 um 07:34 schrieb zhoucm1

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

2019-03-21 Thread Kazlauskas, Nicholas
On 3/20/19 5:22 PM, Alex Deucher wrote: > Leads to an undefined symbol otherwise. > > Signed-off-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas > --- > drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/amd/displa

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

2019-03-21 Thread Alex Deucher
On Thu, Mar 21, 2019 at 1:35 AM Chengming Gui wrote: > > 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

Re: [PATCH] drm/amd/powerplay: Fix double unlock bug in smu_sys_set_pp_table()

2019-03-21 Thread Julia Lawall
On Thu, 21 Mar 2019, Dan Carpenter wrote: > On Thu, Mar 21, 2019 at 09:20:38AM +0100, Julia Lawall wrote: > > > > > > On Thu, 21 Mar 2019, Huang, Ray wrote: > > > > > > -Original Message- > > > > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > > > > Sent: Thursday, March 21, 2019

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

2019-03-21 Thread Alex Deucher
On Wed, Mar 20, 2019 at 4:33 AM 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 [-Wsometimes-uninitia

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

2019-03-21 Thread Alex Deucher
On Wed, Mar 20, 2019 at 1:29 PM Colin King wrote: > > From: Colin Ian King > > There is a spelling mistake in pr_warn message; fix it. > > Signed-off-by: Colin Ian King Applied. thanks! Alex > --- > drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +- > 1 file changed, 1 insertion(+), 1 deleti

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

2019-03-21 Thread Alex Deucher
On Wed, Mar 20, 2019 at 9:25 AM YueHaibing wrote: > > 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] >

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

2019-03-21 Thread Zhou, David(ChunMing)
cmpxchg be replaced by some simple c sentance? otherwise we have to remove __rcu of chian->prev. -David Original Message Subject: Re: [PATCH 1/9] dma-buf: add new dma_fence_chain container v6 From: Christian König To: "Zhou, David(ChunMing)" ,kbuild test robot ,"Zhou, David(Chun

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

2019-03-21 Thread Christian König
No, atomic cmpxchg is a hardware operation. If you want to replace that you need a lock again. Maybe just add a comment and use an explicit cast to void* ? Not sure if that silences the warning. Christian. Am 21.03.19 um 15:13 schrieb Zhou, David(ChunMing): cmpxchg be replaced by some simpl

[PATCH] drm/amd/display: Fix "dc has no member named dml" compile error

2019-03-21 Thread sunpeng.li
From: Leo Li For DCN disabled builds, dc->dml is stripped out. Therefore, guard usage in dc_create_state() with CONFIG_DRM_AMD_DC_DCN1_0. It fixes the following error: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c: In function 'dc_create_state': >> drivers/gpu/drm/amd/amdgpu/../display/dc

Re: [PATCH] drm/amd/display: Fix "dc has no member named dml" compile error

2019-03-21 Thread Kazlauskas, Nicholas
On 3/21/19 10:44 AM, sunpeng...@amd.com wrote: > From: Leo Li > > For DCN disabled builds, dc->dml is stripped out. Therefore, guard usage > in dc_create_state() with CONFIG_DRM_AMD_DC_DCN1_0. > > It fixes the following error: > > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c: In function

Re: [PATCH] drm/amd/display: Fix "dc has no member named dml" compile error

2019-03-21 Thread Deucher, Alexander
Thanks! Acked-by: Alex Deucher From: amd-gfx on behalf of sunpeng...@amd.com Sent: Thursday, March 21, 2019 10:44 AM To: amd-gfx@lists.freedesktop.org Cc: Li, Sun peng (Leo); Alex Deucher; Wentland, Harry; Kazlauskas, Nicholas Subject: [PATCH] drm/amd/display:

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

2019-03-21 Thread Wentland, Harry
On 2019-03-21 5:39 a.m., Mario Kleiner wrote: > On Wed, Mar 20, 2019 at 1:53 PM Kazlauskas, Nicholas > wrote: >> >> 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, Nichola

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

2019-03-21 Thread Kazlauskas, Nicholas
On 3/21/19 11:38 AM, Wentland, Harry wrote: > > > On 2019-03-21 5:39 a.m., Mario Kleiner wrote: >> On Wed, Mar 20, 2019 at 1:53 PM Kazlauskas, Nicholas >> wrote: >>> >>> On 3/20/19 3:51 AM, Mario Kleiner wrote: Ok, fixed all the style issues and ran checkpatch over the patches. Thanks.

[PATCH] drm/amd/display: Only allow VRR when vrefresh is within supported range

2019-03-21 Thread Nicholas Kazlauskas
[Why] Black screens or artifacting can occur when enabling FreeSync outside of the supported range of the monitor. This can happen since the supported range isn't always the min/max vrefresh range available for the monitor. [How] There was previously a fix that prevented this from happening in the

Re: [PATCH 1/5] drm/amdgpu: Fix some sanity check

2019-03-21 Thread Alex Deucher
On Thu, Mar 21, 2019 at 3:28 AM Pan, Xinhui wrote: > > Please provide a patch description. With that fixed: Reviewed-by: Alex Deucher > Signed-off-by: xinhui pan > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 24 +--- > 1 file changed, 17 insertions(+), 7 deletions(-)

Re: [PATCH 2/5] drm/amdgpu: use macro instead of enum for flags

2019-03-21 Thread Alex Deucher
On Thu, Mar 21, 2019 at 3:29 AM Pan, Xinhui wrote: > > Signed-off-by: xinhui pan Please provide a patch description. With that fixed: Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/

Re: [PATCH 3/5] drm/amdgpu: Fix amdgpu ras to ta enums conversion

2019-03-21 Thread Alex Deucher
On Thu, Mar 21, 2019 at 3:29 AM Pan, Xinhui wrote: > > > Signed-off-by: xinhui pan > Signed-off-by: Nathan Chancellor Please provide a patch description. With that fixed: Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 12 +++--- > drivers/gpu/drm/amd/amdgpu/amdg

Re: [PATCH 5/5] drm/amdgpu: add more inject control

2019-03-21 Thread Alex Deucher
On Thu, Mar 21, 2019 at 3:34 AM Pan, Xinhui wrote: > > TA accept some options like address is in sram or vram. Most default > options are enough to use. But allow user to setup them. > > reuse inject.value to place these options. > > At the same time, we need translate the address to a physical/gp

Re: [PATCH 4/5] drm/amdgpu: remove per obj debugfs write

2019-03-21 Thread Alex Deucher
On Thu, Mar 21, 2019 at 3:30 AM Pan, Xinhui wrote: > > there is ras_ctrl node which can do the job. > > Signed-off-by: xinhui pan Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 42 + > 1 file changed, 1 insertion(+), 41 deletions(-) > > di

Re: [PATCH] drm/amd/display: Only allow VRR when vrefresh is within supported range

2019-03-21 Thread Alex Deucher
On Thu, Mar 21, 2019 at 11:53 AM Nicholas Kazlauskas wrote: > > [Why] > Black screens or artifacting can occur when enabling FreeSync outside > of the supported range of the monitor. This can happen since the > supported range isn't always the min/max vrefresh range available for > the monitor. >

Re: [PATCH] drm/amd/display: Only allow VRR when vrefresh is within supported range

2019-03-21 Thread Wentland, Harry
On 2019-03-21 11:53 a.m., Nicholas Kazlauskas wrote: > [Why] > Black screens or artifacting can occur when enabling FreeSync outside > of the supported range of the monitor. This can happen since the > supported range isn't always the min/max vrefresh range available for > the monitor. > > [How] >

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

2019-03-21 Thread Kevin Brodsky
On 20/03/2019 14:51, 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. prctl_set_mm() and prctl_set_mm_map() use provided user pointers for v

Re: Radeon HD 7450 brightness oversaturated

2019-03-21 Thread Alex Deucher
On Thu, Mar 21, 2019 at 4:41 PM Meelis Roos wrote: > > I decided to put a discrete graphics card into a PC and found a fitting > Radeon HD 7450. > It works, but there is strange whiteness like the brightness is oversaturated > and > light places turn into other colors: > * on fbcon, right after

[PATCH v2] drm/amdgpu: add more inject control

2019-03-21 Thread Pan, Xinhui
TA accept some options like address is in sram or vram. Most default options are enough to use. But allow user to setup them. reuse inject.value to place these options. At the same time, we need translate the address to a physical/gpu address which the pages are mapped at. V2: add a helper to m

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

2019-03-21 Thread Gui, Jack
Hi Alex, Expand the fix to all asics, please help to review. BR, Jack Gui -Original Message- From: Alex Deucher Sent: Thursday, March 21, 2019 9:24 PM To: Gui, Jack Cc: amd-gfx list Subject: Re: [PATCH] drm/amd/amdgpu: fix Polaris10 PCIe dpm feature issue. On Thu, Mar 21, 2019 at 1:

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

2019-03-21 Thread Gui, Jack
Attach correct patch again. Hi Alex, Expand the fix to all asics, please help to review. BR, Jack Gui -Original Message- From: Gui, Jack Sent: Friday, March 22, 2019 10:28 AM To: 'Alex Deucher' ; Xu, Feifei ; Zhang, Hawking Cc: amd-gfx list Subject: RE: [PATCH] drm/amd/amdgpu: fix P

Re: [PATCH] drm/amd/display: Fix boolean expression in get_surf_rq_param

2019-03-21 Thread Gustavo A. R. Silva
On 3/21/19 10:14 PM, Joe Perches wrote: > On Thu, 2019-03-21 at 22:10 -0500, Gustavo A. R. Silva wrote: >> Hi Harry, >> >> I noticed this patch is already in mainline, but the stable tag >> was removed. What is the reason for that if this bug is present >> in stable? > > It's not a bug, it's ju

Re: [PATCH] drm/amd/display: Fix boolean expression in get_surf_rq_param

2019-03-21 Thread Gustavo A. R. Silva
Hi Harry, I noticed this patch is already in mainline, but the stable tag was removed. What is the reason for that if this bug is present in stable? Thanks -- Gustavo On 1/3/19 3:11 PM, Wentland, Harry wrote: > On 2019-01-03 2:48 p.m., Gustavo A. R. Silva wrote: >> Fix boolean expression by usi

Re: [PATCH] drm/amd/display: Fix boolean expression in get_surf_rq_param

2019-03-21 Thread Joe Perches
On Thu, 2019-03-21 at 22:10 -0500, Gustavo A. R. Silva wrote: > Hi Harry, > > I noticed this patch is already in mainline, but the stable tag > was removed. What is the reason for that if this bug is present > in stable? It's not a bug, it's just a style issue and the && use in some compilers it

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

2019-03-21 Thread Alex Deucher
I think you can even go a step further and just replace amdgpu_device_get_min_pci_speed_width() with pcie_bandwidth_available(). It does basically the same thing. Although, it looks like pcie_bandwidth_available() needs to be fixed up to handle gen3 speeds (PCI_EXP_LNKCAP2). Maybe something for t

[PATCH] drm/amdgpu: fix vm_cpu_update hit NULL pointer

2019-03-21 Thread Monk Liu
should use amdgpu_bo_map, otherwise you'll hit NULL pointer bug if with amdgpu_bo_kptr Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c b/drivers/gpu/drm/amd/a