[PATCH 4/4] drm/amdgpu: Move ras resume into SRIOV function

2024-04-25 Thread Yunxiang Li
This is part of the reset, move it into the reset function. Signed-off-by: Yunxiang Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH 3/4] drm/amdgpu: Fix amdgpu_device_reset_sriov retry logic

2024-04-25 Thread Yunxiang Li
The retry loop for SRIOV reset have refcount and memory leak issue. Depending on which function call fails it can potentially call amdgpu_amdkfd_pre/post_reset different number of times and causes kfd_locked count to be wrong. This will block all future attempts at opening /dev/kfd. The retry loop

[PATCH v3 2/4] drm/amdgpu: Add reset_context flag for host FLR

2024-04-25 Thread Yunxiang Li
There are other reset sources that pass NULL as the job pointer, such as amdgpu_amdkfd_reset_work. Therefore, using the job pointer to check if the FLR comes from the host does not work. Add a flag in reset_context to explicitly mark host triggered reset, and set this flag when we receive host

[PATCH v3 1/4] drm/amdgpu: Fix two reset triggered in a row

2024-04-25 Thread Yunxiang Li
Some times a hang GPU causes multiple reset sources to schedule resets. The second source will be able to trigger an unnecessary reset if they schedule after we call amdgpu_device_stop_pending_resets. Move amdgpu_device_stop_pending_resets to after the reset is done. Since at this point the GPU

Re: [PATCH] drm/amdgpu: Fix out-of-bounds write warning

2024-04-25 Thread Ma, Jun
On 4/25/2024 8:39 PM, Christian König wrote: > > > Am 25.04.24 um 12:00 schrieb Ma Jun: >> Check the ring type value to fix the out-of-bounds >> write warning >> >> Signed-off-by: Ma Jun >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 5 + >> 1 file changed, 5 insertions(+) >> >>

RE: [PATCH] drm/amdgpu: add ACA error query support for umc_v12_0

2024-04-25 Thread Zhou1, Tao
[AMD Official Use Only - General] > -Original Message- > From: Wang, Yang(Kevin) > Sent: Wednesday, April 17, 2024 11:10 AM > To: amd-gfx@lists.freedesktop.org > Cc: Zhang, Hawking ; Zhou1, Tao > ; Chai, Thomas > Subject: [PATCH] drm/amdgpu: add ACA error query support for umc_v12_0 > >

Re: [PATCH v2 2/2] drm/amdgpu: Fix the uninitialized variable warning

2024-04-25 Thread Ma, Jun
On 4/25/2024 6:10 PM, Lazar, Lijo wrote: > > > On 4/25/2024 3:30 PM, Ma Jun wrote: >> Initialize the phy_id to 0 to fix the warning of >> "Using uninitialized value phy_id" >> >> Signed-off-by: Ma Jun >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 6 +- >> 1 file changed,

RE: [PATCH] drm/amdgpu: skip to create ras xxx_err_count node when ACA is enabled

2024-04-25 Thread Zhou1, Tao
[AMD Official Use Only - General] Reviewed-by: Tao Zhou [Tao] it's better to add comment to explain how to get error count when aca is enabled. BTW, according to the change, do we need to update ras tool? > -Original Message- > From: Wang, Yang(Kevin) > Sent: Wednesday, April 24,

[PATCH] drm/amdgpu: fix uninitialized scalar variable warning

2024-04-25 Thread Tim Huang
Clear warning that field bp is uninitialized when calling amdgpu_virt_ras_add_bps. Signed-off-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c

Re: [PATCH] drm/amdgpu: fix overflowed array index read warning

2024-04-25 Thread Alex Deucher
On Thu, Apr 25, 2024 at 8:37 PM Tim Huang wrote: > > Clear overflowed array index read warning by cast operation. > > Signed-off-by: Tim Huang Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git

[PATCH] drm/amdgpu: fix overflowed array index read warning

2024-04-25 Thread Tim Huang
Clear overflowed array index read warning by cast operation. Signed-off-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c index

RE: [PATCH v2] drm/amdgpu: fix overflowed array index read warning

2024-04-25 Thread Huang, Tim
[AMD Official Use Only - General] -Original Message- From: Koenig, Christian Sent: Thursday, April 25, 2024 9:31 PM To: Alex Deucher ; Huang, Tim Cc: amd-gfx@lists.freedesktop.org; Deucher, Alexander Subject: Re: [PATCH v2] drm/amdgpu: fix overflowed array index read warning Am

Re: [PATCH v3] drm/amdgpu: IB test encode test package change for VCN5

