Re: [PATCH] drm/amdgpu: fix incompatible types in conditional expression

2023-09-04 Thread Chiu, Solomon
[AMD Official Use Only - General] Looks good to me. Series is: Reviewed-by: Solomon Chiu From: Yu, Lang Sent: Monday, September 4, 2023 12:22 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Chiu, Solomon ; Yu, Lang ; kernel test robot Subje

[PATCH 10/11] drm/amdgpu: rework lock handling fro flush_tlb

2023-09-04 Thread Christian König
Instead of each implementation doing this more or less correctly move taking the reset lock at a higher level. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 9 + drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 6 +- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 5

[PATCH 07/11] drm/amdgpu: cleanup gmc_v10_0_flush_gpu_tlb_pasid

2023-09-04 Thread Christian König
The same PASID can be used by more than one VMID, reset each of them. Use the common KIQ handling. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 66 -- 1 file changed, 19 insertions(+), 47 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgp

[PATCH 05/11] drm/amdgpu: fix and cleanup gmc_v8_0_flush_gpu_tlb_pasid

2023-09-04 Thread Christian König
Testing for reset is pointless since the reset can start right after the test. Grab the reset semaphore instead. The same PASID can be used by more than once VMID, build a mask of VMIDs to reset instead of just restting the first one. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgp

[PATCH 11/11] drm/amdgpu: further move TLB hw workarounds a layer up

2023-09-04 Thread Christian König
For the PASID flushing we already handled that at a higher layer, apply those workarounds to the standard flush as well. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 19 +++ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 74 - 2 files change

[PATCH 09/11] drm/amdgpu: drop error return from flush_gpu_tlb_pasid

2023-09-04 Thread Christian König
That function never fails, drop the error return. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 7 --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 6 +++--- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 7 +++ drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 7 +++

[PATCH 08/11] drm/amdgpu: fix and cleanup gmc_v11_0_flush_gpu_tlb_pasid

2023-09-04 Thread Christian König
The same PASID can be used by more than one VMID, reset each of them. Use the common KIQ handling. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 63 -- 1 file changed, 19 insertions(+), 44 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgp

[PATCH 02/11] drm/amdgpu: rework gmc_v10_0_flush_gpu_tlb

2023-09-04 Thread Christian König
Move the SDMA workaround necessary for Navi 1x into a higher layer. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 48 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 5 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 3 + drivers/gpu/drm/amd/amdgpu/gmc_v10_0

[PATCH 04/11] drm/amdgpu: fix and cleanup gmc_v7_0_flush_gpu_tlb_pasid

2023-09-04 Thread Christian König
Testing for reset is pointless since the reset can start right after the test. Grab the reset semaphore instead. The same PASID can be used by more than once VMID, build a mask of VMIDs to reset instead of just restting the first one. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgp

[PATCH 06/11] drm/amdgpu: fix and cleanup gmc_v9_0_flush_gpu_tlb_pasid

2023-09-04 Thread Christian König
Testing for reset is pointless since the reset can start right after the test. The same PASID can be used by more than one VMID, reset each of them. Move the KIQ and all the workaround handling into common GMC code. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c |

[PATCH 03/11] drm/amdgpu: cleanup gmc_v11_0_flush_gpu_tlb

2023-09-04 Thread Christian König
Remove leftovers from copying this from the gmc v10 code. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 108 ++--- 1 file changed, 41 insertions(+), 67 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c b/drivers/gpu/drm/amd/amdgp

[PATCH 01/11] drm/amdgpu: fix and cleanup gmc_v9_0_flush_gpu_tlb

2023-09-04 Thread Christian König
The KIQ code path was ignoring the second flush. Also avoid long lines and re-calculating the register offsets over and over again. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 29 +-- 1 file changed, 18 insertions(+), 11 deletions(-) diff -

Rework flushing changes to the TLB

2023-09-04 Thread Christian König
Hi guys, as discussed internally the MES and KFD needs some form of TLB fence which signals when flushing VM updates out to the hardware is completed and resources can be freed. As prerequisite to this we need to rework all the different workarounds and approaches around TLB flushing to be at a h

