Re: [PATCH] drm/amdgpu/fence: use the no_scheduler flag

2020-06-03 Thread Christian König
Am 02.06.20 um 20:53 schrieb Alex Deucher: Rather than checking the ring type manually. We already set this for MES and KIQ (and a few other special cases). Signed-off-by: Alex Deucher Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 8 1 file chang

Re: [PATCH] Revert "drm/[radeon|amdgpu]: Replace one-element array and use struct_size() helper"

2020-06-03 Thread Christian König
Am 02.06.20 um 21:10 schrieb Alex Deucher: This reverts commit 4dea25853a6c0c16e373665153bd9eb6edc6319e. This changes structs used by the hardware and breaks dpm on some cards. Signed-off-by: Alex Deucher We should also CC the original author of that patch. It is perfectly possible that soo

Re: [PATCH] sound/pci/hda: add sienna_cichlid audio asic id for sienna_cichlid up

2020-06-03 Thread Takashi Iwai
On Wed, 03 Jun 2020 03:31:37 +0200, Alex Deucher wrote: > > From: Hersen Wu > > dp/hdmi ati hda is not shown in audio settings > > Signed-off-by: Hersen Wu > Reviewed-by: Alex Deucher > Signed-off-by: Alex Deucher Applied now with a slight rearrangement with the sorted order and Cc to stabl

Re: [PATCH] drm/amd/powerplay: use work queue to perform throttling logging

2020-06-03 Thread Nirmoy
LGTM Acked-by: Nirmoy Das On 6/3/20 7:03 AM, Evan Quan wrote: As IO operations(access to SMU internals) and possible sleep are involved in throttling logging. Workqueue can handle them well. Otherwise we may hit "scheduling while atomic" error. Change-Id: I454d593e965e54b13fdf04c112abb0a02220

[PATCH v2 00/15] Forward MSI-X vector enable error code in pci_alloc_irq_vectors_affinity()

2020-06-03 Thread Piotr Stankiewicz
The primary objective of this patch series is to change the behaviour of pci_alloc_irq_vectors_affinity() such that it forwards the MSI-X enable error code when appropriate. In the process, though, it was pointed out that there are multiple places in the kernel which check/ask for message signalled

[PATCH v2 02/15] PCI: Add shorthand define for message signalled interrupt types

2020-06-03 Thread Piotr Stankiewicz
There are several places in the kernel which check/ask for MSI or MSI-X interrupts. It would make sense to have a shorthand constant, similar to PCI_IRQ_ALL_TYPES, to use in these situations. So add PCI_IRQ_MSI_TYPES, for this purpose. Signed-off-by: Piotr Stankiewicz Suggested-by: Andy Shevchenk

[PATCH v2 07/15] drm/amdgpu: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-03 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 9 ++--- 1 file changed, 2 insertions(+),

[PATCH] drm/amd/display: Only actually breakpoint if DEBUG_KERNEL_DC is enabled

2020-06-03 Thread Nicholas Kazlauskas
To match previous behavior and to not hang the kernel if someone accidentally builds with KGDB enabled. Fixes: 4324a1752045 ("drm/amd/display: Make BREAK_TO_DEBUGGER() a debug print") Cc: Harry Wentland Cc: Alex Deucher Signed-off-by: Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/dc/os_

Re: [PATCH] drm/amd/display: Only actually breakpoint if DEBUG_KERNEL_DC is enabled

2020-06-03 Thread Harry Wentland
On 2020-06-03 9:32 a.m., Nicholas Kazlauskas wrote: > To match previous behavior and to not hang the kernel if someone > accidentally builds with KGDB enabled. > > Fixes: 4324a1752045 ("drm/amd/display: Make BREAK_TO_DEBUGGER() a debug > print") > > Cc: Harry Wentland > Cc: Alex Deucher > Sign

Re: [PATCH v2 07/15] drm/amdgpu: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-03 Thread Alex Deucher
On Wed, Jun 3, 2020 at 7:48 AM Piotr Stankiewicz wrote: > > Seeing as there is shorthand available to use when asking for any type > of interrupt, or any type of message signalled interrupt, leverage it. > > Signed-off-by: Piotr Stankiewicz > Reviewed-by: Andy Shevchenko > --- > drivers/gpu/drm