2024-04-25 Thread Jiang, Sonny
[AMD Official Use Only - General] By tests, I didn't find error on VCN1 to VCN4. Thanks, Sonny From: Jiang, Sonny Sent: Thursday, April 25, 2024 4:10 PM To: amd-gfx@lists.freedesktop.org Cc: Jiang, Sonny ; Jiang, Sonny Subject: [PATCH v3] drm/amdgpu: IB test

[PATCH v3] drm/amdgpu: IB test encode test package change for VCN5

2024-04-25 Thread Sonny Jiang
From: Sonny Jiang VCN5 session info package interface changed Signed-off-by: Sonny Jiang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c index

[PATCH 1/5] drm/amdgpu: Add gfx v12 pte/pde format change

2024-04-25 Thread Alex Deucher
From: Hawking Zhang Add gfx v12 pte/pde format change. Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h

[PATCH 4/5] drm/amdgpu: support gfx v12 specific pte/pde fields

2024-04-25 Thread Alex Deucher
From: Hawking Zhang Add gfx v12 pte/pde support to gmc common helper. v2: squash in fixes (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 4 ++--

[PATCH 5/5] drm/amdgpu/discovery: Add gmc v12_0 ip block

2024-04-25 Thread Alex Deucher
From: Likun Gao Add gmc v12_0 ip block. v2: Squash in updates (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH 2/5] drm/amdgpu: Add gmc v12_0 ip block support (v7)

2024-04-25 Thread Alex Deucher
From: Hawking Zhang Add initial support for GMC v12. v1: Add gmc v12_0 ip block support. v2: Switch to gfx.kiq array. v3: Switch to vmhubs_mask. v4: Switch to AMDGPU_MMHUB0(0) and AMDGPU_GFXHUB(0) v5: Rebase (Alex) v6: Squash in fixes for AGP handling, gfxhub init order, vmhub index (Alex)

[PATCH 3/5] drm/amdgpu: Set pte_is_pte flag in gmc v12 gart

2024-04-25 Thread Alex Deucher
From: Hawking Zhang pte_is_pte is new flag introduced in gmc v12 that needs to be set by default for pte. Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH] drm/amdgpu: Add gfxhub v12_0 ip block support (v3)

2024-04-25 Thread Alex Deucher
From: Likun Gao Add initial gfxhub v12 support. v1: Add gfxhub v12_0 ip block support (Likun) v2: Switch to AMDGPU_GFXHUB(0) (Hawking) v3: Squash in keep default error response mode (Hawking) Signed-off-by: Likun Gao Signed-off-by: Hawking Zhang Reviewed-by: Hawking Zhang Signed-off-by:

[PATCH 2/2] drm/amdgpu: Add mmhub v4_1_0 ip block support (v4)

