RE: [PATCH 3/3] drm/amdgpu: Centralize ras cap query to amdgpu_ras_check_supported

2024-01-02 Thread Zhou1, Tao
[AMD Official Use Only - General] The series is: Reviewed-by: Tao Zhou > -Original Message- > From: Hawking Zhang > Sent: Tuesday, January 2, 2024 10:16 PM > To: amd-gfx@lists.freedesktop.org; Zhou1, Tao ; Yang, > Stanley ; Wang, Yang(Kevin) > ; Chai, Thomas ; Li, > Candice > Cc: Zhan

RE: [PATCH 2/5] drm/amdgpu: Init pcie_index/data address as fallback

2024-01-02 Thread Zhang, Hawking
[AMD Official Use Only - General] Sure, will do in v2 Regards, Hawking -Original Message- From: Alex Deucher Sent: Wednesday, January 3, 2024 03:44 To: Zhang, Hawking Cc: amd-gfx@lists.freedesktop.org; Zhou1, Tao ; Yang, Stanley ; Wang, Yang(Kevin) ; Chai, Thomas ; Li, Candice ; Deuc

RE: [PATCH 4/5] drm/amdgpu: Query boot status if discovery failed

2024-01-02 Thread Zhang, Hawking
[AMD Official Use Only - General] Yes, it is. Regards, Hawking From: Deucher, Alexander Sent: Wednesday, January 3, 2024 03:45 To: Zhang, Hawking ; amd-gfx@lists.freedesktop.org; Zhou1, Tao ; Yang, Stanley ; Wang, Yang(Kevin) ; Chai, Thomas ; Li, Candice Cc: Lazar, Lijo ; Ma, Le Subject: R

RE: [PATCH 4/5] drm/amdgpu: Query boot status if discovery failed

2024-01-02 Thread Zhang, Hawking
[AMD Official Use Only - General] RE - I'm not sure about hard-coding 4 instances here. The code you dropped in patch 1 was using adev->aid_mask. But I guess that's not even initialized correctly if IP discovery failed. Will this work correctly on the APU version? Yes aid_mask is not initialize

Re: [PATCH v2] drm/amdkfd: Fix lock dependency warning

2024-01-02 Thread Philip Yang
On 2024-01-02 15:08, Felix Kuehling wrote: == WARNING: possible circular locking dependency detected 6.5.0-kfd-fkuehlin #276 Not tainted -- kworker/8:2/267

Re: [PATCH 2/2] drm/amdgpu: skip gpu_info fw loading on navi12

2024-01-02 Thread Deucher, Alexander
[AMD Official Use Only - General] Ping on this series? Alex From: Deucher, Alexander Sent: Thursday, December 21, 2023 1:11 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH 2/2] drm/amdgpu: skip gpu_info fw loading on navi12 It's no

[PATCH] drm/amdgpu: make a correction on comment

2024-01-02 Thread James Zhu
Current AMDGPU_VM_RESERVED_VRAM is updated to 8M. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h index b6cd565562ad..b788067b9

Re: [PATCH] drm/amdgpu: Remove unreachable code in 'atom_skip_src_int()'

2024-01-02 Thread Deucher, Alexander
[Public] Reviewed-by: Alex Deucher From: SHANMUGAM, SRINIVASAN Sent: Friday, December 29, 2023 4:43 AM To: Deucher, Alexander ; Koenig, Christian ; Kuehling, Felix Cc: amd-gfx@lists.freedesktop.org ; SHANMUGAM, SRINIVASAN Subject: [PATCH] drm/amdgpu: Remove u

Re: [PATCH v3 23/24] drm/amdkfd: set debug trap bit when enabling PC Sampling

2024-01-02 Thread James Zhu
On 2023-12-15 10:59, James Zhu wrote: From: David Yat Sin We need the SPI_GDBG_PER_VMID_CNTL.TRAP_EN bit to be set during PC Sampling so that the TTMP registers are valid inside the sampling data. runtime_info.ttmp_setup will be cleared when the user application does the AMDKFD_IOC_RUNTIME_ENAB

