[PATCH] drm/amdgpu: Fix memory leak in hpd_rx_irq_create_workqueue()

2022-09-12 Thread Rafael Mendonca
If construction of the array of work queues to handle hpd_rx_irq offload work fails, we need to unwind. Destroy all the created workqueues and the allocated memory for the hpd_rx_irq_offload_work_queue struct array. Fixes: 8e794421bc98 ("drm/amd/display: Fork thread to offload work of

Re:

2022-09-12 Thread Alex Deucher
On Mon, Sep 12, 2022 at 8:36 AM Christian König wrote: > > Hey Alex, > > I've decided to split this patch set into two because we still can't > figure out where the VCN regressions come from. > > Ruijing tested them and confirmed that they don't regress VCN. > > Can you and maybe Felix take a

Re: [PATCH 1/4] drm/amdgpu: Introduce gfx software ring(v3)

2022-09-12 Thread Andrey Grodzovsky
On 2022-09-12 21:44, Zhu, Jiadong wrote: [AMD Official Use Only - General] -Original Message- From: Grodzovsky, Andrey Sent: Tuesday, September 13, 2022 12:45 AM To: Christian König ; Zhu, Jiadong ; amd-gfx@lists.freedesktop.org Cc: Huang, Ray Subject: Re: [PATCH 1/4] drm/amdgpu:

RE: [PATCH 1/4] drm/amdgpu: Introduce gfx software ring(v3)

2022-09-12 Thread Zhu, Jiadong
[AMD Official Use Only - General] -Original Message- From: Grodzovsky, Andrey Sent: Tuesday, September 13, 2022 12:45 AM To: Christian König ; Zhu, Jiadong ; amd-gfx@lists.freedesktop.org Cc: Huang, Ray Subject: Re: [PATCH 1/4] drm/amdgpu: Introduce gfx software ring(v3) On

RE: [PATCH 4/4] drm/amdgpu: Implement OS triggered MCBP(v2)

2022-09-12 Thread Zhu, Jiadong
[AMD Official Use Only - General] -Original Message- From: Grodzovsky, Andrey Sent: Saturday, September 10, 2022 1:02 AM To: Zhu, Jiadong ; amd-gfx@lists.freedesktop.org Cc: Huang, Ray Subject: Re: [PATCH 4/4] drm/amdgpu: Implement OS triggered MCBP(v2) On 2022-09-08 21:50,

[linux-next:master] BUILD REGRESSION 044b771be9c5de9d817dfafb829d2f049c71c3b4

2022-09-12 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 044b771be9c5de9d817dfafb829d2f049c71c3b4 Add linux-next specific files for 20220912 Error/Warning reports: https://lore.kernel.org/linux-media/202209020437.exeodmfe-...@intel.com https

Re: [PATCH v6 17/57] dyndbg: validate class FOO by checking with module

2022-09-12 Thread jim . cromie
On Mon, Sep 12, 2022 at 2:17 PM Jason Baron wrote: > > > > On 9/9/22 16:44, jim.cro...@gmail.com wrote: > > On Wed, Sep 7, 2022 at 12:19 PM Jason Baron wrote: > >> > >> > >> > >> On 9/4/22 17:40, Jim Cromie wrote: > >>> Add module-to-class validation: > >>> > >>> #> echo class DRM_UT_KMS +p >

Re: [PATCH 0/5] drm/amd/display: Reduce stack usage for clang

2022-09-12 Thread Nathan Chancellor
Hi Rodrigo, On Mon, Sep 12, 2022 at 05:50:31PM -0400, Rodrigo Siqueira Jordao wrote: > > > On 2022-08-30 16:34, Nathan Chancellor wrote: > > Hi all, > > > > This series aims to address the following warnings, which are visible > > when building x86_64 allmodconfig with clang after commit

Re: [PATCH 0/5] drm/amd/display: Reduce stack usage for clang

2022-09-12 Thread Rodrigo Siqueira Jordao
On 2022-08-30 16:34, Nathan Chancellor wrote: Hi all, This series aims to address the following warnings, which are visible when building x86_64 allmodconfig with clang after commit 3876a8b5e241 ("drm/amd/display: Enable building new display engine with KCOV enabled").

Re: [PATCH v7 2/9] drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.

2022-09-12 Thread jim . cromie
On Mon, Sep 12, 2022 at 4:29 AM Jani Nikula wrote: > > On Sun, 11 Sep 2022, Jim Cromie wrote: > > Use DECLARE_DYNDBG_CLASSMAP across DRM: > > > > - in .c files, since macro defines/initializes a record > > > > - in drivers, $mod_{drv,drm,param}.c > >ie where param setup is done, since a

Re: [PATCH v6 17/57] dyndbg: validate class FOO by checking with module

2022-09-12 Thread Jason Baron
On 9/9/22 16:44, jim.cro...@gmail.com wrote: > On Wed, Sep 7, 2022 at 12:19 PM Jason Baron wrote: >> >> >> >> On 9/4/22 17:40, Jim Cromie wrote: >>> Add module-to-class validation: >>> >>> #> echo class DRM_UT_KMS +p > /proc/dynamic_debug/control >>> >>> If a query has "class FOO", then

Re: [PATCH v2 1/1] drm/amdgpu: fix amdgpu_vm_pt_free warning

2022-09-12 Thread Christian König
Am 12.09.22 um 20:48 schrieb Felix Kuehling: Am 2022-09-12 um 13:58 schrieb Philip Yang: Free page table BO from vm resv unlocked context generate below warnings. Add a free_bo_work in vm to free page able BO from vm->bo_freed list. pass vm resv unlock status from page table update caller,

Re: [PATCH 1/1] drm/amdkfd: Track unified memory when changing xnack mode

2022-09-12 Thread Felix Kuehling
Am 2022-09-12 um 14:04 schrieb Philip Yang: Unified memory usage with xnack off is tracked to avoid oversubscribe system memory. When changing xnack mode from off to on, subsequent free ranges allocated with xnack off will not unreserve memory because xnack is changed to on, cause memory

Re: [PATCH v2 1/1] drm/amdgpu: fix amdgpu_vm_pt_free warning

2022-09-12 Thread Felix Kuehling
Am 2022-09-12 um 13:58 schrieb Philip Yang: Free page table BO from vm resv unlocked context generate below warnings. Add a free_bo_work in vm to free page able BO from vm->bo_freed list. pass vm resv unlock status from page table update caller, and add vm_bo entry to vm->bo_freed_list and

[PATCH 1/1] drm/amdkfd: Track unified memory when changing xnack mode

2022-09-12 Thread Philip Yang
Unified memory usage with xnack off is tracked to avoid oversubscribe system memory. When changing xnack mode from off to on, subsequent free ranges allocated with xnack off will not unreserve memory because xnack is changed to on, cause memory accounting unbalanced. Unreserve memory of the

[PATCH v2 1/1] drm/amdgpu: fix amdgpu_vm_pt_free warning

2022-09-12 Thread Philip Yang
Free page table BO from vm resv unlocked context generate below warnings. Add a free_bo_work in vm to free page able BO from vm->bo_freed list. pass vm resv unlock status from page table update caller, and add vm_bo entry to vm->bo_freed_list and schedule the work if calling with vm resv

Re: [PATCH 1/4] drm/amdgpu: Introduce gfx software ring(v3)

2022-09-12 Thread Andrey Grodzovsky
On 2022-09-12 12:22, Christian König wrote: Am 12.09.22 um 17:34 schrieb Andrey Grodzovsky: On 2022-09-12 09:27, Christian König wrote: Am 12.09.22 um 15:22 schrieb Andrey Grodzovsky: On 2022-09-12 06:20, Christian König wrote: Am 09.09.22 um 18:45 schrieb Andrey Grodzovsky: On

Re: [PATCH 1/4] drm/amdgpu: Introduce gfx software ring(v3)

2022-09-12 Thread Christian König
We try to provide a high and low priority gfx ring for GFX9 (and maybe other) hw generations which don't support multiple gfx hw rings, but just MCBP. Regards, Christian. Am 12.09.22 um 17:51 schrieb Liu, Shaoyun: [AMD Official Use Only - General] Just curious about what's this gfx

Re: [PATCH 1/4] drm/amdgpu: Introduce gfx software ring(v3)

2022-09-12 Thread Christian König
Am 12.09.22 um 17:34 schrieb Andrey Grodzovsky: On 2022-09-12 09:27, Christian König wrote: Am 12.09.22 um 15:22 schrieb Andrey Grodzovsky: On 2022-09-12 06:20, Christian König wrote: Am 09.09.22 um 18:45 schrieb Andrey Grodzovsky: On 2022-09-08 21:50, jiadong@amd.com wrote: From:

[PATCH v3 8/8] Documentation/gpu: Add Display Core Unit Test documentation

2022-09-12 Thread Maíra Canal
Explain how to run the KUnit tests present in the AMDGPU's Display Core and clarify which architectures and tools can be used to run the tests. Moreover, explains how to add new tests to the existing tests. Signed-off-by: Maíra Canal --- .../gpu/amdgpu/display/display-test.rst | 88

[PATCH v3 7/8] drm/amd/display: Introduce KUnit tests to dc_dmub_srv library

2022-09-12 Thread Maíra Canal
Add unit test to the SubVP feature in order to avoid possible regressions and assure the code robustness. Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/Kconfig | 13 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 4 + .../gpu/drm/amd/display/tests/.kunitconfig|

[PATCH v3 6/8] drm/amd/display: Introduce KUnit tests for dcn20_fpu

2022-09-12 Thread Maíra Canal
From: Magali Lemes This commit adds unit tests to the functions dcn20_cap_soc_clocks and dcn21_update_bw_bounding_box from dcn20/dcn20_fpu. Signed-off-by: Magali Lemes Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/tests/Makefile| 3 +-

[PATCH v3 5/8] drm/amd/display: Introduce KUnit to dcn20/display_mode_vba_20 library

2022-09-12 Thread Maíra Canal
The display_mode_vba_20 deals with hundreds of display parameters for the DCN20 and sometimes does it in odd ways. The addition of unit tests intends to assure the quality of the code delivered by HW engineers and, also make it possible to refactor the code decreasing concerns about adding bugs to

[PATCH v3 4/8] drm/amd/display: Introduce KUnit tests to the display_mode_vba library

2022-09-12 Thread Maíra Canal
The display_mode_vba library deals with hundreds of display parameters and sometimes does it in odd ways. The addition of unit tests intends to assure the quality of the code delivered by HW engineers and, also make it possible to refactor the code decreasing concerns about adding bugs to the

[PATCH v3 3/8] drm/amd/display: Introduce KUnit tests to display_rq_dlg_calc_20

2022-09-12 Thread Maíra Canal
From: Isabella Basso This adds tests to the bit encoding format verification functions on the file. They're meant to be simpler so as to provide a proof of concept on testing DML code. Signed-off-by: Isabella Basso Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/Kconfig

[PATCH v3 2/8] drm/amd/display: Introduce KUnit tests to the bw_fixed library

2022-09-12 Thread Maíra Canal
KUnit unifies the test structure and provides helper tools that simplify the development of tests. Basic use case allows running tests as regular processes, which makes easier to run unit tests on a development machine and to integrate the tests in a CI system. This commit introduces a unit test

[PATCH v3 1/8] drm/amd/display: Introduce KUnit tests for fixed31_32 library

2022-09-12 Thread Maíra Canal
From: Tales Aparecida The fixed31_32 library performs a lot of the mathematical operations involving fixed-point arithmetic and the conversion of integers to fixed-point representation. This unit tests intend to assure the proper functioning of the basic mathematical operations of fixed-point

[PATCH v3 0/8] drm/amd/display: Introduce KUnit to Display Mode Library

2022-09-12 Thread Maíra Canal
Hello, This series is version 3 of the introduction of unit testing to the AMDPGU driver [1]. Our main goal is to bring unit testing to the AMD display driver; in particular, we'll focus on the Display Mode Library (DML) for DCN2.0, DMUB, and some of the DCE functions. This implementation

RE: [PATCH 1/4] drm/amdgpu: Introduce gfx software ring(v3)

2022-09-12 Thread Liu, Shaoyun
[AMD Official Use Only - General] Just curious about what's this gfx software ring used for ? who decide the priority , can user request a higher priority or it's predefined ? Thanks Shaoyun.liu -Original Message- From: amd-gfx On Behalf Of Andrey Grodzovsky Sent: Monday,

Re: [PATCH 1/4] drm/amdgpu: Introduce gfx software ring(v3)

2022-09-12 Thread Andrey Grodzovsky
On 2022-09-12 09:27, Christian König wrote: Am 12.09.22 um 15:22 schrieb Andrey Grodzovsky: On 2022-09-12 06:20, Christian König wrote: Am 09.09.22 um 18:45 schrieb Andrey Grodzovsky: On 2022-09-08 21:50, jiadong@amd.com wrote: From: "Jiadong.Zhu" The software ring is created to

Re: Linux 6.0-rc5

2022-09-12 Thread Linus Torvalds
On Mon, Sep 12, 2022 at 7:59 AM Sudip Mukherjee wrote: > > clang build failure as reported in [1] is still there. Nathan has > posted a patch series at [2] to fix it, but it has not landed yet.Alex > Deucher > > [1]. https://lore.kernel.org/lkml/YuwRyQYPCb1FD+mr@debian/#t > [2].

Re: [PATCH 1/4] drm/amdgpu: Introduce gfx software ring(v3)

2022-09-12 Thread Luben Tuikov
No problem Christian--will do today. Thanks. Regards, Luben On 2022-09-09 10:24, Christian König wrote: > Andrey and Luben please take a look at this set here and help with > reviewing it. > > Thanks, > Christian. > > Am 09.09.22 um 03:50 schrieb jiadong@amd.com: >> From: "Jiadong.Zhu"

Re: [PATCH 1/1] drm/amdgpu: fix amdgpu_vm_pt_free warning

2022-09-12 Thread Philip Yang
On 2022-09-12 06:22, Christian König wrote: Am 09.09.22 um 20:25 schrieb Philip Yang: Free page table BO from vm resv unlocked context generate below warnings. Add a free_work in vm_bo base of each page table BO, pass vm resv unlock status from page table update caller, and schedule the work

Re: [PATCH 1/1] drm/amdgpu: fix amdgpu_vm_pt_free warning

2022-09-12 Thread Philip Yang
On 2022-09-09 16:01, Felix Kuehling wrote: Am 2022-09-09 um 14:25 schrieb Philip Yang: Free page table BO from vm resv unlocked context generate below warnings. Add a free_work in vm_bo base of each page table BO, pass vm resv unlock status from page table update caller, and schedule the

Re: [PATCH 1/4] drm/amdgpu: Introduce gfx software ring(v3)

2022-09-12 Thread Christian König
Am 12.09.22 um 15:22 schrieb Andrey Grodzovsky: On 2022-09-12 06:20, Christian König wrote: Am 09.09.22 um 18:45 schrieb Andrey Grodzovsky: On 2022-09-08 21:50, jiadong@amd.com wrote: From: "Jiadong.Zhu" The software ring is created to support priority context while there is only one

Re: [PATCH 1/4] drm/amdgpu: Introduce gfx software ring(v3)

2022-09-12 Thread Andrey Grodzovsky
On 2022-09-12 06:20, Christian König wrote: Am 09.09.22 um 18:45 schrieb Andrey Grodzovsky: On 2022-09-08 21:50, jiadong@amd.com wrote: From: "Jiadong.Zhu" The software ring is created to support priority context while there is only one hardware queue for gfx. Every software rings

[PATCH v4] drm/amd/pm:add new gpu_metrics_v2_3 to acquire average temperature info

2022-09-12 Thread Li Ma
From: "Ma,Li" Add new gpu_metrics_v2_3 to acquire average temperature info from SMU metrics. To acquire average temp info from gpu_metrics interface, but gpu_metrics_v2_2 only has members to show current temp info. --- v1: Only add average_temperature_gfx in gpu_metrics_v2_3. v2:

[PATCH 4/7] drm/amdgpu: revert "partial revert "remove ctx->lock" v2"

2022-09-12 Thread Christian König
This reverts commit 94f4c4965e5513ba624488f4b601d6b385635aec. We found that the bo_list is missing a protection for its list entries. Since that is fixed now this workaround can be removed again. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 21

[PATCH 2/7] drm/amdgpu: remove SRIOV and MCBP dependencies from the CS

2022-09-12 Thread Christian König
We should not have any different CS constrains based on the execution environment. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

[PATCH 1/7] drm/sched: move calling drm_sched_entity_select_rq

2022-09-12 Thread Christian König
We already discussed that the call to drm_sched_entity_select_rq() needs to move to drm_sched_job_arm() to be able to set a new scheduler list between _init() and _arm(). This was just not applied for some reason. Signed-off-by: Christian König Reviewed-by: Andrey Grodzovsky ---

[PATCH 7/7] drm/amdgpu: reorder CS code

2022-09-12 Thread Christian König
Sort the functions in the order they are called Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 802 + 1 file changed, 402 insertions(+), 400 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

[PATCH 5/7] drm/amdgpu: use DMA_RESV_USAGE_BOOKKEEP v2

2022-09-12 Thread Christian König
Use DMA_RESV_USAGE_BOOKKEEP for VM page table updates and KFD preemption fence. v2: actually update all usages for KFD Signed-off-by: Christian König --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 26 --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 3 ++- 2 files

[PATCH 6/7] drm/amdgpu: cleanup CS init/fini and pass1

2022-09-12 Thread Christian König
Cleanup the coding style and function names to represent the data they process. Only initialize and cleanup the CS structure in init/fini. Check the size of the IB chunk in pass1. v2: fix job initialisation order and use correct scheduler instance v3: try to move all functional changes into a

[PATCH 3/7] drm/amdgpu: move setting the job resources

2022-09-12 Thread Christian König
Move setting the job resources into amdgpu_job.c Signed-off-by: Christian König Reviewed-by: Andrey Grodzovsky Reviewed-by: Luben Tuikov --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 21 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 17 +

[no subject]

2022-09-12 Thread Christian König
Hey Alex, I've decided to split this patch set into two because we still can't figure out where the VCN regressions come from. Ruijing tested them and confirmed that they don't regress VCN. Can you and maybe Felix take a look and review them? Thanks, Christian.

Re: [PATCH v7 2/9] drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.

2022-09-12 Thread Jani Nikula
On Sun, 11 Sep 2022, Jim Cromie wrote: > Use DECLARE_DYNDBG_CLASSMAP across DRM: > > - in .c files, since macro defines/initializes a record > > - in drivers, $mod_{drv,drm,param}.c >ie where param setup is done, since a classmap is param related > > - in drm/drm_print.c >since

Re: [PATCH 1/1] drm/amdgpu: fix amdgpu_vm_pt_free warning

2022-09-12 Thread Christian König
Am 09.09.22 um 20:25 schrieb Philip Yang: Free page table BO from vm resv unlocked context generate below warnings. Add a free_work in vm_bo base of each page table BO, pass vm resv unlock status from page table update caller, and schedule the work if calling with vm resv unlocked. WARNING:

Re: [PATCH 1/4] drm/amdgpu: Introduce gfx software ring(v3)

2022-09-12 Thread Christian König
Am 09.09.22 um 18:45 schrieb Andrey Grodzovsky: On 2022-09-08 21:50, jiadong@amd.com wrote: From: "Jiadong.Zhu" The software ring is created to support priority context while there is only one hardware queue for gfx. Every software rings has its fence driver and could be used as an

Re: [PATCH v7 1/9] drm_print: condense enum drm_debug_category

2022-09-12 Thread Jani Nikula
On Sun, 11 Sep 2022, Jim Cromie wrote: > enum drm_debug_category has 10 categories, but is initialized with > bitmasks which require 10 bits of underlying storage. By using > natural enumeration, and moving the BIT(cat) into drm_debug_enabled(), > the enum fits in 4 bits, allowing the category

Re: [PATCH 02/27] drm/amd/display: Optimizations for DML math

2022-09-12 Thread Lin, Wayne
[AMD Official Use Only - General] Please remove the file "/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c.rej" if it's not necessary. Thanks, Wayne From: Kotarac, Pavle Sent: Thursday, September 8, 2022 01:32 To:

[PATCH] drm/amdgpu/display: remove unneeded "default n" options

2022-09-12 Thread Jingyu Wang
Remove "default n" options. If the "default" line is removed, it defaults to 'n'. Signed-off-by: Jingyu Wang --- drivers/gpu/drm/amd/display/Kconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/Kconfig b/drivers/gpu/drm/amd/display/Kconfig index

Patch "drm/amd/display: fix memory leak when using debugfs_lookup()" has been added to the 5.15-stable tree

2022-09-12 Thread gregkh
This is a note to let you know that I've just added the patch titled drm/amd/display: fix memory leak when using debugfs_lookup() to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch

[PATCH linux-next] drm/amd/display/amdgpu_dm: remove duplicate included header files

2022-09-12 Thread cgel . zte
From: Xu Panda soc15_common.h is included more than once. Reported-by: Zeal Robot Signed-off-by: Xu Panda --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Patch "drm/amd/display: fix memory leak when using debugfs_lookup()" has been added to the 5.19-stable tree

2022-09-12 Thread gregkh
This is a note to let you know that I've just added the patch titled drm/amd/display: fix memory leak when using debugfs_lookup() to the 5.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch