Re: [PATCH 1/2] drm/amdkfd: Fix some double free when destroy queue fails

2021-06-16 Thread Pan, Xinhui
> 2021年6月17日 06:55,Kuehling, Felix 写道: > > On 2021-06-16 4:35 a.m., xinhui pan wrote: >> Some resource are freed even destroy queue fails. > > Looks like you're keeping this behaviour for -ETIME. That is consistent with > what pqn_destroy_queue does. What you're fixing here is the behaviour f

[PATCH -next] drm/amd/display: Fix gcc unused variable warning

2021-06-16 Thread Pu Lehui
GCC reports the following warning with W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:3635:17: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] 3635 | enum dc_status status = DC_ERROR_UNEXPECTED; | ^~ The variable should be us

Re: [PATCH 2/2] drm/amdkfd: Walk thorugh list with dqm lock hold

2021-06-16 Thread Felix Kuehling
On 2021-06-16 4:35 a.m., xinhui pan wrote: To avoid any list corruption. Signed-off-by: xinhui pan --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c| 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

RE: [PATCH 2/2] drm/amdkfd: Walk thorugh list with dqm lock hold

2021-06-16 Thread Chen, Jiansong (Simon)
[AMD Official Use Only] BTW, there is an obvious typo in the subject, Walk thorugh => Walk through. Regards, Jiansong -Original Message- From: amd-gfx On Behalf Of Felix Kuehling Sent: Thursday, June 17, 2021 7:09 AM To: Pan, Xinhui ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander

Re: [PATCH 1/2] drm/amdkfd: Fix some double free when destroy queue fails

2021-06-16 Thread Felix Kuehling
On 2021-06-16 4:35 a.m., xinhui pan wrote: Some resource are freed even destroy queue fails. Looks like you're keeping this behaviour for -ETIME. That is consistent with what pqn_destroy_queue does. What you're fixing here is the behaviour for non-timeout errors. Please make that clear in the

回复: [PATCH] drm/amdgpu: reset psp ring wptr during ring_create

2021-06-16 Thread Liu, Monk
[AMD Official Use Only] Reviewed-by: Monk Liu -邮件原件- 发件人: amd-gfx 代表 YuBiao Wang 发送时间: 2021年6月9日 11:02 收件人: amd-gfx@lists.freedesktop.org 抄送: Wang, YuBiao ; Grodzovsky, Andrey ; Xiao, Jack ; Xu, Feifei ; Chen, Horace ; Wang, Kevin(Yang) ; Xiaojie Yuan ; Tuikov, Luben ; Deucher, Alex

[PATCH -next] drm/amd/display: remove unused variable 'dc'

2021-06-16 Thread Pu Lehui
GCC reports the following warning with W=1: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_psr.c:70:13: warning: variable ‘dc’ set but not used [-Wunused-but-set-variable] 70 | struct dc *dc = NULL; | ^~ This variable is not used in function, this commit remove

[pull] amdgpu drm-fixes-5.13

2021-06-16 Thread Alex Deucher
Hi Dave, Daniel, Just a couple of small fixes for 5.13. The following changes since commit 7de5c0d70c779454785dd2431707df5b841eaeaf: Merge tag 'amd-drm-fixes-5.13-2021-06-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes (2021-06-11 11:17:10 +1000) are available in the Git re

Re: [PATCH] drm/amdkfd: Set iolink non-coherent in topology

2021-06-16 Thread Felix Kuehling
On 2021-06-16 2:12 p.m., Eric Huang wrote: Fix non-coherent bit of iolink properties flag which always is 0. Signed-off-by: Eric Huang --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_top

[PATCH] drm/amdkfd: Set iolink non-coherent in topology

2021-06-16 Thread Eric Huang
Fix non-coherent bit of iolink properties flag which always is 0. Signed-off-by: Eric Huang --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topol

[PATCH][next] drm/amd/display: Fix fall-through warning for Clang