Re: [RFC,drm-misc-next v4 3/9] drm/radeon: Implement .be_primary() callback

2023-09-04 Thread Christian König
Am 04.09.23 um 21:57 schrieb Sui Jingfeng: From: Sui Jingfeng On a machine with multiple GPUs, a Linux user has no control over which one is primary at boot time. Question is why is that useful? Should we give users the ability to control that? I don't see an use case for this. Regards, C

Re: [PATCH] drm/amd: Fix the flag setting code for interrupt request

2023-09-04 Thread Christian König
Am 04.09.23 um 08:05 schrieb Ma Jun: [1] Remove the irq flags setting code since pci_alloc_irq_vectors() handles these flags. [2] Free the msi vectors in case of error. Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 43 ++--- 1 file changed, 25 insert

Re: [PATCH] drm/amdgpu: calling address translation functions to simplify codes

2023-09-04 Thread Christian König
Am 04.09.23 um 10:18 schrieb Yifan Zhang: Use amdgpu_gmc_vram_pa to simplify codes. Signed-off-by: Yifan Zhang Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gfxhub_v11_5_0.c | 3 +-- drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0.c| 3 +-- drivers/gpu/drm/amd/amdgpu/gfxhub_v3

RE: [PATCH 3/3] drm/amdgpu: Add umc v12_0 ras functions

2023-09-04 Thread Zhou1, Tao
[AMD Official Use Only - General] The series is: Reviewed-by: Tao Zhou > -Original Message- > From: Li, Candice > Sent: Monday, September 4, 2023 3:20 PM > To: amd-gfx@lists.freedesktop.org > Cc: Li, Candice ; Zhou1, Tao > Subject: [PATCH 3/3] drm/amdgpu: Add umc v12_0 ras functions >

RE: [PATCH] drm/amdgpu: Restrict bootloader wait to SMUv13.0.6

2023-09-04 Thread Kamal, Asad
[AMD Official Use Only - General] Reviewed-by: Asad Kamal asad.ka...@amd.com Thanks & Regards Asad -Original Message- From: amd-gfx On Behalf Of Lijo Lazar Sent: Monday, September 4, 2023 6:32 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Ma, Le ; Kamal, Asad ; Zhang, H

[PATCH 3/3] Documentation/amdgpu: Modify pp_dpm_*clk details

2023-09-04 Thread Lijo Lazar
pp_dpm_*clk nodes also could show the frequencies when a clock is in 'sleep' state. Add documentation related to that. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c

[PATCH 1/3] drm/amd/pm: Fix clock reporting for SMUv13.0.6

2023-09-04 Thread Lijo Lazar
On SMU v13.0.6, effective clocks are reported by FW which won't exactly match with DPM level. Report the current clock based on the values matching closest to the effective clock. Also, when deep sleep is applied to a clock, report it with a special level "S:" as in sample clock levels below S: 19

[PATCH 2/3] drm/amd/pm:Fix GFX deep sleep clock reporting

2023-09-04 Thread Lijo Lazar
For SMU v13.0.6, keep GFX deep sleep clock reporting style consistent with that of other clocks. Sample format below. S: 78Mhz * 0: 600Mhz 1: 800Mhz Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Evan Quan --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 10 ++

[PATCH] drm/amdgpu: Restrict bootloader wait to SMUv13.0.6

2023-09-04 Thread Lijo Lazar
Restrict the wait for boot loader steady state only to SMUv13.0.6. For older SOCs, ASIC init has a longer wait period and that takes care. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/

Re: [PATCH] drm/amdgpu: Use min_t to replace min

2023-09-04 Thread Christian König
Am 03.09.23 um 08:52 schrieb Srinivasan Shanmugam: Use min_t to replace min, min_t is a bit fast because min use twice typeof. Well that is probably negligibly. The point is that using min_t is cleaner here since the min/max macros do a typecheck while min_t()/max_t() to an explicit type cast

Re: [PATCH] drm/amdgpu: Declare array with strings as pointers constant

