[PATCH 3/7] drm/amdgpu: add HDP IP v5.2.1 Clock Gating support

2022-08-10 Thread Tim Huang
Add set/get_clockgating for HDP IP v5.2.1. Signed-off-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/hdp_v5_2.c | 150 ++ 1 file changed, 150 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/hdp_v5_2.c b/drivers/gpu/drm/amd/amdgpu/hdp_v5_2.c index

[PATCH 5/7] drm/amdgpu: enable MMHUB IP v3.0.1 Clock Gating

2022-08-10 Thread Tim Huang
Enable AMD_CG_SUPPORT_MC_MGCG and AMD_CG_SUPPORT_MC_LS support. Signed-off-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/soc21.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c index 71e184ca6004..543cf40adf8e 100644

[PATCH 1/7] drm/amd/pm: update the smu driver interface version for SMU IP v13.0.4

2022-08-10 Thread Tim Huang
The pmfw has changed the driver interface version, so keep same with the fw. Signed-off-by: Tim Huang --- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h

[PATCH 6/7] drm/amdgpu: enable HDP IP v5.2.1 Clock Gating

2022-08-10 Thread Tim Huang
Enable AMD_CG_SUPPORT_HDP_MGCG and AMD_CG_SUPPORT_HDP_LS support. Signed-off-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/soc21.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c index 543cf40adf8e..d9e5bae82e83

[PATCH 4/7] drm/amdgpu: add ATHUB IP v3.0.1 Clock Gating support

2022-08-10 Thread Tim Huang
Add ATHUB IP v3.0.1 in athub_v3_0_set_clockgating. The regATHUB_MISC_CNTL has different offset for ATHUB IP v3.0.1, so need to add IP version checking to use the right REG offset. Signed-off-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/athub_v3_0.c | 42 ++--- 1 file

[PATCH 7/7] drm/amdgpu: enable ATHUB IP v3.0.1 Clock Gating

2022-08-10 Thread Tim Huang
Enable AMD_CG_SUPPORT_ATHUB_MGCG and AMD_CG_SUPPORT_ATHUB_LS support. Signed-off-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/soc21.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c index d9e5bae82e83..6c3440e7ed3f

[PATCH 2/7] drm/amdgpu: add MMHUB IP v3.0.1 Clock Gating support

2022-08-10 Thread Tim Huang
Add set/get_clockgating for MMHUB IP v3.0.1. Signed-off-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c | 42 +-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c

[PATCH] drm/amdgpu: modify mcbp implement for gfx9(v3)

2022-08-10 Thread jiadong.zhu
From: "Jiadong.Zhu" 1. Use unmap_queue package to trigger preemption on gfx9 Add trailing fence to track the preemption done. 2. Modify emit_ce_meta emit_de_meta functions for the resumed ibs. Signed-off-by: Jiadong.Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 +

RE: [PATCH 1/2] drm/amdgpu: modify mcbp implement for gfx9(v2)

2022-08-10 Thread Zhu, Jiadong
[AMD Official Use Only - General] Hi Christian, Thank you for the reply, I will update the patch to fix style issue. The patch has several changes 1. change the unmap package for mcbp which is not correct in gfx_v9_0_kiq_unmap_queues. 2. change the emitted ce/de meta data used for preempted

RE: [PATCH] drm/amd/amdgpu: add ih cg and hdp sd on smu_v13_0_7

2022-08-10 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Kenneth Feng Sent: Thursday, August 11, 2022 09:50 To: amd-gfx@lists.freedesktop.org Cc: Feng, Kenneth Subject: [PATCH] drm/amd/amdgpu: add ih cg and hdp sd on

[PATCH] drm/amd/amdgpu: add ih cg and hdp sd on smu_v13_0_7

2022-08-10 Thread Kenneth Feng
add ih cg and hdp sd on smu_v13_0_7 Signed-off-by: Kenneth Feng --- drivers/gpu/drm/amd/amdgpu/soc21.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c index bbbf760f8ad2..686e17770c63 100644 ---

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

2022-08-10 Thread Tales Aparecida
From: 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 Signed-off-by: Tales Aparecida ---

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

2022-08-10 Thread Tales Aparecida
From: 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 Signed-off-by: Tales Aparecida --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 4 + .../amd/display/tests/dc/dc_dmub_srv_test.c | 285

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

2022-08-10 Thread Tales Aparecida
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: Tales Aparecida --- .../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 4 +

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