Re: [PATCH] drm/amd/powerplay: use work queue to perform throttling logging

2020-06-03 Thread Alex Deucher
On Wed, Jun 3, 2020 at 1:03 AM Evan Quan wrote: > > As IO operations(access to SMU internals) and possible sleep are > involved in throttling logging. Workqueue can handle them well. > Otherwise we may hit "scheduling while atomic" error. > > Change-Id: I454d593e965e54b13fdf04c112abb0a022204278 >

[PATCH] drm/amdgpu: support reserve bad page for virt

2020-06-03 Thread Stanley . Yang
Signed-off-by: Stanley.Yang Change-Id: Ia0ad9453ac3ac929f95c73cbee5b7a8fc42a9816 --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 164 + drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 30 +++- 3 files changed, 196 insertions(

Re: [PATCH] drm/amdgpu: temporarily read bounding box from gpu_info fw for navi12

2020-06-03 Thread Luben Tuikov
On 2020-06-02 10:07 p.m., Tianci Yin wrote: > From: "Tianci.Yin" > > The bounding box is still needed by Navi12, temporarily read it from gpu_info > firmware. Should be droped when DAL no longer needs it. > > Change-Id: Ifc330ec860f9b0665134a81df2fc80ca91c41a33 > Reviewed-by: Alex Deucher > Rev

RE: [PATCH] drm/amdgpu: support reserve bad page for virt

2020-06-03 Thread Zhang, Hawking
[AMD Public Use] Please check my comments inline. Regards, Hawking -Original Message- From: Stanley.Yang Sent: Wednesday, June 3, 2020 22:10 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Chen, Guchun ; Liu, Monk ; Clements, John ; Zhou1, Tao ; Li, Dennis ; Yang, Stanley Su

RE: [PATCH] drm/amd/display: Revalidate bandwidth before commiting DC updates

2020-06-03 Thread Wu, Hersen
[AMD Official Use Only - Internal Distribution Only] As workaround, the patch looks good. Reviewed-by: Hersen Wu -Original Message- From: Nicholas Kazlauskas Sent: Tuesday, June 2, 2020 8:54 PM To: amd-gfx@lists.freedesktop.org Cc: Kazlauskas, Nicholas ; Wu, Hersen ; Wentland, Harry ;

Re: [PATCH v2 02/15] PCI: Add shorthand define for message signalled interrupt types

2020-06-03 Thread Logan Gunthorpe
On 2020-06-03 5:45 a.m., Piotr Stankiewicz wrote: > There are several places in the kernel which check/ask for MSI or MSI-X > interrupts. It would make sense to have a shorthand constant, similar to > PCI_IRQ_ALL_TYPES, to use in these situations. So add PCI_IRQ_MSI_TYPES, > for this purpose. >

[PATCH] drm/amdgpu/display: fix build without CONFIG_DRM_AMD_DC_DCN3_0

2020-06-03 Thread Alex Deucher
Need to guard some new DCN3.0 stuff. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c in

Re: [PATCH] drm/amdgpu/display: fix build without CONFIG_DRM_AMD_DC_DCN3_0

2020-06-03 Thread Kazlauskas, Nicholas
On 2020-06-03 2:00 p.m., Alex Deucher wrote: Need to guard some new DCN3.0 stuff. Signed-off-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Thanks! Nicholas Kazlauskas --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) d

RE: [PATCH] drm/amdgpu: support reserve bad page for virt

2020-06-03 Thread Chen, Guchun
[AMD Public Use] Except Hawking's comments, we shall not change file mode in the patch as well. mode change 100644 => 100755 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c mode change 100644 => 100755 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h Regards, Guchun -Original Message- From: Zhang, Haw

Re: [PATCH v2 02/15] PCI: Add shorthand define for message signalled interrupt types