2024-04-25 Thread Alex Deucher
From: Hawking Zhang Add initial support for MMHUB 4.1.0. v1: Add mmhub v4_1_0 ip block support. v2: Switch to AMDGPU_MMHUB0(0). v3: squash in fix for ip version check (Alex) v4: squash in vm_contexts_disable fix (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex

[PATCH 0/2] Add mmhub 4.1.x support

2024-04-25 Thread Alex Deucher
Add support for mmhub 4.1.x. The first patch adds new register headers which have been omitted due to size. Hawking Zhang (2): drm/amdgpu: Add mmhub v4_1_0 ip headers (v4) drm/amdgpu: Add mmhub v4_1_0 ip block support (v4) drivers/gpu/drm/amd/amdgpu/Makefile |2 +-

[PATCH 4/4] drm/amdgpu/discovery: Add common soc24 ip block

2024-04-25 Thread Alex Deucher
From: Likun Gao Add common soc24 ip block. v2: squash in updates (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH 3/4] drm/amdgpu: Add soc24 common ip block (v2)

2024-04-25 Thread Alex Deucher
From: Hawking Zhang Add initial soc24 support. v1: Add soc24 common ip block. v2: Switch to new select_se_sh/enter_safe_mode interface. v3: squash in correct ext rev id, etc. (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher ---

[PATCH 0/4] add soc24 support

2024-04-25 Thread Alex Deucher
Add SoC handler for SoC24 platforms. First two patches add new headers which are omitted due to size. Hawking Zhang (3): drm/amdgpu: Add gc v12_0_0 ip headers (v4) drm/amdgpu: Add soc24 chip enum definitions (v4) drm/amdgpu: Add soc24 common ip block (v2) Likun Gao (1):

Re: [RFC PATCH 02/18] drm/ttm: Add per-BO eviction tracking

2024-04-25 Thread Matthew Brost
On Thu, Apr 25, 2024 at 08:18:38AM +0200, Christian König wrote: > Am 24.04.24 um 18:56 schrieb Friedrich Vock: > > Make each buffer object aware of whether it has been evicted or not. > > That reverts some changes we made a couple of years ago. > > In general the idea is that eviction isn't

[PATCH v5] drm/amdgpu: Modify the contiguous flags behaviour

2024-04-25 Thread Arunpravin Paneer Selvam
Now we have two flags for contiguous VRAM buffer allocation. If the application request for AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS, it would set the ttm place TTM_PL_FLAG_CONTIGUOUS flag in the buffer's placement function. This patch will change the default behaviour of the two flags. When we set

Re: [PATCH] drm/amdgpu: skip ip dump if devcoredump flag is set

2024-04-25 Thread Khatri, Sunil
On 4/25/2024 7:43 PM, Lazar, Lijo wrote: On 4/25/2024 3:53 PM, Sunil Khatri wrote: Do not dump the ip registers during driver reload in passthrough environment. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 ++ 1 file changed, 6 insertions(+), 4

RE: [PATCH] drm/amdgpu: Fix two reset triggered in a row

2024-04-25 Thread Li, Yunxiang (Teddy)
[Public] > Looks like that is handled by the scheduler work item now as well. See > function gfx_v9_0_fault() for an example. Cool so it is blocked by drm_sched_stop also. I think that covers everything.

Re: [PATCH] drm/amdgpu: skip ip dump if devcoredump flag is set

2024-04-25 Thread Lazar, Lijo
On 4/25/2024 3:53 PM, Sunil Khatri wrote: > Do not dump the ip registers during driver reload > in passthrough environment. > > Signed-off-by: Sunil Khatri > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git

Re: [PATCH] drm/amdgpu: Fix two reset triggered in a row

2024-04-25 Thread Christian König
Am 24.04.24 um 15:13 schrieb Li, Yunxiang (Teddy): [Public] We have the KFD, FLR, the per engine one in the scheduler and IIRC one more for the CP (illegal operation and register write). I'm not sure about the CP one, but all others should be handled correctly with the V2 patch as far as I

Re: [PATCH 5/5] drm/amdgpu/gfx: enable mes to map legacy queue support

2024-04-25 Thread Christian König
Shashank can you take a look as well. Thanks, Christian. Am 25.04.24 um 15:40 schrieb Alex Deucher: Series looks good to me. Reviewed-by: Alex Deucher On Thu, Apr 25, 2024 at 6:07 AM Jack Xiao wrote: Enable mes to map legacy queue support. Signed-off-by: Jack Xiao Reviewed-by: Hawking

Re: [PATCH 5/5] drm/amdgpu/gfx: enable mes to map legacy queue support

2024-04-25 Thread Alex Deucher
Series looks good to me. Reviewed-by: Alex Deucher On Thu, Apr 25, 2024 at 6:07 AM Jack Xiao wrote: > > Enable mes to map legacy queue support. > > Signed-off-by: Jack Xiao > Reviewed-by: Hawking Zhang > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 39 + > 1 file

Re: [RFC PATCH 00/18] TTM interface for managing VRAM oversubscription

2024-04-25 Thread Christian König
Yeah, and this patch set here is removing that functionality. Which is major concern from my side as well. Instead of removing it my long term plan was to move this into TTM ( the recent flags rework is going into that direction), so that both amdgpu and radeon can use the same code again

Re: [PATCH v2] drm/amdgpu: fix overflowed array index read warning

2024-04-25 Thread Christian König
Am 25.04.24 um 15:28 schrieb Alex Deucher: On Thu, Apr 25, 2024 at 3:22 AM Tim Huang wrote: From: Tim Huang Clear warning that cast operation might have overflowed. v2: keep reverse xmas tree order to declare "int r;" (Christian) Signed-off-by: Tim Huang ---

Re: [PATCH] drm/amdgpu: fix the warning about the expression (int)size - len

2024-04-25 Thread Alex Deucher
On Thu, Apr 25, 2024 at 3:37 AM Jesse Zhang wrote: > > Converting size from size_t to int may overflow. > v2: keep reverse xmas tree order (Christian) > > Signed-off-by: Jesse Zhang Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 5 +++-- > 1 file changed, 3

Re: [PATCH] drm/amdgpu: skip ip dump if devcoredump flag is set

2024-04-25 Thread Alex Deucher
On Thu, Apr 25, 2024 at 6:23 AM Sunil Khatri wrote: > > Do not dump the ip registers during driver reload > in passthrough environment. > > Signed-off-by: Sunil Khatri Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 ++ > 1 file changed, 6

Re: [PATCH v2] drm/amdgpu: fix overflowed array index read warning

2024-04-25 Thread Alex Deucher
On Thu, Apr 25, 2024 at 3:22 AM Tim Huang wrote: > > From: Tim Huang > > Clear warning that cast operation might have overflowed. > > v2: keep reverse xmas tree order to declare "int r;" (Christian) > > Signed-off-by: Tim Huang > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 ++-- > 1

Re: [RFC PATCH 00/18] TTM interface for managing VRAM oversubscription

2024-04-25 Thread Marek Olšák
The most extreme ping-ponging is mitigated by throttling buffer moves in the kernel, but it only works without VM_ALWAYS_VALID and you can set BO priorities in the BO list. A better approach that works with VM_ALWAYS_VALID would be nice. Marek On Wed, Apr 24, 2024 at 1:12 PM Friedrich Vock

Re: [PATCH v2 1/2] drm/amdgpu: Fix uninitialized variable warning in amdgpu_afmt_acr

2024-04-25 Thread Alex Deucher
On Thu, Apr 25, 2024 at 6:07 AM Ma Jun wrote: > > Assign value to clock to fix the warning below: > "Using uninitialized value res. Field res.clock is uninitialized" > > Signed-off-by: Ma Jun Reviewed-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c | 1 + > 1 file changed,

Re: [PATCH v2 2/2] drm/amdgpu: Fix the uninitialized variable warning

2024-04-25 Thread Alex Deucher
On Thu, Apr 25, 2024 at 6:17 AM Ma Jun wrote: > > Initialize the phy_id to 0 to fix the warning of > "Using uninitialized value phy_id" > > Signed-off-by: Ma Jun > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git

[PATCH v2] drm/amd/display: re-indent dc_power_down_on_boot()

2024-04-25 Thread Dan Carpenter
These lines are indented too far. Clean the whitespace. Signed-off-by: Dan Carpenter --- v2: Delete another blank line (checkpatch.pl --strict). drivers/gpu/drm/amd/display/dc/core/dc.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git

Re: [PATCH] drm/amdgpu: Fix out-of-bounds write warning

2024-04-25 Thread Christian König
Am 25.04.24 um 12:00 schrieb Ma Jun: Check the ring type value to fix the out-of-bounds write warning Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c

Re: [PATCH 1/2] drm/print: drop include debugfs.h and include where needed

2024-04-25 Thread Robert Foss
On Mon, Apr 22, 2024 at 2:10 PM Jani Nikula wrote: > > Surprisingly many places depend on debugfs.h to be included via > drm_print.h. Fix them. > > v3: Also fix armada, ite-it6505, imagination, msm, sti, vc4, and xe > > v2: Also fix ivpu and vmwgfx > > Reviewed-by: Andrzej Hajda > Acked-by:

[PATCH] drm/amdgpu: skip ip dump if devcoredump flag is set

2024-04-25 Thread Sunil Khatri
Do not dump the ip registers during driver reload in passthrough environment. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Re: [PATCH v2 2/2] drm/amdgpu: Fix the uninitialized variable warning

2024-04-25 Thread Lazar, Lijo
On 4/25/2024 3:30 PM, Ma Jun wrote: > Initialize the phy_id to 0 to fix the warning of > "Using uninitialized value phy_id" > > Signed-off-by: Ma Jun > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git

[PATCH] drm/amdgpu: Fix out-of-bounds write warning

2024-04-25 Thread Ma Jun
Check the ring type value to fix the out-of-bounds write warning Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c index

[PATCH v2 2/2] drm/amdgpu: Fix the uninitialized variable warning

2024-04-25 Thread Ma Jun
Initialize the phy_id to 0 to fix the warning of "Using uninitialized value phy_id" Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c

[PATCH v2 1/2] drm/amdgpu: Fix uninitialized variable warning in amdgpu_afmt_acr

2024-04-25 Thread Ma Jun
Assign value to clock to fix the warning below: "Using uninitialized value res. Field res.clock is uninitialized" Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c

[PATCH 5/5] drm/amdgpu/gfx: enable mes to map legacy queue support

2024-04-25 Thread Jack Xiao
Enable mes to map legacy queue support. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 39 + 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c

[PATCH 4/5] drm/amdgpu/mes11: adjust mes initialization sequence

2024-04-25 Thread Jack Xiao
Adjust mes queue initialization before kgq/kcq initialization to enable mes mapping legacy queue. Signed-off-by: Jack Xiao --- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c

[PATCH 2/5] drm/amdgpu/mes11: update ADD_QUEUE interface

2024-04-25 Thread Jack Xiao
Update ADD_QUEUE interface for mes11 to support mes mapping legacy queue. Signed-off-by: Jack Xiao --- drivers/gpu/drm/amd/include/mes_v11_api_def.h | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/include/mes_v11_api_def.h

[PATCH 3/5] drm/amdgpu/mes11: add mes mapping legacy queue support

2024-04-25 Thread Jack Xiao
Add mes11 map legacy queue packet submission. Signed-off-by: Jack Xiao --- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c index

[PATCH 0/5] enable mes to map kgq/kcq

2024-04-25 Thread Jack Xiao
Jack Xiao (5): drm/amdgpu/mes: add mes mapping legacy queue support drm/amdgpu/mes11: update ADD_QUEUE interface drm/amdgpu/mes11: add mes mapping legacy queue support drm/amdgpu/mes11: adjust mes initialization sequence drm/amdgpu/gfx: enable mes to map legacy queue support

[PATCH 1/5] drm/amdgpu/mes: add mes mapping legacy queue support

2024-04-25 Thread Jack Xiao
Add mes mapping legacy queue framework support. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 22 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 14 ++ 2 files changed, 36 insertions(+) diff --git

RE: [PATCH 4/4] drm/amdgpu: avoid dump mca bank log muti times during ras ISR

2024-04-25 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] -Original Message- From: Zhou1, Tao Sent: Thursday, April 25, 2024 4:31 PM To: Wang, Yang(Kevin) ; amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Li, Candice Subject: RE: [PATCH 4/4] drm/amdgpu: avoid dump mca bank log muti times during ras ISR

Re: [PATCH v4] drm/amdgpu: Modify the contiguous flags behaviour

2024-04-25 Thread Christian König
Am 25.04.24 um 10:15 schrieb Arunpravin Paneer Selvam: Now we have two flags for contiguous VRAM buffer allocation. If the application request for AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS, it would set the ttm place TTM_PL_FLAG_CONTIGUOUS flag in the buffer's placement function. This patch will change

RE: [PATCH 4/4] drm/amdgpu: avoid dump mca bank log muti times during ras ISR

2024-04-25 Thread Zhou1, Tao
[AMD Official Use Only - General] > -Original Message- > From: Wang, Yang(Kevin) > Sent: Tuesday, April 23, 2024 4:27 PM > To: amd-gfx@lists.freedesktop.org > Cc: Zhang, Hawking ; Zhou1, Tao > ; Li, Candice > Subject: [PATCH 4/4] drm/amdgpu: avoid dump mca bank log muti times during >

Re: [PATCH v3] drm/amdgpu: Modify the contiguous flags behaviour

2024-04-25 Thread Paneer Selvam, Arunpravin
Hi Christian, On 4/24/2024 2:02 PM, Christian König wrote: Am 24.04.24 um 09:13 schrieb Arunpravin Paneer Selvam: Now we have two flags for contiguous VRAM buffer allocation. If the application request for AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS, it would set the ttm place TTM_PL_FLAG_CONTIGUOUS

[PATCH v4] drm/amdgpu: Modify the contiguous flags behaviour

2024-04-25 Thread Arunpravin Paneer Selvam
Now we have two flags for contiguous VRAM buffer allocation. If the application request for AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS, it would set the ttm place TTM_PL_FLAG_CONTIGUOUS flag in the buffer's placement function. This patch will change the default behaviour of the two flags. When we set

[PATCH] drm/amd/display: Remove duplicate dcn401/dcn401_clk_mgr.h header

2024-04-25 Thread Jiapeng Chong
./drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c: dcn401/dcn401_clk_mgr.h is included more than once. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8885 Signed-off-by: Jiapeng Chong ---

Re: [PATCH 1/2] drm/print: drop include debugfs.h and include where needed

2024-04-25 Thread Jani Nikula
On Mon, 22 Apr 2024, Jani Nikula wrote: > Surprisingly many places depend on debugfs.h to be included via > drm_print.h. Fix them. > > v3: Also fix armada, ite-it6505, imagination, msm, sti, vc4, and xe > > v2: Also fix ivpu and vmwgfx > > Reviewed-by: Andrzej Hajda > Acked-by: Maxime Ripard >

Re: [PATCH] drm/amd/display: re-indent dc_power_down_on_boot()

2024-04-25 Thread Dan Carpenter
On Wed, Apr 24, 2024 at 03:11:08PM +0200, Christian König wrote: > Am 24.04.24 um 13:41 schrieb Dan Carpenter: > > These lines are indented too far. Clean the whitespace. > > > > Signed-off-by: Dan Carpenter > > --- > > drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++ > > 1 file

[PATCH] drm/amd/display: Remove duplicate spl/dc_spl_types.h header

2024-04-25 Thread Jiapeng Chong
./drivers/gpu/drm/amd/display/dc/inc/hw/transform.h: spl/dc_spl_types.h is included more than once. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8884 Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 2 -- 1 file changed, 2

[PATCH][next] drm/amdgpu: Fix spelling mistake "PRORITY" -> "PRIORITY"

2024-04-25 Thread Colin Ian King
There are spelling mistakes in a literal string and enums, fix these. Currently there are no uses of the enums that got renamed in this fix. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c| 2 +- drivers/gpu/drm/amd/include/mes_api_def.h | 2 +-

Re: [PATCH] drm/amd/display: re-indent dc_power_down_on_boot()

2024-04-25 Thread Dan Carpenter
On Wed, Apr 24, 2024 at 03:33:11PM +0200, Christian König wrote: > Am 24.04.24 um 15:20 schrieb Dan Carpenter: > > On Wed, Apr 24, 2024 at 03:11:08PM +0200, Christian König wrote: > > > Am 24.04.24 um 13:41 schrieb Dan Carpenter: > > > > These lines are indented too far. Clean the whitespace. > >

[PATCH] drm/amd/display: re-indent dc_power_down_on_boot()

2024-04-25 Thread Dan Carpenter
These lines are indented too far. Clean the whitespace. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c

[PATCH][next] drm/amd/display: Fix spelling various spelling mistakes

2024-04-25 Thread Colin Ian King
There are various spelling mistakes in dml2_printf messages, fix them. Signed-off-by: Colin Ian King --- .../dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c | 6 +++--- .../display/dc/dml2/dml21/src/dml2_core/dml2_core_shared.c | 6 +++--- 2 files changed, 6 insertions(+), 6

Re: [RFC PATCH 10/18] drm/amdgpu: Don't add GTT to initial domains after failing to allocate VRAM

2024-04-25 Thread Christian König
Am 25.04.24 um 09:39 schrieb Friedrich Vock: On 25.04.24 08:25, Christian König wrote: Am 24.04.24 um 18:57 schrieb Friedrich Vock: This adds GTT to the "preferred domains" of this buffer object, which will also prevent any attempts at moving the buffer back to VRAM if there is space. If VRAM

Re: [RFC PATCH 10/18] drm/amdgpu: Don't add GTT to initial domains after failing to allocate VRAM

2024-04-25 Thread Friedrich Vock
On 25.04.24 08:25, Christian König wrote: Am 24.04.24 um 18:57 schrieb Friedrich Vock: This adds GTT to the "preferred domains" of this buffer object, which will also prevent any attempts at moving the buffer back to VRAM if there is space. If VRAM is full, GTT will already be chosen as a

Re: [RFC PATCH 16/18] drm/amdgpu: Implement SET_PRIORITY GEM op

2024-04-25 Thread Friedrich Vock
On 25.04.24 09:15, Christian König wrote: Am 25.04.24 um 09:06 schrieb Friedrich Vock: On 25.04.24 08:58, Christian König wrote: Am 25.04.24 um 08:46 schrieb Friedrich Vock: On 25.04.24 08:32, Christian König wrote: Am 24.04.24 um 18:57 schrieb Friedrich Vock: Used by userspace to adjust

RE: [PATCH Review 1/1] drm/amdgpu: Adjust XGMI WAFL ras enable bit

2024-04-25 Thread Yang, Stanley
[AMD Official Use Only - General] Thanks for reminding, the XGMI/WAFL caps is set on device without XGMI link, will notice PSP firmware team to fix. Regards, Stanley > -Original Message- > From: Zhang, Hawking > Sent: Thursday, April 25, 2024 3:26 PM > To: Yang, Stanley ;

RE: [PATCH Review 1/1] drm/amdgpu: Adjust XGMI WAFL ras enable bit

2024-04-25 Thread Zhang, Hawking
[AMD Official Use Only - General] Hmm... we do expect PSP report the XGMI/WAFL Caps. This is different from legacy RAS CAP check through atomfirmware. But if you found the XGMI/WAFL bits are not set properly in the new PSP interface, let's reach out to PSP firmware team for a fix. Regards,

[PATCH] drm/amdgpu: fix the warning about the expression (int)size - len

2024-04-25 Thread Jesse Zhang
Converting size from size_t to int may overflow. v2: keep reverse xmas tree order (Christian) Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c

Re: [PATCH V2] drm/amdgpu: fix the warning about the expression (int)size - len

2024-04-25 Thread Christian König
Am 25.04.24 um 09:11 schrieb Jesse Zhang: Converting size from size_t to int may overflow. v2: keep reverse xmas tree order (Christian) Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [RFC PATCH 16/18] drm/amdgpu: Implement SET_PRIORITY GEM op

2024-04-25 Thread Christian König
Am 25.04.24 um 09:06 schrieb Friedrich Vock: On 25.04.24 08:58, Christian König wrote: Am 25.04.24 um 08:46 schrieb Friedrich Vock: On 25.04.24 08:32, Christian König wrote: Am 24.04.24 um 18:57 schrieb Friedrich Vock: Used by userspace to adjust buffer priorities in response to changes in

[PATCH V2] drm/amdgpu: fix the warning about the expression (int)size - len

2024-04-25 Thread Jesse Zhang
Converting size from size_t to int may overflow. v2: keep reverse xmas tree order (Christian) Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c

[PATCH Review 1/1] drm/amdgpu: Adjust XGMI WAFL ras enable bit

2024-04-25 Thread Stanley . Yang
The way to get ras capability has changed for some asics, both of them need check XGMI physical nodes number to set XGMI WAFL ras enable bit. Signed-off-by: Stanley.Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

Re: [RFC PATCH 16/18] drm/amdgpu: Implement SET_PRIORITY GEM op

2024-04-25 Thread Friedrich Vock
On 25.04.24 08:58, Christian König wrote: Am 25.04.24 um 08:46 schrieb Friedrich Vock: On 25.04.24 08:32, Christian König wrote: Am 24.04.24 um 18:57 schrieb Friedrich Vock: Used by userspace to adjust buffer priorities in response to changes in application demand and memory pressure. Yeah,

Re: [PATCH v2] drm/amdgpu: Fix buffer size in gfx_v9_4_3_init_ cp_compute_microcode() and rlc_microcode()

2024-04-25 Thread Lazar, Lijo
On 4/25/2024 12:05 PM, Srinivasan Shanmugam wrote: > The function gfx_v9_4_3_init_microcode in gfx_v9_4_3.c was generating > about potential truncation of output when using the snprintf function. > The issue was due to the size of the buffer 'ucode_prefix' being too > small to accommodate the

[PATCH v2] drm/amdgpu: fix overflowed array index read warning

2024-04-25 Thread Tim Huang
From: Tim Huang Clear warning that cast operation might have overflowed. v2: keep reverse xmas tree order to declare "int r;" (Christian) Signed-off-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [RFC PATCH 16/18] drm/amdgpu: Implement SET_PRIORITY GEM op

2024-04-25 Thread Christian König
Am 25.04.24 um 08:46 schrieb Friedrich Vock: On 25.04.24 08:32, Christian König wrote: Am 24.04.24 um 18:57 schrieb Friedrich Vock: Used by userspace to adjust buffer priorities in response to changes in application demand and memory pressure. Yeah, that was discussed over and over again.

RE: [PATCH] drm/amdgpu: fix overflowed array index read warning

2024-04-25 Thread Huang, Tim
[AMD Official Use Only - General] -Original Message- From: Koenig, Christian Sent: Thursday, April 25, 2024 2:45 PM To: Huang, Tim ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: Re: [PATCH] drm/amdgpu: fix overflowed array index read warning Am 25.04.24 um 07:27

Re: [RFC PATCH 00/18] TTM interface for managing VRAM oversubscription

2024-04-25 Thread Christian König
In general: Yes please :) But are exercising a lot of ideas we have already thrown over board over the years. The general idea Marek and I have been working on for a while now is rather to make TTM aware of userspace "clients". In other words we should start with having a TTM structure in