2022-08-10 Thread Tales Aparecida
From: 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

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

2022-08-10 Thread Tales Aparecida
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: Tales Aparecida --- .../dc/dml/dcn20/display_rq_dlg_calc_20.c

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

2022-08-10 Thread Tales Aparecida
From: 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

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

2022-08-10 Thread Tales Aparecida
From: 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

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

2022-08-10 Thread 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 arithmetic, such as

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

2022-08-10 Thread Tales Aparecida
Hello, This series is the consolidation of an RFC sent earlier this year [RFC] bringing unit testing to the AMDPGU driver. [gsoc] 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

[PATCH] drm/amdkfd: Try to schedule bottom half on same core

2022-08-10 Thread Felix Kuehling
On systems that support SMT (hyperthreading) schedule the bottom half of the KFD interrupt handler on the same core. This makes it possible to reserve a core for interrupt handling and have the bottom half run on that same core. On systems without SMT, pick another core in the same NUMA node, as

[PATCH v3 4/4] drm/amdgpu: Document gfx_off members of struct amdgpu_gfx

2022-08-10 Thread André Almeida
Add comments to document gfx_off related members of struct amdgpu_gfx. Signed-off-by: André Almeida --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h

[PATCH v3 3/4] Documentation/gpu: Document GFXOFF's count and residency

2022-08-10 Thread André Almeida
Add documentation explaining those two new files. While here, add a note about the value type. Signed-off-by: André Almeida --- Documentation/gpu/amdgpu/thermal.rst | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Documentation/gpu/amdgpu/thermal.rst

[PATCH v3 2/4] drm/amd/pm: Implement GFXOFF's entry count and residency for vangogh

2022-08-10 Thread André Almeida
Implement functions to get and set GFXOFF's entry count and residency for vangogh. Signed-off-by: André Almeida --- .../pm/swsmu/inc/pmfw_if/smu_v11_5_ppsmc.h| 5 +- drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 5 +- .../gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 76

[PATCH v3 1/4] drm/amd: Add detailed GFXOFF stats to debugfs

2022-08-10 Thread André Almeida
Add debugfs interface to log GFXOFF statistics: - Read amdgpu_gfxoff_count to get the total GFXOFF entry count at the time of query since system power-up - Write 1 to amdgpu_gfxoff_residency to start logging, and 0 to stop. Read it to get average GFXOFF residency % multiplied by 100 during

[PATCH v3 0/4] drm/amd: Add more GFXOFF stats for vangogh

2022-08-10 Thread André Almeida
This series adds new logging features for GFXOFF available for vangogh and documentation for it. I've created a small userspace program to interact with this new debugfs interface and it can be found at: https://gitlab.freedesktop.org/andrealmeid/gfxoff_tool Changelog: v3: - drop IP version

Re: [RESEND RFC 15/18] drm/display/dp_mst: Skip releasing payloads if last connected port isn't connected

2022-08-10 Thread Lyude Paul
On Wed, 2022-08-10 at 03:28 +, Lin, Wayne wrote: > Hi Lyude, > Thanks for your time and sorry for late response! > > It's described in 5.6.1.3 of DP spec 2.0: > "MST branch device, in addition to waiting for the ACK from its immediate > Upstream device, should either wait for the

Re: [PATCH 3/3] drm/amd/pm: add missing ->fini_xxxx interfaces for some SMU13 asics

2022-08-10 Thread Deucher, Alexander
[Public] Series is: Reviewed-by: Alex Deucher From: Quan, Evan Sent: Tuesday, August 9, 2022 11:21 PM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Deucher, Alexander ; Quan, Evan Subject: [PATCH 3/3] drm/amd/pm: add missing ->fini_ interfaces

Re: [PATCH v2 1/3] drm/dp_mst: add passthrough_aux to struct drm_dp_mst_port

2022-08-10 Thread Lyude Paul
On Wed, 2022-08-10 at 09:23 -0400, Hamza Mahfooz wrote: > On 2022-08-09 18:01, Lyude Paul wrote: > > Ah yes of course! Probably should have asked when I gave the r-b :). Also, > > just so patchwork actually catches it I will say the magic incantation: > > > > Reviewed-by: Lyude Paul > > > > Do

Re: [PATCH] drm/amdkfd: Fix mm reference in SVM eviction worker

2022-08-10 Thread Philip Yang
On 2022-08-08 20:38, Felix Kuehling wrote: Use the mm reference from the fence. This allows removing the svm_bo->svms pointer, which was problematic because we cannot assume that the struct kfd_process containing the svms is still allocated without holding a refcount on the process. Use