2020-06-03 Thread Luben Tuikov
That's a sensible change. In your title you can use "macro" or "definition" or "macro definition". "Define" is a verb. "PCI: Add a macro for message-signalled interrupt types" On 2020-06-03 7:45 a.m., Piotr Stankiewicz wrote: > There are several places in the kernel which check/ask for MSI or MSI

RE: [PATCH] drm/amdgpu: support reserve bad page for virt

2020-06-03 Thread Yang, Stanley
[AMD Public Use] Hi Hawking, Thanks for your review, please see my replies inline. Regards, Stanley > -Original Message- > From: Zhang, Hawking > Sent: Wednesday, June 3, 2020 11:26 PM > To: Yang, Stanley ; amd-gfx@lists.freedesktop.org > Cc: Chen, Guchun ; Liu, Monk > ; Clements, John

RE: [PATCH] drm/amdgpu: support reserve bad page for virt

2020-06-03 Thread Yang, Stanley
[AMD Public Use] Hi GuChun, Thanks for reminding. Regards, Stanley > -Original Message- > From: Chen, Guchun > Sent: Thursday, June 4, 2020 9:32 AM > To: Zhang, Hawking ; Yang, Stanley > ; amd-gfx@lists.freedesktop.org > Cc: Liu, Monk ; Clements, John > ; Zhou1, Tao ; Li, Dennis > ; Yan

RE: [PATCH] drm/amdgpu: support reserve bad page for virt

2020-06-03 Thread Zhou1, Tao
[AMD Public Use] Two comments inline > -Original Message- > From: Stanley.Yang > Sent: 2020年6月3日 22:10 > To: amd-gfx@lists.freedesktop.org > Cc: Zhang, Hawking ; Chen, Guchun > ; Liu, Monk ; Clements, > John ; Zhou1, Tao ; Li, > Dennis ; Yang, Stanley > Subject: [PATCH] drm/amdgpu: supp

[PATCH 02/16] drm/amd/powerplay: drop unused APIs and unnecessary checks

2020-06-03 Thread Evan Quan
Minor code cleanups. Change-Id: I6d240241e78cae17288c1d49dbae6ab1796b1128 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c| 74 --- .../gpu/drm/amd/powerplay/inc/amdgpu_smu.h| 2 - 2 files changed, 16 insertions(+), 60 deletions(-) diff --git a/dr

[PATCH 06/16] drm/amd/powerplay: clean up the APIs for pptable setup

2020-06-03 Thread Evan Quan
Combine and simplify the logics for setup pptable. Change-Id: I062f15eab586050593afd960432c4c70fbdd5d41 Signed-off-by: Evan Quan Acked-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c| 17 drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 66 - .../gpu/drm/amd/

[PATCH 07/16] drm/amd/powerplay: clean up the overdrive settings

2020-06-03 Thread Evan Quan
Eliminate the buffer allocation and drop the unnecessary overdrive table uploading. Change-Id: I8ba5383a330e6d5355cea219147500c1b4a43f47 Signed-off-by: Evan Quan Acked-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c| 2 +- .../gpu/drm/amd/powerplay/inc/amdgpu_smu.h| 2

[PATCH 13/16] drm/amd/powerplay: max code sharing between .hw_fini and .suspend

2020-06-03 Thread Evan Quan
Thus redundant code can be dropped. Change-Id: I672f84ed5856da53b7f8f915b2f24ca11cd4b228 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 44 +++--- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c

[PATCH 04/16] drm/amd/powerplay: centralize all buffer allocation in sw_init phase

2020-06-03 Thread Evan Quan
To fit common design. And this can simplify the buffer deallocation. Change-Id: Iee682e76aadb5f34861d69d5794ced44f0a78789 Signed-off-by: Evan Quan Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 342 ++--- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 1

[PATCH 10/16] drm/amd/powerplay: max code sharing between .hw_init and .resume

2020-06-03 Thread Evan Quan
Then redundant code can be dropped. Change-Id: Icbafbb7ffc8189a09f4236786aea6702ee73f9f4 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 42 ++ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c

[PATCH 12/16] drm/amd/powerplay: better namings

