Re: [PATCH 1/1] drm/amdkfd: Improve concurrency of event handling

2022-03-02 Thread Christian König
Am 02.03.22 um 21:06 schrieb Felix Kuehling: Use rcu_read_lock to read p->event_idr concurrently with other readers and writers. Use p->event_mutex only for creating and destroying events and in kfd_wait_on_events. That might not necessary work as you expected. rcu_read_lock() does not

Re: [PATCH -next] drm/amdgpu: clean up some inconsistent indenting

2022-03-02 Thread Christian König
Am 03.03.22 um 02:52 schrieb Yang Li: Eliminate the follow smatch warning: drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:413 amdgpu_get_xgmi_hive() warn: inconsistent indenting Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Christian König ---

RE: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread David Laight
From: Xiaomeng Tong > Sent: 03 March 2022 02:27 > > On Wed, 2 Mar 2022 14:04:06 +, David Laight > wrote: > > I think that it would be better to make any alternate loop macro > > just set the variable to NULL on the loop exit. > > That is easier to code for and the compiler might be persuaded

[pull] amdgpu drm-fixes-5.17

2022-03-02 Thread Alex Deucher
Hi Dave, Daniel, Just one small fix for 5.17. The following changes since commit e7c470a4b543375d50d88a4c5abd4b9e0f5adcea: Merge tag 'exynos-drm-fixes-v5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes (2022-02-28 14:05:44 +1000) are available in

RE: [PATCH] drm/amdgpu: Add DFC CAP support for aldebaran

2022-03-02 Thread Liu, Shaoyun
[AMD Official Use Only] Can you added more information in the description ? Like why we should not load ta for Aldebaran here. Regards Shaoyun.liu -Original Message- From: amd-gfx On Behalf Of David Yu Sent: Wednesday, March 2, 2022 10:20 PM To: amd-gfx@lists.freedesktop.org Cc:

[PATCH] drm/amdgpu: Disable baco dummy mode

2022-03-02 Thread Lijo Lazar
On aldebaran, BACO dummy mode may be enabled during reset. Disable it during resume. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c

RE: [PATCH] drm/amdgpu: Refactor mode2 reset logic for v13.0.2

2022-03-02 Thread Ma, Le
Reviewed-by: Le Ma > -Original Message- > From: amd-gfx On Behalf Of Lazar, > Lijo > Sent: Thursday, March 3, 2022 11:33 AM > To: Lazar, Lijo ; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Zhang, Hawking > > Subject: RE: [PATCH] drm/amdgpu: Refactor mode2 reset logic for

RE: [PATCH] drm/amdgpu: Refactor mode2 reset logic for v13.0.2

2022-03-02 Thread Lazar, Lijo
[Public] Thanks, Lijo -Original Message- From: amd-gfx On Behalf Of Lijo Lazar Sent: Monday, February 28, 2022 3:27 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Zhang, Hawking Subject: [PATCH] drm/amdgpu: Refactor mode2 reset logic for v13.0.2 Use IP version and

回复: [PATCH Review 1/1] drm/amdgpu: support send bad channel info to smu

2022-03-02 Thread Yang, Stanley
> -邮件原件- > 发件人: Zhou1, Tao > 发送时间: Wednesday, March 2, 2022 3:45 PM > 收件人: Yang, Stanley ; amd- > g...@lists.freedesktop.org; Zhang, Hawking ; > Joo, Maria > 抄送: Yang, Stanley > 主题: RE: [PATCH Review 1/1] drm/amdgpu: support send bad channel info > to smu > > [AMD Official Use Only]

[PATCH] drm/amdgpu: Add DFC CAP support for aldebaran

2022-03-02 Thread David Yu
Add DFC CAP support for aldebaran Signed-off-by: David Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

Re: [RFC v4 02/11] drm/amdgpu: Move scheduler init to after XGMI is ready

2022-03-02 Thread Andrey Grodzovsky
OK, i will do quick smoke test tomorrow and push all of it it then. Andrey On 2022-03-02 21:59, Chen, JingWen wrote: Hi Andrey, I don't have the bare mental environment, I can only test the SRIOV cases. Best Regards, JingWen Chen On Mar 3, 2022, at 01:55, Grodzovsky, Andrey wrote: The

Re: [RFC v4 02/11] drm/amdgpu: Move scheduler init to after XGMI is ready