Re: [Linaro-mm-sig] [PATCH v2 3/5] dma-buf: Move all dma-bufs to dynamic locking specification

2022-08-10 Thread Christian König
Am 10.08.22 um 19:49 schrieb Dmitry Osipenko: On 8/10/22 14:30, Christian König wrote: Am 25.07.22 um 17:18 schrieb Dmitry Osipenko: This patch moves the non-dynamic dma-buf users over to the dynamic locking specification. The strict locking convention prevents deadlock situation for dma-buf

Re: [Linaro-mm-sig] [PATCH v2 3/5] dma-buf: Move all dma-bufs to dynamic locking specification

2022-08-10 Thread Dmitry Osipenko
On 8/10/22 14:30, Christian König wrote: >> + * - dma_buf_move_notify() > > This one is called by the exporter, not the importer. Good catch, thank you! -- Best regards, Dmitry

Re: [Linaro-mm-sig] [PATCH v2 3/5] dma-buf: Move all dma-bufs to dynamic locking specification

2022-08-10 Thread Dmitry Osipenko
On 8/10/22 14:30, Christian König wrote: > Am 25.07.22 um 17:18 schrieb Dmitry Osipenko: >> This patch moves the non-dynamic dma-buf users over to the dynamic >> locking specification. The strict locking convention prevents deadlock >> situation for dma-buf importers and exporters. >> >>

RE: [PATCH] drm/amdgpu: use sjt mec fw on aldebaran for sriov

2022-08-10 Thread Liu, Shaoyun
[AMD Official Use Only - General] Thanks for the review and yes in the host driver side , the PF already load the sjt MEC fw , the psp policy requires the MEC version loaded in guest side should not be lower than the version already loaded in host side . So this will guarantee only

Re: [Patch V2] drm/amdgpu: Increase tlb flush timeout for sriov

2022-08-10 Thread Alex Deucher
On Wed, Aug 10, 2022 at 12:52 PM Christian König wrote: > > > > Am 10.08.22 um 10:50 schrieb Dusica Milinkovic: > > [Why] > > During multi-vf executing benchmark (Luxmark) observed kiq error timeout. > > It happenes because all of VFs do the tlb invalidation at the same time. > > Although each VF

Re: [Patch V2] drm/amdgpu: Increase tlb flush timeout for sriov

2022-08-10 Thread Christian König
Am 10.08.22 um 10:50 schrieb Dusica Milinkovic: [Why] During multi-vf executing benchmark (Luxmark) observed kiq error timeout. It happenes because all of VFs do the tlb invalidation at the same time. Although each VF has the invalidate register set, from hardware side the invalidate requests

Re: [PATCH 1/3] drm/amd/display: Fix merge conflict resolution in amdgpu_dm_plane.c

2022-08-10 Thread Alex Deucher
Acked-by: Alex Deucher On Mon, Aug 1, 2022 at 10:08 AM Simon Ser wrote: > > Acked-by: Simon Ser > > CC amd-gfx > > On Monday, August 1st, 2022 at 15:52, Imre Deak wrote: > > > The API change introduced in > > > > commit 30c637151cfa ("drm/plane-helper: Export individual helpers") > > > > was

Re: [PATCHv2 -next] drm/amdgpu: double free error and freeing uninitialized null pointer

2022-08-10 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Aug 1, 2022 at 1:08 PM André Almeida wrote: > > Às 00:46 de 30/07/22, Sebin Sebastian escreveu: > > Fix a double free and an uninitialized pointer read error. Both tmp and > > new are pointing at same address and both are freed which leads to > > double free.

Re: [PATCH] drm/amdgpu: use sjt mec fw on aldebaran for sriov

2022-08-10 Thread Alex Deucher
On Fri, Aug 5, 2022 at 12:11 PM shaoyunl wrote: > > The second jump table is required on live migration or mulitple VF > configuration on Aldebaran. With this implemented, the first level > jump table(hw used) will be same, mec fw internal will use the > second level jump table jump to the real

Re: [PATCH v2] drm/amd/display: set panel orientation before drm_dev_register

2022-08-10 Thread Alex Deucher
Applied. Thanks! Alex On Thu, Aug 4, 2022 at 12:14 PM Melissa Wen wrote: > > To set the panel orientation property with quirk, we need the mode size > provided by EDID. This info is available after EDID is read by > dc_link_detect() > and updated by amdgpu_dm_update_connector_after_detect().