Re: [RFC PATCH 16/18] drm/amdgpu: Implement SET_PRIORITY GEM op

2024-04-25 Thread Friedrich Vock
On 25.04.24 08:32, Christian König wrote: Am 24.04.24 um 18:57 schrieb Friedrich Vock: Used by userspace to adjust buffer priorities in response to changes in application demand and memory pressure. Yeah, that was discussed over and over again. One big design criteria is that we can't have

Re: [PATCH] drm/amdgpu: fix the warning about the expression (int)size - len

2024-04-25 Thread Christian König
Am 25.04.24 um 08:20 schrieb Jesse Zhang: Converting size from size_t to int may overflow. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c

Re: [PATCH] drm/amdgpu: fix overflowed array index read warning

2024-04-25 Thread Christian König
Am 25.04.24 um 07:27 schrieb Tim Huang: From: Tim Huang Clear warning that cast operation might have overflowed. Signed-off-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] drm/amdgpu: fix potential resource leak warning

2024-04-25 Thread Christian König
Am 25.04.24 um 05:33 schrieb Tim Huang: From: Tim Huang Clear resource leak warning that when the prepare fails, the allocated amdgpu job object will never be released. Signed-off-by: Tim Huang Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 5 + 1

Re: [RFC PATCH 08/18] drm/amdgpu: Don't try moving BOs to preferred domain before submit