2021-06-16 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix the following warning by replacing a /* fall through */ comment with the new pseudo-keyword macro fallthrough: rivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:672:4: warning: unannotated fall-through between switch labels [-Wimp

Re: [PATCH 4/7] dma-buf: add dma_fence_chain_garbage_collect

2021-06-16 Thread kernel test robot
Hi "Christian, I love your patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.13-rc6 next-20210616] [cannot apply to drm-tip/drm-tip drm/drm-next] [If

[PATCH] drm/amd/display: Increase stutter watermark for dcn302 and dcn303

2021-06-16 Thread Aurabindo Pillai
[Why] Current watermarks end up programming lowers watermarks which results in screen flickering and underflow for certain modes like 1440p. [How] Add 11us to stutter exit & stutter enter plus exit watermark. Signed-off-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resou

Re: [PATCH] drm/amd/display: Increase stutter watermark for dcn302 and dcn303

2021-06-16 Thread Rodrigo Siqueira
On 06/16, Aurabindo Pillai wrote: > [Why] > Current watermarks end up programming lowers watermarks which > results in screen flickering and underflow for certain modes like 1440p. > > [How] > Add 11us to stutter exit & stutter enter plus exit watermark. > > Signed-off-by: Aurabindo Pillai > ---

Re: [PATCH 4/7] dma-buf: add dma_fence_chain_garbage_collect

2021-06-16 Thread kernel test robot
Hi "Christian, I love your patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.13-rc6 next-20210616] [cannot apply to drm-tip/drm-tip drm/drm-next] [If

Re: [PATCH] Revert "drm/amd/display: Fix overlay validation by considering cursors"

2021-06-16 Thread Sean Paul
On Wed, Jun 16, 2021 at 12:21 PM Rodrigo Siqueira wrote: > > This reverts commit 04cc17a951f73f9a9092ca572b063e6292aeb085. > > The patch that we are reverting here was originally applied because it > fixes multiple IGT issues and flickering in Android. However, after a > discussion with Sean Paul

RE: [PATCH Review 1/1] drm/amdgpu: force enable vega20 gaming sku gfx ras

2021-06-16 Thread Zhang, Hawking
[AMD Official Use Only] Reviewed-by: Hawking Zhang Let's just say add vega20 to ras quirk list. Regards, Hawking -Original Message- From: Stanley.Yang Sent: Wednesday, June 16, 2021 20:31 To: amd-gfx@lists.freedesktop.org; Zhang, Hawking Cc: Yang, Stanley Subject: [PATCH Review 1/1]

[PATCH Review 1/1] drm/amdgpu: force enable vega20 gaming sku gfx ras

2021-06-16 Thread Stanley . Yang
Signed-off-by: Stanley.Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index f404c2321a6a..ca5a32944242 100644 --- a/drivers/gpu/drm/amd/amdgp

[PATCH] Revert "drm/amd/display: Fix overlay validation by considering cursors"

2021-06-16 Thread Rodrigo Siqueira
This reverts commit 04cc17a951f73f9a9092ca572b063e6292aeb085. The patch that we are reverting here was originally applied because it fixes multiple IGT issues and flickering in Android. However, after a discussion with Sean Paul and Mark, it looks like that this patch might cause problems on Chrom

Re: [PATCH] drm/amd/display: Add Freesync video documentation

2021-06-16 Thread Aurabindo Pillai
Hi Siqueira, Please see inline comments. On 2021-06-10 8:48 a.m., Rodrigo Siqueira wrote: Recently, we added support for an experimental feature named Freesync video; for more details on that, refer to: commit a372f4abecb1 ("drm/amd/display: Skip modeset for front porch change") commit 952bc47

[PATCH] drm/display: Fix duplicated argument

2021-06-16 Thread Wan Jiabing
Fix coccicheck warning: ./drivers/gpu/drm/amd/display/dc/dml/dcn31/display_rq_dlg_calc_31.c: 55:12-42: duplicated argument to && or || Signed-off-by: Wan Jiabing --- .../gpu/drm/amd/display/dc/dml/dcn31/display_rq_dlg_calc_31.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: New uAPI for color management proposal and feedback request

2021-06-16 Thread Maxime Ripard
Hi Pekka, On Mon, Jun 07, 2021 at 11:06:32AM +0300, Pekka Paalanen wrote: > On Mon, 7 Jun 2021 09:48:05 +0200 > Maxime Ripard wrote: > > > I've started to implement this for the raspberrypi some time ago. > > > > https://github.com/raspberrypi/linux/pull/4201 > > > > It's basically two propert

[PATCH 1/2] drm/amdgpu: add gfx rlc enter/exit safe mode through emit ring

2021-06-16 Thread Changfeng
From: changzhu From: Changfeng Change-Id: Ib6065f39d61872ac0497afd11789d98e56434b40 Signed-off-by: Changfeng --- drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c | 34 + drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h | 4 +++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 26 +

RE: [PATCH Review 1/1] drm/amdgpu: fix bad address translation for sienna_cichlid

2021-06-16 Thread Zhang, Hawking
[AMD Official Use Only] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Stanley.Yang Sent: Wednesday, June 16, 2021 21:23 To: amd-gfx@lists.freedesktop.org; Zhang, Hawking Cc: Yang, Stanley Subject: [PATCH Review 1/1] drm/amdgpu: fix bad address translation for

[PATCH Review 1/1] drm/amdgpu: fix bad address translation for sienna_cichlid

2021-06-16 Thread Stanley . Yang
Signed-off-by: Stanley.Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 5 + drivers/gpu/drm/amd/amdgpu/umc_v8_7.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h index bbcccf53080d..e

[PATCH 2/2] drm/amdkfd: Walk thorugh list with dqm lock hold

2021-06-16 Thread xinhui pan
To avoid any list corruption. Signed-off-by: xinhui pan --- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c| 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_m

Re: [PATCH 1/2] drm/amdgpu: add gfx rlc enter/exit safe mode through emit ring

2021-06-16 Thread Christian König
This needs a commit message and a bit of justification. Christian. Am 16.06.21 um 12:14 schrieb Changfeng: From: changzhu From: Changfeng Change-Id: Ib6065f39d61872ac0497afd11789d98e56434b40 Signed-off-by: Changfeng --- drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c | 34 +++

[PATCH] drm/amdgpu: Call drm_framebuffer_init last for framebuffer init

2021-06-16 Thread Michel Dänzer
From: Michel Dänzer Once drm_framebuffer_init has returned 0, the framebuffer is hooked up to the reference counting machinery and can no longer be destroyed with a simple kfree. Therefore, it must be called last. Fixes: f258907fdd835e "drm/amdgpu: Verify bo size can fit framebuffer size on ini

Re: [PATCH] amdgpu/pm: replaced snprintf usage in amdgpu_pm.c with sysfs_emit

2021-06-16 Thread Wang, Kevin(Yang)
[AMD Official Use Only] Reviewed-by: Kevin Wang Best Regards, Kevin From: amd-gfx on behalf of Darren Powell Sent: Wednesday, June 16, 2021 12:31 PM To: amd-gfx@lists.freedesktop.org Cc: Powell, Darren Subject: [PATCH] amdgpu/pm: replaced snprintf usage in

Re: [PATCH] drm/amdkfd: Fix circular lock in nocpsch path

2021-06-16 Thread Pan, Xinhui
> 2021年6月16日 12:36,Kuehling, Felix 写道: > > Am 2021-06-16 um 12:01 a.m. schrieb Pan, Xinhui: >>> 2021年6月16日 02:22,Kuehling, Felix 写道: >>> >>> [+Xinhui] >>> >>> >>> Am 2021-06-15 um 1:50 p.m. schrieb Amber Lin: Calling free_mqd inside of destroy_queue_nocpsch_locked can cause a circ

RE: [PATCH v2] drm/amd/amdgpu: Use IP discovery data to determine VCN enablement instead of MMSCH

2021-06-16 Thread Zhou, Peng Ju
[AMD Official Use Only] Hi Alex Update inline > -Original Message- > From: Alex Deucher > Sent: Wednesday, June 16, 2021 3:29 AM > To: Zhou, Peng Ju > Cc: amd-gfx list ; Zhang, Bokun > > Subject: Re: [PATCH v2] drm/amd/amdgpu: Use IP discovery data to determine > VCN enablement instea

Re: [PATCH] drm/amdgpu: Set TTM_PAGE_FLAG_SG earlier for userprt BOs

2021-06-16 Thread Christian König
Am 16.06.21 um 10:36 schrieb xinhui pan: Because TTM do page counting on userptr BOs which is actually not needed. To avoid that, lets set TTM_PAGE_FLAG_SG after tt_create and before tt_populate. Signed-off-by: xinhui pan Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu

Re: [PATCH] drm/amdkfd: Fix circular lock in nocpsch path

2021-06-16 Thread Felix Kuehling
Am 2021-06-16 um 12:01 a.m. schrieb Pan, Xinhui: >> 2021年6月16日 02:22,Kuehling, Felix 写道: >> >> [+Xinhui] >> >> >> Am 2021-06-15 um 1:50 p.m. schrieb Amber Lin: >>> Calling free_mqd inside of destroy_queue_nocpsch_locked can cause a >>> circular lock. destroy_queue_nocpsch_locked is called under a

[PATCH] drm/amdgpu: Set TTM_PAGE_FLAG_SG earlier for userprt BOs

2021-06-16 Thread xinhui pan
Because TTM do page counting on userptr BOs which is actually not needed. To avoid that, lets set TTM_PAGE_FLAG_SG after tt_create and before tt_populate. Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 1/2] drm/amdkfd: Fix some double free when destroy queue fails