2022-03-02 Thread Chen, JingWen
Hi Andrey, I don't have the bare mental environment, I can only test the SRIOV cases. Best Regards, JingWen Chen > On Mar 3, 2022, at 01:55, Grodzovsky, Andrey > wrote: > > The patch is acked-by: Andrey Grodzovsky > > If you also smoked tested bare metal feel free to apply all the

[PATCH] drm/amdgpu: Add DFC CAP support for mi200

2022-03-02 Thread David Yu
Add DFC CAP support for mi200 Signed-off-by: David Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

[PATCH -next] drm/amdgpu: clean up some inconsistent indenting

2022-03-02 Thread Yang Li
Eliminate the follow smatch warning: drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:413 amdgpu_get_xgmi_hive() warn: inconsistent indenting Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 16 1 file changed, 8 insertions(+), 8

RE: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread Xiaomeng Tong
On Wed, 2 Mar 2022 14:04:06 +, David Laight wrote: > I think that it would be better to make any alternate loop macro > just set the variable to NULL on the loop exit. > That is easier to code for and the compiler might be persuaded to > not redo the test. No, that would lead to a NULL

Re: [PATCH] Revert "i2c: core: support bus regulator controlling in adapter"

2022-03-02 Thread Alex Deucher
On Fri, Feb 11, 2022 at 12:51 PM Wolfram Sang wrote: > > On Fri, Feb 04, 2022 at 07:22:44PM +, Tareque Md.Hanif wrote: > > The issue still exists. It takes very long time to suspend (10-12s). > > `DRI_PRIME=1 glxgears` is a black window. > > > > journalctl attached > > Looking forward to

RE: [PATCH 1/1] drm/amdkfd: Improve concurrency of event handling

2022-03-02 Thread Keely, Sean
[AMD Official Use Only] LGTM. Reviewed-by: Sean Keely -Original Message- From: Kuehling, Felix Sent: Wednesday, March 02, 2022 2:06 PM To: amd-gfx@lists.freedesktop.org Cc: Keely, Sean Subject: [PATCH 1/1] drm/amdkfd: Improve concurrency of event handling Use rcu_read_lock to read

Re: [PATCH] drm/amdgpu: Set correct DMA mask for aldebaran

2022-03-02 Thread Felix Kuehling
On 2022-02-28 13:25, Harish Kasiviswanathan wrote: Aldebaran has 48-bit physical address support Signed-off-by: Harish Kasiviswanathan --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

[PATCH 2/2] drm/amdgpu/vcn: Add vcn firmware log

2022-03-02 Thread Ruijing Dong
vcn fwlog is for debugging purpose only, by default, it is disabled. Signed-off-by: Ruijing Dong --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 10 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 ++

[PATCH 1/2] drm/amdgpu/vcn: Update fw shared data structure

2022-03-02 Thread Ruijing Dong
Add fw log in fw shared data structure. Signed-off-by: Ruijing Dong --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 14 - drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 26 +++-- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 18 -

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread Kees Cook
On Wed, Mar 02, 2022 at 12:18:45PM -0800, Linus Torvalds wrote: > On Wed, Mar 2, 2022 at 12:07 PM Kees Cook wrote: > > > > I've long wanted to change kfree() to explicitly set pointers to NULL on > > free. https://github.com/KSPP/linux/issues/87 > > We've had this discussion with the gcc people

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread Kees Cook
On Wed, Mar 02, 2022 at 10:29:31AM +0100, Rasmus Villemoes wrote: > This won't help the current issue (because it doesn't exist and might > never), but just in case some compiler people are listening, I'd like to > have some sort of way to tell the compiler "treat this variable as > uninitialized

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread Linus Torvalds
On Wed, Mar 2, 2022 at 12:07 PM Kees Cook wrote: > > I've long wanted to change kfree() to explicitly set pointers to NULL on > free. https://github.com/KSPP/linux/issues/87 We've had this discussion with the gcc people in the past, and gcc actually has some support for it, but it's sadly tied

[PATCH 1/1] drm/amdgpu: set noretry=1 for GFX 10.3.4

2022-03-02 Thread Felix Kuehling
Retry faults are not supported on GFX 10.3.4. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c index 7c2a9555b7cc..622eeda9ea45 100644

[PATCH 1/1] drm/amdkfd: Improve concurrency of event handling

2022-03-02 Thread Felix Kuehling
Use rcu_read_lock to read p->event_idr concurrently with other readers and writers. Use p->event_mutex only for creating and destroying events and in kfd_wait_on_events. Protect the contents of the kfd_event structure with a per-event spinlock that can be taken inside the rcu_read_lock critical