[PATCH v2] drm/amdkfd: Fix lock dependency warning

2024-01-02 Thread Felix Kuehling
== WARNING: possible circular locking dependency detected 6.5.0-kfd-fkuehlin #276 Not tainted -- kworker/8:2/2676 is trying to acquire lock: 9435aae95c88 ((work_completion)(&svm_bo->eviction_

Re: [PATCH 4/5] drm/amdgpu: Query boot status if discovery failed

2024-01-02 Thread Deucher, Alexander
[AMD Official Use Only - General] Is mmIP_DISCOVERY_VERSION at the same offset across ASIC families? Alex From: Hawking Zhang Sent: Monday, January 1, 2024 10:43 PM To: amd-gfx@lists.freedesktop.org ; Zhou1, Tao ; Yang, Stanley ; Wang, Yang(Kevin) ; Chai, Thom

Re: [PATCH 2/5] drm/amdgpu: Init pcie_index/data address as fallback

2024-01-02 Thread Alex Deucher
On Mon, Jan 1, 2024 at 10:50 PM Hawking Zhang wrote: > > To allow using this helper for indirect access when > nbio funcs is not available. For instance, in ip > discovery phase. > > Signed-off-by: Hawking Zhang > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 20 +++- > 1 fi

Re: [PATCH] drm/amdkfd: fixes for HMM mem allocation

2024-01-02 Thread Felix Kuehling
On 2023-12-31 09:37, Dafna Hirschfeld wrote: Few fixes to amdkfd and the doc of devm_request_free_mem_region. Signed-off-by: Dafna Hirschfeld --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 6 +++--- kernel/resource.c| 2 +- 2 files changed, 4 insertions(+), 4 delet

Re: [PATCH] drm/amd/display: Fix sending VSC (+ colorimetry) packets for DP/eDP displays without PSR