2023-09-04 Thread Christian König
Am 03.09.23 um 08:05 schrieb Srinivasan Shanmugam: This warning is for the declaration of a static array, and it is recommended to declare it as type "static const char * const" instead of "static const char *". an array pointer declared as type "static const char *" can point to a different cha

[PATCH] drm/amdgpu: calling address translation functions to simplify codes

2023-09-04 Thread Yifan Zhang
Use amdgpu_gmc_vram_pa to simplify codes. Signed-off-by: Yifan Zhang --- drivers/gpu/drm/amd/amdgpu/gfxhub_v11_5_0.c | 3 +-- drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0.c| 3 +-- drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0_3.c | 3 +-- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 3 +-- drivers/gpu

Re: [Intel-gfx] [PATCH 0/4] drm/amd/display: stop using drm_edid_override_connector_update()

2023-09-04 Thread Daniel Vetter
On Fri, 1 Sept 2023 at 21:00, Alex Deucher wrote: > > On Thu, Aug 31, 2023 at 6:01 PM Alex Hung wrote: > > > > > > > > On 2023-08-30 01:29, Jani Nikula wrote: > > > On Tue, 29 Aug 2023, Alex Hung wrote: > > >> On 2023-08-29 11:03, Jani Nikula wrote: > > >>> On Tue, 29 Aug 2023, Jani Nikula wrot

RE: [PATCH 1/3] drm/amdgpu: Add RREG64_PCIE_EXT/WREG64_PCIE_EXT functions

2023-09-04 Thread Zhang, Hawking
[AMD Official Use Only - General] Please split the change in amdgpu_device_indirect_rreg|wreg_ext to another patch. With above addressed, the series is Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Candice Li Sent: Monday, September 4, 202

Re: [RFT PATCH 14/15] drm/radeon: Call drm_helper_force_disable_all() at shutdown/remove time

2023-09-04 Thread Maxime Ripard
On Fri, 1 Sep 2023 16:41:25 -0700, Douglas Anderson wrote: > Based on grepping through the source code, this driver appears to be > missing a call to drm_atomic_helper_shutdown(), or in this case the > non-atomic equivalent drm_helper_force_disable_all(), at system > shutdown time and at driver rem

Re: [PATCH AUTOSEL 5.10 13/22] drm/amdgpu: install stub fence into potential unused fence pointers

2023-09-04 Thread Eddie Chapman
On 01/09/2023 07:02, Christian König wrote: Am 31.08.23 um 20:55 schrieb Chia-I Wu: On Thu, Aug 31, 2023 at 7:01 AM Greg KH wrote: On Thu, Aug 31, 2023 at 03:26:28PM +0200, Christian König wrote: Am 31.08.23 um 12:56 schrieb Greg KH: On Thu, Aug 31, 2023 at 12:27:27PM +0200, Christian König

[PATCH 3/3] drm/amdgpu: Add umc v12_0 ras functions

2023-09-04 Thread Candice Li
Add umc v12_0 ras error querying. Signed-off-by: Candice Li Reviewed-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/Makefile| 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 16 +- drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 256 + drivers/gpu/drm/amd/amdgpu/umc_v12_0.h

[PATCH 2/3] drm/amd: Add umc v12_0_0 ip headers

2023-09-04 Thread Candice Li
Add umc v12_0_0 ip headers. Signed-off-by: Candice Li Reviewed-by: Tao Zhou --- .../include/asic_reg/umc/umc_12_0_0_offset.h | 33 +++ .../include/asic_reg/umc/umc_12_0_0_sh_mask.h | 95 +++ 2 files changed, 128 insertions(+) create mode 100644 drivers/gpu/drm/amd/include/

[PATCH 1/3] drm/amdgpu: Add RREG64_PCIE_EXT/WREG64_PCIE_EXT functions

2023-09-04 Thread Candice Li
1. Add 64bits register access support on register whose address is greater than 32bits. 2. Update RREG32_PCIE_EXT/WREG32_PCIE_EXT. Signed-off-by: Candice Li Reviewed-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 11 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 119 ++