Re: [PATCH v2] drm/amdgpu: remove redundant null check

2022-03-02 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Mar 2, 2022 at 11:54 AM Christian König wrote: > > Am 02.03.22 um 17:17 schrieb Weiguo Li: > > Remove the redundant null check since the caller ensures > > that 'ctx' is never NULL. > > > > Signed-off-by: Weiguo Li > > Reviewed-by: Christian König > > > --- > >

Re: [RFC v4 02/11] drm/amdgpu: Move scheduler init to after XGMI is ready

2022-03-02 Thread Andrey Grodzovsky
The patch is acked-by: Andrey Grodzovsky If you also smoked tested bare metal feel free to apply all the patches, if no let me know. Andrey On 2022-03-02 04:51, JingWen Chen wrote: Hi Andrey, Most part of the patches are OK, but the code will introduce a ib test fail on the disabled vcn

Re: [PATCH 1/2] drm/amdgpu: Fix sigsev when accessing MMIO on hot unplug.

2022-03-02 Thread Andrey Grodzovsky
Thanks, already did. Code pushed both here and in libdrm. Andrey On 2022-03-02 03:37, Christian König wrote: Am 01.03.22 um 19:07 schrieb Andrey Grodzovsky: Protect with drm_dev_enter/exit Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König for this one here. Regarding the

Re: [Intel-gfx] [PATCH 6/6] treewide: remove check of list iterator against head past the loop body

2022-03-02 Thread Tvrtko Ursulin
On 28/02/2022 11:08, Jakob Koschel wrote: When list_for_each_entry() completes the iteration over the whole list without breaking the loop, the iterator value will be a bogus pointer computed based on the head element. While it is safe to use the pointer to determine if it was computed based

Re: [RFC 0/2] Add generic FPU api similar to x86

2022-03-02 Thread Christophe Leroy
Le 19/07/2021 à 21:52, Anson Jacob a écrit : This is an attempt to have generic FPU enable/disable calls similar to x86. So that we can simplify gpu/drm/amd/display/dc/os_types.h Seems like gpu/drm/amd/display/dc/os_types.h has been simplified through another way via commit 96ee63730fa3

RE: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread David Laight
From: Xiaomeng Tong > Sent: 02 March 2022 09:31 > > On Mon, 28 Feb 2022 16:41:04 -0800, Linus Torvalds > wrote: > > > > But basically to _me_, the important part is that the end result is > > maintainable longer-term. > > I couldn't agree more. And because of that, I stick with the following >

Re: [PATCH v2] drm/amdgpu: remove redundant null check

2022-03-02 Thread Christian König
Am 02.03.22 um 17:17 schrieb Weiguo Li: Remove the redundant null check since the caller ensures that 'ctx' is never NULL. Signed-off-by: Weiguo Li Reviewed-by: Christian König --- v2: * take Christian and Alex's suggestion --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 6 -- 1 file

[PATCH v2] drm/amdgpu: remove redundant null check

2022-03-02 Thread Weiguo Li
Remove the redundant null check since the caller ensures that 'ctx' is never NULL. Signed-off-by: Weiguo Li --- v2: * take Christian and Alex's suggestion --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c

Re: [PATCH] drm/amdgpu: fix potential null dereference

2022-03-02 Thread Alex Deucher
On Wed, Mar 2, 2022 at 10:01 AM Christian König wrote: > > Looks like my response never made it through. > > This change and the existing check is nonsense. The caller makes sure > that ctx is never NULL here. > > So the check should probably just be dropped entirely. agreed and dropped. Weiguo

Re: [PATCH] drm/amdgpu: fix potential null dereference

2022-03-02 Thread Christian König
Looks like my response never made it through. This change and the existing check is nonsense. The caller makes sure that ctx is never NULL here. So the check should probably just be dropped entirely. Regards, Christian. Am 02.03.22 um 15:21 schrieb Alex Deucher: Applied. Thanks! Alex On

Re: [PATCH] drm/amdgpu: fix potential null dereference