Re: [PATCH 1/2] drm/amdgpu: modify mcbp implement for gfx9(v2)

2022-08-10 Thread Christian König
Hi, Jiadong, first of all your patches have major style issues. Please use the checkpatch.pl script before sending those out. Apart from that as discussed on our call on Monday MCBP is not something we will implement on Linux. So we will probably remove the existing debugfs test sooner or

Re: [PATCH v2 0/4] drm/amd: Add more GFXOFF stats for vangogh

2022-08-10 Thread André Almeida
Às 12:57 de 10/08/22, Alex Deucher escreveu: > On Tue, Jul 26, 2022 at 2:23 PM André Almeida wrote: >> >> This series adds new logging features for GFXOFF available for vangogh >> and documentation for it. >> >> I've created a small userspace program to interact with this new debugfs >>

Re: [PATCH v2 0/4] drm/amd: Add more GFXOFF stats for vangogh

2022-08-10 Thread Alex Deucher
On Tue, Jul 26, 2022 at 2:23 PM André Almeida wrote: > > This series adds new logging features for GFXOFF available for vangogh > and documentation for it. > > I've created a small userspace program to interact with this new debugfs > interface and it can be found at: > >

Re: [PATCH v2 2/4] drm/amd/pm: Implement GFXOFF's entry count and residency for vangogh

2022-08-10 Thread Alex Deucher
On Tue, Jul 26, 2022 at 2:23 PM André Almeida wrote: > > Implement functions to get and set GFXOFF's entry count and residency > for vangogh. > > Signed-off-by: André Almeida > --- > .../pm/swsmu/inc/pmfw_if/smu_v11_5_ppsmc.h| 5 +- > drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 5 +- >

Re: [PATCH] drm/amdgpu: fix check in fbdev init

2022-08-10 Thread Greg KH
On Wed, Aug 10, 2022 at 11:28:18AM -0400, Alex Deucher wrote: > On Tue, Jul 19, 2022 at 2:57 PM Alex Deucher > wrote: > > > > The new vkms virtual display code is atomic so there is > > no need to call drm_helper_disable_unused_functions() > > when it is enabled. Doing so can result in a

Re: [PATCH] drm/amdgpu: fix check in fbdev init

2022-08-10 Thread Alex Deucher
On Wed, Aug 10, 2022 at 11:38 AM Greg KH wrote: > > On Wed, Aug 10, 2022 at 11:28:18AM -0400, Alex Deucher wrote: > > On Tue, Jul 19, 2022 at 2:57 PM Alex Deucher > > wrote: > > > > > > The new vkms virtual display code is atomic so there is > > > no need to call

Re: [PATCH] drm/amdgpu: fix check in fbdev init

2022-08-10 Thread Alex Deucher
On Tue, Jul 19, 2022 at 2:57 PM Alex Deucher wrote: > > The new vkms virtual display code is atomic so there is > no need to call drm_helper_disable_unused_functions() > when it is enabled. Doing so can result in a segfault. > When the driver switched from the old virtual display code > to the

Re: [PATCH v2 1/3] drm/dp_mst: add passthrough_aux to struct drm_dp_mst_port

2022-08-10 Thread Hamza Mahfooz
On 2022-08-09 18:01, Lyude Paul wrote: Ah yes of course! Probably should have asked when I gave the r-b :). Also, just so patchwork actually catches it I will say the magic incantation: Reviewed-by: Lyude Paul Do we want to merge just this patch to drm-misc-next, or do you want to merge the

Re: [Linaro-mm-sig] [PATCH v2 3/5] dma-buf: Move all dma-bufs to dynamic locking specification

2022-08-10 Thread Christian König
Am 25.07.22 um 17:18 schrieb Dmitry Osipenko: This patch moves the non-dynamic dma-buf users over to the dynamic locking specification. The strict locking convention prevents deadlock situation for dma-buf importers and exporters. Previously the "unlocked" versions of the dma-buf API functions

[Patch V2] drm/amdgpu: Increase tlb flush timeout for sriov

2022-08-10 Thread Dusica Milinkovic
[Why] During multi-vf executing benchmark (Luxmark) observed kiq error timeout. It happenes because all of VFs do the tlb invalidation at the same time. Although each VF has the invalidate register set, from hardware side the invalidate requests are queue to execute. [How] In case of 12 VF