2024-04-25 Thread Christian König
Am 24.04.24 um 18:56 schrieb Friedrich Vock: TTM now takes care of moving buffers to the best possible domain. Yeah, I've been planning to do this for a while as well. The problem is really that we need to keep the functionality. For example TTM currently doesn't have a concept of an

[PATCH v2] drm/amdgpu: Fix buffer size in gfx_v9_4_3_init_ cp_compute_microcode() and rlc_microcode()

2024-04-25 Thread Srinivasan Shanmugam
The function gfx_v9_4_3_init_microcode in gfx_v9_4_3.c was generating about potential truncation of output when using the snprintf function. The issue was due to the size of the buffer 'ucode_prefix' being too small to accommodate the maximum possible length of the string being written into it.

Re: [RFC PATCH 16/18] drm/amdgpu: Implement SET_PRIORITY GEM op

2024-04-25 Thread Christian König
Am 24.04.24 um 18:57 schrieb Friedrich Vock: Used by userspace to adjust buffer priorities in response to changes in application demand and memory pressure. Yeah, that was discussed over and over again. One big design criteria is that we can't have global priorities from userspace! The

Re: [RFC PATCH 13/18] drm/ttm: Implement ttm_bo_update_priority

2024-04-25 Thread Christian König
Am 24.04.24 um 18:57 schrieb Friedrich Vock: Used to dynamically adjust priorities of buffers at runtime, to react to changes in memory pressure/usage patterns. And another big NAK. TTM priorities are meant to be static based on in kernel decisions which are not exposed to userspace. In