2022-03-02 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Mar 2, 2022 at 3:56 AM Weiguo Li wrote: > > "ctx" is dereferenced but null checked later. Swap their positions > to avoid potential null dereference. > > Found using a Coccinelle script: > https://coccinelle.gitlabpages.inria.fr/website/rules/mini_null_ref.cocci >

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread Rasmus Villemoes
On 02/03/2022 00.55, Linus Torvalds wrote: > On Tue, Mar 1, 2022 at 3:19 PM David Laight wrote: >> > With the "don't use iterator outside the loop" approach, the exact > same code works in both the old world order and the new world order, > and you don't have the semantic confusion. And *if* you

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread Xiaomeng Tong
On Mon, 28 Feb 2022 16:41:04 -0800, Linus Torvalds wrote: > > But basically to _me_, the important part is that the end result is > maintainable longer-term. I couldn't agree more. And because of that, I stick with the following approach because it's maintainable longer-term than "type(pos) pos"

Re: [RFC v4 02/11] drm/amdgpu: Move scheduler init to after XGMI is ready

2022-03-02 Thread JingWen Chen
Hi Andrey, Most part of the patches are OK, but the code will introduce a ib test fail on the disabled vcn of sienna_cichlid. In SRIOV use case we will disable one vcn on sienna_cichlid, I have attached a patch to fix this issue, please check the attachment. Best Regards, Jingwen Chen On

RE: [PATCH] drm/amd/pm: new v3 SmuMetrics data structure for Sienna Cichlid

2022-03-02 Thread Quan, Evan
[AMD Official Use Only] Reviewed-by: Evan Quan > -Original Message- > From: Quan, Evan > Sent: Tuesday, February 22, 2022 10:31 AM > To: Danijel Slivka ; amd-gfx@lists.freedesktop.org > Cc: Slivka, Danijel > Subject: RE: [PATCH] drm/amd/pm: new v3 SmuMetrics data structure for > Sienna

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread Linus Torvalds
On Tue, Mar 1, 2022 at 3:19 PM David Laight wrote: > > Having said that there are so few users of list_entry_is_head() > it is reasonable to generate two new names. Well, the problem is that the users of list_entry_is_head() may be few - but there are a number of _other_ ways to check "was that

RE: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread David Laight
From: Linus Torvalds > Sent: 01 March 2022 19:07 > On Mon, Feb 28, 2022 at 2:29 PM James Bottomley > wrote: > > > > However, if the desire is really to poison the loop variable then we > > can do > > > > #define list_for_each_entry(pos, head, member) \ > > for

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread Linus Torvalds
On Tue, Mar 1, 2022 at 2:58 PM David Laight wrote: > > Can it be resolved by making: > #define list_entry_is_head(pos, head, member) ((pos) == NULL) > and double-checking that it isn't used anywhere else (except in > the list macros themselves). Well, yes, except for the fact that then the name

[PATCH] drm/amdgpu: fix potential null dereference

2022-03-02 Thread Weiguo Li
"ctx" is dereferenced but null checked later. Swap their positions to avoid potential null dereference. Found using a Coccinelle script: https://coccinelle.gitlabpages.inria.fr/website/rules/mini_null_ref.cocci Signed-off-by: Weiguo Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 6 -- 1

RE: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread David Laight
From: Linus Torvalds > Sent: 01 March 2022 23:03 > > On Tue, Mar 1, 2022 at 2:58 PM David Laight wrote: > > > > Can it be resolved by making: > > #define list_entry_is_head(pos, head, member) ((pos) == NULL) > > and double-checking that it isn't used anywhere else (except in > > the list macros

Re: [PATCH v2 1/3] drm/amdgpu: move amdgpu_gmc_noretry_set after ip_versions populated

2022-03-02 Thread Huang Rui
On Tue, Mar 01, 2022 at 11:01:19PM +0800, Zhang, Yifan wrote: > otherwise adev->ip_versions is still empty when amdgpu_gmc_noretry_set > is called. > > Signed-off-by: Yifan Zhang Series are Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- > 1 file changed, 1

Re: [PATCH 1/2] drm/amdgpu: Fix sigsev when accessing MMIO on hot unplug.

2022-03-02 Thread Christian König
Am 01.03.22 um 19:07 schrieb Andrey Grodzovsky: Protect with drm_dev_enter/exit Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König for this one here. Regarding the version bumb you should probably sync up with Alex. --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 10 --

Re: [PATCH 1/3] drm/amdgpu: remove unused gpu_info firmwares

2022-03-02 Thread Christian König
Am 01.03.22 um 17:01 schrieb Alex Deucher: These were leftover from bring up and are no longer necessary. The information is available via the IP discovery table. Signed-off-by: Alex Deucher Acked-by: Christian König for the whole series. --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c