2020-06-03 Thread Evan Quan
And some minor changes as dropping unused parameter and label internal used API as static. Change-Id: I0af0aea029dc4fc7d8e150ab6ec984e9a5f1a74a Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 12 +--- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 2 -- 2

[PATCH 05/16] drm/amd/powerplay: clean up the APIs for bootup clocks

2020-06-03 Thread Evan Quan
Combine and simplify the logics for retrieving bootup clocks. Change-Id: Ifca28c454f3769dece0cc705ba054ff34db0ab60 Signed-off-by: Evan Quan Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c| 4 - drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 1 - .../gpu/drm/amd

[PATCH 14/16] drm/amd/powerplay: allocate the struct amdgpu_irq_src on the stack

2020-06-03 Thread Evan Quan
Since it is only several bytes in size. Change-Id: Ie9df0db543fdd4cf5b963a286ef40dee03c436bf Signed-off-by: Evan Quan Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 3 --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 2 +- drivers/gpu/drm/amd/powerplay/smu_

[PATCH 11/16] drm/amd/powerplay: resort those operations performed in hw setup

2020-06-03 Thread Evan Quan
Those common operations(for all ASICs) are placed first and followed by ASIC specific ones. While the display related are placed at the last. Change-Id: Id45caee98273c8c0b9c1c9f2713fcf8106e02000 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 61 +++---

[PATCH 01/16] drm/amd/powerplay: eliminate asic type check

2020-06-03 Thread Evan Quan
By moving ASIC specific code into its own file. Change-Id: Ib6775c1c8c5211ea45db6c3fb604a8279411ab37 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c| 59 +++ drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 8 +-- drivers/gpu/drm/amd/powerplay/navi10_p

[PATCH 03/16] drm/amd/powerplay: implement a common API for dpms disablement

2020-06-03 Thread Evan Quan
So that code can be shared between .hw_fini and .suspend. Change-Id: I4a0eeb7cdecbf5b24fac3d0fe1d8fcb1ca9f0b0a Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 178 + 1 file changed, 77 insertions(+), 101 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH 09/16] drm/amd/powerplay: move those operations not needed for resume out

2020-06-03 Thread Evan Quan
Since smu_smc_table_hw_init() is needed for both .hw_init and .resume. By doing this, we can drop unnecessary operations on resume. Change-Id: I2af6277efaa9adba2de69161e20e54c4aa10a411 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 40 +++--- 1 file cha

[PATCH 08/16] drm/amd/powerplay: postpone operations not must for hw setup to late_init

2020-06-03 Thread Evan Quan
So that we do not need to perform those unnecessary operations again on resume. Change-Id: I90f8a8d68762b5f88d7477934128a17bf67e3341 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 57 +++--- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git

[PATCH 16/16] drm/amd/powerplay: skip BACO feature on DPMs disablement

2020-06-03 Thread Evan Quan
Instead of disabling and reenabling it later. Change-Id: I90775202178f3b7695f42f39ce240bbfd51a1346 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 72 ++ 1 file changed, 31 insertions(+), 41 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/am

[PATCH 15/16] drm/amd/powerplay: add firmware cleanup on sw_fini

2020-06-03 Thread Evan Quan
To avoid possible memory leak. Change-Id: I4740eac7fc2c6e934ec8f503e5a98057f0902f4a Signed-off-by: Evan Quan Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 ++ drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 1 + drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h

RE: [PATCH 2/9] drm/amd/powerplay: some cosmetic fixes

2020-06-03 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only] I refreshed the patch set based on the latest code and just sent them out. And patch 8 and this one were splitted into several small patches. -Original Message- From: Alex Deucher Sent: Tuesday, June 2, 2020 10:55 PM To: Quan, Evan Cc

RE: [PATCH] drm/amdgpu: support reserve bad page for virt

2020-06-03 Thread Yang, Stanley
[AMD Public Use] Thanks tao, to call amdgpu_virt_init_err_handler_data In amdgpu_virt_add_bad_page once Is also a way, I will check whether has potential risk. And I'll make distinguish the message from the one in bare mental RAS when reserved page failed. Regards, Stanley > -Original Mes