Re: [RFC PATCH 12/18] drm/ttm: Do not evict BOs with higher priority

2024-04-25 Thread Christian König
Am 24.04.24 um 18:57 schrieb Friedrich Vock: This makes buffer eviction significantly more stable by avoiding ping-ponging caused by low-priority buffers evicting high-priority buffers and vice versa. And creates a deny of service for the whole system by fork() bombing. This is another very

Re: [RFC PATCH 10/18] drm/amdgpu: Don't add GTT to initial domains after failing to allocate VRAM

2024-04-25 Thread Christian König
Am 24.04.24 um 18:57 schrieb Friedrich Vock: This adds GTT to the "preferred domains" of this buffer object, which will also prevent any attempts at moving the buffer back to VRAM if there is space. If VRAM is full, GTT will already be chosen as a fallback. Big NAK to that one, this is

Re: [RFC PATCH 09/18] drm/amdgpu: Don't mark VRAM as a busy placement for VRAM|GTT resources

2024-04-25 Thread Christian König
Am 24.04.24 um 18:56 schrieb Friedrich Vock: We will never try evicting things from VRAM for these resources anyway. This affects TTM buffer uneviction logic, which would otherwise try to move these buffers into VRAM (clashing with VRAM-only allocations). You are working on outdated code. That

[PATCH] drm/amdgpu: fix the warning about the expression (int)size - len

2024-04-25 Thread Jesse Zhang
Converting size from size_t to int may overflow. Signed-off-by: Jesse Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c index

Re: [RFC PATCH 05/18] drm/ttm: Add option to evict no BOs in operation

2024-04-25 Thread Christian König
Am 24.04.24 um 18:56 schrieb Friedrich Vock: When undoing evictions because of decreased memory pressure, it makes no sense to try evicting other buffers. That duplicates some functionality. If a driver doesn't want eviction to happen it just needs to mark the desired placements as

Re: [RFC PATCH 02/18] drm/ttm: Add per-BO eviction tracking

2024-04-25 Thread Christian König
Am 24.04.24 um 18:56 schrieb Friedrich Vock: Make each buffer object aware of whether it has been evicted or not. That reverts some changes we made a couple of years ago. In general the idea is that eviction isn't something we need to reverse in TTM. Rather the driver gives the desired