2024-01-02 Thread Xaver Hugl
Hi, I tested the patch and it fixes the issue for me too. Consider it Tested-By Xaver Hugl - Xaver Am Mo., 1. Jan. 2024 um 22:37 Uhr schrieb Joshua Ashton : > From the issue: > > ``` > Thank you for for fixing this! > I built a custom kernel with this patch on the fedora rawhide kernel > (6.7

Re: [PATCH] drm/amdgpu: change vm->task_info handling

2024-01-02 Thread Felix Kuehling
On 2024-01-02 06:12, Shashank Sharma wrote: drm/amdgpu: change vm->task_info handling This patch changes the handling and lifecycle of vm->task_info object. The major changes are: - vm->task_info is a dynamically allocated ptr now, and its uasge is reference counted. - introducing two new h

Re: [PATCH 4/5] drm/amdgpu: Query boot status if discovery failed

2024-01-02 Thread Felix Kuehling
On 2024-01-02 09:07, Hawking Zhang wrote: Check and report boot status if discovery failed. Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

[PATCH 4/4] drm/amdgpu: Do not program VM_L2_CNTL under SRIOV

2024-01-02 Thread Victor Lu
VM_L2_CNTL* should not be programmed on driver unload under SRIOV. These regs are skipped during SRIOV driver init. Signed-off-by: Victor Lu --- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfxh

[PATCH 3/4] drm/amdgpu: Use correct SRIOV macro for gmc_v9_0_vm_fault_interrupt_state

2024-01-02 Thread Victor Lu
Under SRIOV, programming to VM_CONTEXT*_CNTL regs failed because the current macro does not pass through the correct xcc instance. Use the *REG32_XCC macro in this case. The behaviour without SRIOV is the same. Signed-off-by: Victor Lu --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 1 f

[PATCH 2/4] drm/amdgpu: Do not program SQ_TIMEOUT_CONFIG in SRIOV

2024-01-02 Thread Victor Lu
VF should not program this register. Signed-off-by: Victor Lu --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c index 00b21ece081f..30cc155f20d4 100644 --- a/driver

[PATCH 1/4] drm/amdgpu: Improve error checking in amdgpu_virt_rlcg_reg_rw

2024-01-02 Thread Victor Lu
The current error detection only looks for a timeout. This should be changed to also check scratch_reg1 for any errors returned from RLCG. Also add a new error value. Signed-off-by: Victor Lu --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 8 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 2

Re: [PATCH v2] drm/amdkfd: Confirm list is non-empty before utilizing list_first_entry in kfd_topology.c

2024-01-02 Thread Felix Kuehling
On 2023-12-22 06:53, Srinivasan Shanmugam wrote: Before using list_first_entry, make sure to check that list is not empty, if list is empty return -ENODATA. Fixes the below: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1347 kfd_create_indirect_link_prop() warn: can 'gpu_link' even be NUL

Re: [PATCH] drm/amdkfd: Fix lock dependency warning

2024-01-02 Thread Felix Kuehling
On 2023-12-28 18:11, Philip Yang wrote: On 2023-12-21 15:40, Felix Kuehling wrote: == WARNING: possible circular locking dependency detected 6.5.0-kfd-fkuehlin #276 Not tainted -- kworker/

Re: [PATCH] drm/amdkfd: Fix iterator used outside loop in 'kfd_add_peer_prop()'

2024-01-02 Thread Felix Kuehling
On 2023-12-29 04:43, Srinivasan Shanmugam wrote: Fix the following about iterator use: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1456 kfd_add_peer_prop() warn: iterator used outside loop: 'iolink3' Cc: Felix Kuehling Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Sh

Re: [PATCH v3] drm/amdkfd: Prefer kernel data types u8, u16, u32, u64 in amdkfd/kfd_priv.h

2024-01-02 Thread Felix Kuehling
On 2023-12-29 06:03, Srinivasan Shanmugam wrote: Fix the following checks reported by checkpatch: CHECK: Prefer kernel type 'u8' over 'uint8_t' CHECK: Prefer kernel type 'u16' over 'uint16_t' CHECK: Prefer kernel type 'u64' over 'uint64_t' CHECK: Prefer kernel type 'u32' over 'uint32_t' This

Re: [PATCH] drm/amdgpu: Drop 'fence' check in 'to_amdgpu_amdkfd_fence()'

2024-01-02 Thread Felix Kuehling
On 2023-12-29 10:12, Srinivasan Shanmugam wrote: Return value of container_of(...) can't be null, so null check is not required for 'fence'. Hence drop its NULL check. Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c:93 to_amdgpu_amdkfd_fence() warn: can 'fence' even be NULL?

[PATCH v2 2/3] drm/amdgpu: Query ras capablity from psp v2

2024-01-02 Thread Hawking Zhang
Instead of traditional atomfirmware interfaces for RAS capability, host driver can query ras capability from psp starting from psp v13_0_6. v2: drop redundant local variable from get_ras_capability. Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 10 ++ driver

[PATCH 3/3] drm/amdgpu: Centralize ras cap query to amdgpu_ras_check_supported

2024-01-02 Thread Hawking Zhang
Move ras capablity check to amdgpu_ras_check_supported. Driver will query ras capablity through psp interace, or vbios interface, or specific ip callbacks. Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 170 +--- 1 file changed, 93 insertions(+), 7

[PATCH 1/3] drm/amdgpu: Align ras block enum with firmware

2024-01-02 Thread Hawking Zhang
Driver and firmware share the same ras block enum. Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h index 5785b705c692..8b053602c5ca 10

[PATCH] drm/amd/display: dcn35_hwseq: use common comment to prevent kernel-doc warnings

2024-01-02 Thread Randy Dunlap
Change non-kernel-doc comments to use "/*" to prevent warnings from scripts/kernel-doc. dcn35_hwseq.c:1124: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * power down sequence dcn35_hwseq.c:1124: warning: missing ini

[PATCH] drm/amdkfd: fixes for HMM mem allocation

2024-01-02 Thread Dafna Hirschfeld
Few fixes to amdkfd and the doc of devm_request_free_mem_region. Signed-off-by: Dafna Hirschfeld --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 6 +++--- kernel/resource.c| 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd

[PATCH v2 3/5] drm/amdgpu: Add ras helper to query boot errors v2

2024-01-02 Thread Hawking Zhang
Add ras helper function to query boot time gpu errors. v2: use aqua_vanjaram smn addressing pattern Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 95 + drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 1

[PATCH 5/5] drm/amdgpu: Query boot status if boot failed

2024-01-02 Thread Hawking Zhang
Check and report firmware boot status if it doesn't reach steady status. Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c b/drivers/gpu/drm/amd/amdgpu/ps

[PATCH 4/5] drm/amdgpu: Query boot status if discovery failed

2024-01-02 Thread Hawking Zhang
Check and report boot status if discovery failed. Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

[PATCH 2/5] drm/amdgpu: Init pcie_index/data address as fallback

2024-01-02 Thread Hawking Zhang
To allow using this helper for indirect access when nbio funcs is not available. For instance, in ip discovery phase. Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/

[PATCH 1/5] drm/amdgpu: drop psp v13 query_boot_status implementation

2024-01-02 Thread Hawking Zhang
Will replace it with new implementation to cover boot fails in ip discovery phase. Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 - drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c| 15 - drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h| 4 -- drivers/gpu/drm/amd/am

[PATCH] drm/amdgpu: change vm->task_info handling

2024-01-02 Thread Shashank Sharma
drm/amdgpu: change vm->task_info handling This patch changes the handling and lifecycle of vm->task_info object. The major changes are: - vm->task_info is a dynamically allocated ptr now, and its uasge is reference counted. - introducing two new helper funcs for task_info lifecycle management

RE: [PATCH 2/3] drm/amdgpu: Query ras capablity from psp

2024-01-02 Thread Zhang, Hawking
[AMD Official Use Only - General] Oh, that's good point. I guess Kevin mentioned the same thing. Yes. Returning directly is reasonable to me. Regards, Hawking -Original Message- From: Zhou1, Tao Sent: Tuesday, January 2, 2024 16:49 To: Zhang, Hawking ; Wang, Yang(Kevin) ; amd-gfx@list

RE: [PATCH 3/3] drm/amdgpu: Replace DRM_* with dev_* in amdgpu_psp.c

2024-01-02 Thread Zhou1, Tao
[AMD Official Use Only - General] The series is: Reviewed-by: Tao Zhou > -Original Message- > From: amd-gfx On Behalf Of Hawking > Zhang > Sent: Tuesday, January 2, 2024 11:45 AM > To: amd-gfx@lists.freedesktop.org; Zhou1, Tao ; Yang, > Stanley ; Wang, Yang(Kevin) > ; Chai, Thomas ; Li

RE: [PATCH 3/3] drm/amdgpu: Centralize ras cap query to amdgpu_ras_check_supported

2024-01-02 Thread Zhou1, Tao
[AMD Official Use Only - General] The series is: Reviewed-by: Tao Zhou > -Original Message- > From: amd-gfx On Behalf Of Hawking > Zhang > Sent: Tuesday, January 2, 2024 11:45 AM > To: amd-gfx@lists.freedesktop.org; Zhou1, Tao ; Yang, > Stanley ; Wang, Yang(Kevin) > ; Chai, Thomas ; Li

RE: [PATCH 2/3] drm/amdgpu: Query ras capablity from psp

2024-01-02 Thread Zhou1, Tao
[AMD Official Use Only - General] > -Original Message- > From: Zhang, Hawking > Sent: Tuesday, January 2, 2024 1:38 PM > To: Wang, Yang(Kevin) ; amd- > g...@lists.freedesktop.org; Zhou1, Tao ; Yang, Stanley > ; Chai, Thomas ; Li, Candice > > Cc: Deucher, Alexander ; Lazar, Lijo > ; Ma, L