2021-06-16 Thread xinhui pan
Some resource are freed even destroy queue fails. That will cause double free when user-space issue another destroy_queue ioctl. Paste some log below. amdgpu: Can't create new usermode queue because -1 queues were already created refcount_t: underflow; use-after-free. Call Trace: kobject_put+0x

[PATCH] amdgpu/pm: replaced snprintf usage in amdgpu_pm.c with sysfs_emit

2021-06-16 Thread Darren Powell
replaced snprintf usage in amdgpu_pm.c with sysfs_emit fixed warning on comparing int with uint32_t in amdgpu_get_pp_num_states() == Test == AMDGPU_PCI_ADDR=`lspci -nn | grep "VGA\|Display" | cut -d " " -f 1` AMDGPU_HWMON=`ls -la /sys/class/hwmon | grep $AMDGPU_PCI_ADDR | cut -d " " -f 10` HWMO

Re: [PATCH] drm/amdkfd: Fix circular lock in nocpsch path

2021-06-16 Thread Pan, Xinhui
> 2021年6月16日 02:22,Kuehling, Felix 写道: > > [+Xinhui] > > > Am 2021-06-15 um 1:50 p.m. schrieb Amber Lin: >> Calling free_mqd inside of destroy_queue_nocpsch_locked can cause a >> circular lock. destroy_queue_nocpsch_locked is called under a DQM lock, >> which is taken in MMU notifiers, potent