Re: [PATCH v3 1/2] drm/amdgpu: Acquire ttm locks for dmaunmap

2023-10-24 Thread Christian König
Am 24.10.23 um 21:20 schrieb David Francis: dmaunmap can call ttm_bo_validate, which expects the ttm dma_resv to be held. Well first of all the dma_resv object isn't related to TTM. Acquire the locks in amdgpu_amdkfd_gpuvm_dmaunmap_mem. Because the dmaunmap step can now fail, two new number

Re: [PATCH] drm/amdgpu: move buffer funcs setting up a level (v2)

2023-10-24 Thread Christian König
Am 25.10.23 um 06:24 schrieb Luben Tuikov: From: Alex Deucher Rather than doing this in the IP code for the SDMA paging engine, move it up to the core device level init level. This should fix the scheduler init ordering. v2: Fix checkpatch parens complaint; long lines. (Luben) Signed-off-by:

[PATCH] drm/amdgpu: move buffer funcs setting up a level (v2)

2023-10-24 Thread Luben Tuikov
From: Alex Deucher Rather than doing this in the IP code for the SDMA paging engine, move it up to the core device level init level. This should fix the scheduler init ordering. v2: Fix checkpatch parens complaint; long lines. (Luben) Signed-off-by: Alex Deucher Tested-by: Luben Tuikov --- d

RE: [PATCH] drm/amdgpu: check RAS supported first in ras_reset_error_count

2023-10-24 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] Reviewed-by: Yang Wang Best Regards, Kevin -Original Message- From: amd-gfx On Behalf Of Tao Zhou Sent: Wednesday, October 25, 2023 11:59 AM To: amd-gfx@lists.freedesktop.org Cc: Zhou1, Tao Subject: [PATCH] drm/amdgpu: check RAS supported first in ras

[PATCH] drm/amdgpu: check RAS supported first in ras_reset_error_count

2023-10-24 Thread Tao Zhou
Not all platforms support RAS. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index c71321edf50b..a6cff4a31c54 10064

RE: [PATCH v2] drm/amd/pm: fix the high voltage and temperature issue

2023-10-24 Thread Feng, Kenneth
[AMD Official Use Only - General] Sorry that I forgot another change in this V2. Please ignore this one. Thanks. -Original Message- From: Kenneth Feng Sent: Wednesday, October 25, 2023 11:51 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Feng, Kenneth Subject: [PATCH v2

[PATCH v2] drm/amd/pm: fix the high voltage and temperature issue

2023-10-24 Thread Kenneth Feng
fix the high voltage and temperature issue after the driver is unloaded on smu 13.0.0, smu 13.0.7 and smu 13.0.10 v2 - fix the code format and make sure it is used on the unload case only. Signed-off-by: Kenneth Feng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 36 +++ dr

Re: [PATCH] drm/amd check num of link levels when update pcie param

2023-10-24 Thread Chen, JingWen (Wayne)
Acked-by: Jingwen Chen Best Regards, JingWen Chen On 2023/10/19 17:46, Lin.Cao wrote: In SR-IOV environment, the value of pcie_table->num_of_link_levels will be 0, and num_of_levels - 1 will cause array index out of bounds Signed-off-by: Lin.Cao --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v

RE: [PATCH v2] drm/amd/amdgpu: fix the GPU power print error in pm info

2023-10-24 Thread Zhang, Yifan
[Public] This patch is: Reviewed-by: Yifan Zhang -Original Message- From: Ma, Li Sent: Wednesday, October 25, 2023 10:31 AM To: amd-gfx@lists.freedesktop.org; Zhang, Yifan Cc: Deucher, Alexander ; Feng, Kenneth ; StDenis, Tom ; Ma, Li Subject: [PATCH v2] drm/amd/amdgpu: fix the GPU

[PATCH v2] drm/amd/amdgpu: fix the GPU power print error in pm info

2023-10-24 Thread Li Ma
Modify the print format of the fractional part to avoid display error. Signed-off-by: Li Ma --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c index 358bb5e485f2..

RE: [PATCH] drm/amd/amdgpu: fix the GPU power print error in pm info

2023-10-24 Thread Ma, Li
[AMD Official Use Only - General] Hi Yifan, Got it. This is the better modification. I will resend patch. Best Regards, Ma,Li -Original Message- From: Zhang, Yifan Sent: Wednesday, October 25, 2023 9:26 AM To: Ma, Li ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Feng, Kenneth

RE: [PATCH v2] drm/amd/pm: call smu_cmn_get_smc_version in is_mode1_reset_supported.

2023-10-24 Thread Li, Candice
[AMD Official Use Only - General] Reviewed-by: Candice Li Thanks, Candice -Original Message- From: Zhang, Yifan Sent: Wednesday, October 25, 2023 9:40 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Koenig, Christian ; Feng, Kenneth ; Li, Candice ; Zhang, Yifan Subje

[PATCH v2] drm/amd/pm: call smu_cmn_get_smc_version in is_mode1_reset_supported.

2023-10-24 Thread Yifan Zhang
is_mode1_reset_supported may be called before smu init, when smu_context is unitialized in driver load/unload test. Call smu_cmn_get_smc_version explicitly in is_mode1_reset_supported. v2: apply to aldebaran in case is_mode1_reset_supported will be uncommented (Candice Li) Fixes: 5fe5098c64d9 ("d

RE: [PATCH] drm/amd/amdgpu: fix the GPU power print error in pm info

2023-10-24 Thread Zhang, Yifan
[AMD Official Use Only - General] I see your point. How about this one ? --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c @@ -4290,7 +4290,7 @@ static int amdgpu_debugfs_pm_info_pp(struct seq_file *m, struct amdgpu_device *a seq_printf(m, "\t%u mV

Re: [PATCH] drm/amdgpu: Initialize schedulers before using them

2023-10-24 Thread Luben Tuikov
On 2023-10-24 10:46, Alex Deucher wrote: > On Tue, Oct 24, 2023 at 6:14 AM Christian König > wrote: >> >> [SNIP] >>> Let me take a closer look first >> >> I think I've figured out why this isn't working as expected. It started >> with this patch here: >> >> commit 5fd8518d187ed03403a4d4f7f56f52c00

[PATCH v8 6/6] amd/display: indicate support for atomic async page-flips on DC

2023-10-24 Thread André Almeida
From: Simon Ser amdgpu_dm_commit_planes() already sets the flip_immediate flag for async page-flips. This flag is used to set the UNP_FLIP_CONTROL register. Thus, no additional change is required to handle async page-flips with the atomic uAPI. Signed-off-by: Simon Ser Reviewed-by: André Almeid

[PATCH v8 5/6] drm/doc: Define KMS atomic state set

2023-10-24 Thread André Almeida
From: Pekka Paalanen Specify how the atomic state is maintained between userspace and kernel, plus the special case for async flips. Signed-off-by: Pekka Paalanen Signed-off-by: André Almeida --- v8: - no changes v7: - add a note that drivers can make exceptions for ad-hoc prop changes - add a

[PATCH v8 4/6] drm: Refuse to async flip with atomic prop changes

2023-10-24 Thread André Almeida
Given that prop changes may lead to modesetting, which would defeat the fast path of the async flip, refuse any atomic prop change for async flips in atomic API. The only exception is the framebuffer ID to flip to. Currently the only plane type supported is the primary one. Reviewed-by: Simon Ser

[PATCH v8 3/6] drm: introduce drm_mode_config.atomic_async_page_flip_not_supported

2023-10-24 Thread André Almeida
From: Simon Ser This new field indicates whether the driver has the necessary logic to support async page-flips via the atomic uAPI. This is leveraged by the next commit to allow user-space to use this functionality. All atomic drivers setting drm_mode_config.async_page_flip are updated to also

[PATCH v8 2/6] drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP

2023-10-24 Thread André Almeida
From: Simon Ser This new kernel capability indicates whether async page-flips are supported via the atomic uAPI. DRM clients can use it to check for support before feeding DRM_MODE_PAGE_FLIP_ASYNC to the kernel. Make it clear that DRM_CAP_ASYNC_PAGE_FLIP is for legacy uAPI only. Signed-off-by:

[PATCH v8 1/6] drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits

2023-10-24 Thread André Almeida
From: Simon Ser If the driver supports it, allow user-space to supply the DRM_MODE_PAGE_FLIP_ASYNC flag to request an async page-flip. Set drm_crtc_state.async_flip accordingly. Document that drivers will reject atomic commits if an async flip isn't possible. This allows user-space to fall back

[PATCH v8 0/6] drm: Add support for atomic async page-flip

2023-10-24 Thread André Almeida
Hi, This work from me and Simon adds support for DRM_MODE_PAGE_FLIP_ASYNC through the atomic API. This feature is already available via the legacy API. The use case is to be able to present a new frame immediately (or as soon as possible), even if after missing a vblank. This might result in teari

Re: [PATCH v3] drm/amdgpu: Add EXT_COHERENT support for APU and NUMA systems

2023-10-24 Thread Felix Kuehling
On 2023-10-24 15:08, David Francis wrote: On gfx943 APU, EXT_COHERENT should give MTYPE_CC for local and MTYPE_UC for nonlocal memory. On NUMA systems, local memory gets the local mtype, set by an override callback. If EXT_COHERENT is set, memory will be set as MTYPE_UC by default, with local

Re: [PATCH v3 2/2] drm/amdgpu: Permit PCIe transfer over links with XGMI

2023-10-24 Thread Felix Kuehling
On 2023-10-24 15:20, David Francis wrote: When the CPU is XGMI connected, the PCIe links should not be enumerated for topology purposes. However, PCIe transfer should still be a valid option for remote doorbells and MMIO mappings. Move the XGMI connection check out of the shared helper functio

Re: [PATCH v3 1/2] drm/amdgpu: Acquire ttm locks for dmaunmap

2023-10-24 Thread Felix Kuehling
On 2023-10-24 15:20, David Francis wrote: dmaunmap can call ttm_bo_validate, which expects the ttm dma_resv to be held. Acquire the locks in amdgpu_amdkfd_gpuvm_dmaunmap_mem. Because the dmaunmap step can now fail, two new numbers need to be tracked. n_dmaunmap_success tracks the number of devi

Re: [pull] amdgpu, amdkfd drm-next-6.7

2023-10-24 Thread Alex Deucher
On Fri, Oct 20, 2023 at 3:51 PM Alex Deucher wrote: > > Hi Dave, Sima, > > More updates for 6.7. Mostly bug fixes. > > The following changes since commit 27442758e9b4e083bef3f164a1739475c01f3202: > > Merge tag 'amd-drm-next-6.7-2023-10-13' of > https://gitlab.freedesktop.org/agd5f/linux into d

[PATCH v3 2/2] drm/amdgpu: Permit PCIe transfer over links with XGMI

2023-10-24 Thread David Francis
When the CPU is XGMI connected, the PCIe links should not be enumerated for topology purposes. However, PCIe transfer should still be a valid option for remote doorbells and MMIO mappings. Move the XGMI connection check out of the shared helper function amdgpu_device_is_peer_accessible and into th

[PATCH v3 1/2] drm/amdgpu: Acquire ttm locks for dmaunmap

2023-10-24 Thread David Francis
dmaunmap can call ttm_bo_validate, which expects the ttm dma_resv to be held. Acquire the locks in amdgpu_amdkfd_gpuvm_dmaunmap_mem. Because the dmaunmap step can now fail, two new numbers need to be tracked. n_dmaunmap_success tracks the number of devices that have completed dmaunmap. If a devic

[PATCH v3] drm/amdgpu: Add EXT_COHERENT support for APU and NUMA systems

2023-10-24 Thread David Francis
On gfx943 APU, EXT_COHERENT should give MTYPE_CC for local and MTYPE_UC for nonlocal memory. On NUMA systems, local memory gets the local mtype, set by an override callback. If EXT_COHERENT is set, memory will be set as MTYPE_UC by default, with local memory MTYPE_CC. Add an option in the overrid

[PATCH] drm/amd/display: avoid variable reinitialization

2023-10-24 Thread Bragatheswaran Manickavel
The member variable enable_hpo_pg_support is already initialized and hence the reinitialization instruction can be removed. Issue identified using the doubleinit.cocci Coccinelle semantic patch script. Signed-off-by: Bragatheswaran Manickavel --- drivers/gpu/drm/amd/display/dc/dcn35/dcn35_reso

Re: [PATCH] drm/amd/amdgpu: avoid to disable gfxhub interrupt when driver is unloaded

2023-10-24 Thread Deucher, Alexander
[Public] Reviewed-by: Alex Deucher From: Kenneth Feng Sent: Monday, October 23, 2023 11:32 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Feng, Kenneth Subject: [PATCH] drm/amd/amdgpu: avoid to disable gfxhub interrupt when driver is unloaded

Re: [PATCH] drm/amd/pm: call smu_cmn_get_smc_version in is_mode1_reset_supported.

2023-10-24 Thread Deucher, Alexander
[Public] Acked-by: Alex Deucher From: Zhang, Yifan Sent: Tuesday, October 24, 2023 9:41 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Koenig, Christian ; Li, Candice ; Feng, Kenneth ; Zhang, Yifan Subject: [PATCH] drm/amd/pm: call smu_cmn_get_

RE: [PATCH] drm/amd/amdgpu: fix the GPU power print error in pm info

2023-10-24 Thread Ma, Li
[AMD Official Use Only - General] -Original Message- From: Zhang, Yifan Sent: Tuesday, October 24, 2023 10:29 PM To: Ma, Li ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Feng, Kenneth ; StDenis, Tom Subject: RE: [PATCH] drm/amd/amdgpu: fix the GPU power print error in pm info

[PATCH v2 3/3] drm/amdgpu: optimize RLC powerdown notification on Vangogh

2023-10-24 Thread Perry Yuan
The smu needs to get the rlc power down message to sync the rlc state with smu, the rlc state updating message need to be sent at while smu begin suspend sequence , otherwise SMU will crash while RLC state is not notified by driver, and rlc state probally changed after that notification, so it need

[PATCH v2 2/3] drm/amdgpu: avoid sending csib command when system resumes from S3

2023-10-24 Thread Perry Yuan
Previously the CSIB command pocket was sent to GFX block while amdgpu driver loading or S3 resuming time all the time. As the CP protocol required, the CSIB is not needed to send again while GC is not powered down while resuming from aborted S3 suspend sequence. PREAMBLE_CNTL packet coming in the

[PATCH v2 1/3] drm/amdgpu: ungate power gating when system suspend

2023-10-24 Thread Perry Yuan
[Why] During suspend, if GFX DPM is enabled and GFXOFF feature is enabled the system may get hung. So, it is suggested to disable GFXOFF feature during suspend and enable it after resume. [How] Update the code to disable GFXOFF feature during suspend and enable it after resume. [ 311.396526] amd

RE: [PATCH 1/3] drm/amdgpu: ungate power gating when system suspend

2023-10-24 Thread Yuan, Perry
[AMD Official Use Only - General] Hi Kevin, Kenneth, Thanks for the review and ack, will pick it up in v2. Regards. Perry > -Original Message- > From: Wang, Yang(Kevin) > Sent: Tuesday, October 24, 2023 4:15 PM > To: Feng, Kenneth ; Yuan, Perry > ; Zhang, Yifan ; > Limonciello, Mario

Re: [PATCH] drm/amdgpu: Initialize schedulers before using them

2023-10-24 Thread Alex Deucher
On Tue, Oct 24, 2023 at 6:14 AM Christian König wrote: > > [SNIP] > > Let me take a closer look first > > I think I've figured out why this isn't working as expected. It started > with this patch here: > > commit 5fd8518d187ed03403a4d4f7f56f52c00b11c148 > Author: Andrey Grodzovsky > Date: Mon D

RE: [PATCH 2/3] drm/amdgpu: avoid sending csib command when system resumes from S3

2023-10-24 Thread Yuan, Perry
[AMD Official Use Only - General] Hi Kevin, > -Original Message- > From: Wang, Yang(Kevin) > Sent: Tuesday, October 24, 2023 1:24 PM > To: Yuan, Perry ; Zhang, Yifan > ; Feng, Kenneth ; > Limonciello, Mario > Cc: Deucher, Alexander ; amd- > g...@lists.freedesktop.org > Subject: RE: [PA

Re: [PATCH] drm/amdgpu: Use pcie domain of xcc acpi objects

2023-10-24 Thread Bhardwaj, Rajneesh
[AMD Official Use Only - General] Looks good to me. Reviewed-by: Rajneesh Bhardwaj Regards, Rajneesh From: Lazar, Lijo Sent: Monday, October 23, 2023 2:43:01 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Kasiviswanathan, Harish ; Zhang, Hawking

RE: [PATCH] drm/amd/amdgpu: fix the GPU power print error in pm info

2023-10-24 Thread Zhang, Yifan
[AMD Official Use Only - General] -Original Message- From: Ma, Li Sent: Tuesday, October 24, 2023 7:09 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Zhang, Yifan ; Feng, Kenneth ; StDenis, Tom ; Ma, Li Subject: [PATCH] drm/amd/amdgpu: fix the GPU power print error in pm

[PATCH] drm/amd/pm: call smu_cmn_get_smc_version in is_mode1_reset_supported.

2023-10-24 Thread Yifan Zhang
is_mode1_reset_supported may be called before smu init, when smu_context is unitialized in driver load/unload test. Call smu_cmn_get_smc_version explicitly is_mode1_reset_supported. Fixes: 5fe5098c64d9 ("drm/amd/pm: drop most smu_cmn_get_smc_version in smu") Signed-off-by: Yifan Zhang --- driver

[PATCH] drm/amd/amdgpu: fix the GPU power print error in pm info

2023-10-24 Thread Li Ma
Print the digit of the fractional part individually to avoid carrying during display. Signed-off-by: Li Ma --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c index

RE: [PATCH] drm/amdgpu: get RAS poison status from DF v4_6_2

2023-10-24 Thread Zhang, Hawking
[AMD Official Use Only - General] Acked-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Tao Zhou Sent: Tuesday, October 24, 2023 14:42 To: amd-gfx@lists.freedesktop.org Cc: Zhou1, Tao ; Yang, Stanley Subject: [PATCH] drm/amdgpu: get RAS poison status fr

Re: [PATCH] drm/amdgpu: Initialize schedulers before using them

2023-10-24 Thread Christian König
[SNIP] Let me take a closer look first I think I've figured out why this isn't working as expected. It started with this patch here: commit 5fd8518d187ed03403a4d4f7f56f52c00b11c148 Author: Andrey Grodzovsky Date:   Mon Dec 6 14:59:35 2021 -0500     drm/amdgpu: Move scheduler init to after

[bug report] drm/amdgpu: Workaround to skip kiq ring test during ras gpu recovery

2023-10-24 Thread Dan Carpenter
Hello Stanley.Yang, The patch b1338a8e71ac: "drm/amdgpu: Workaround to skip kiq ring test during ras gpu recovery" from Oct 17, 2023 (linux-next), leads to the following Smatch static checker warning: drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:513 amdgpu_get_xgmi_hive() warn: sleepi

RE: [PATCH 1/3] drm/amdgpu: ungate power gating when system suspend

2023-10-24 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] Acked-by: Yang Wang Best Regards, Kevin -Original Message- From: Feng, Kenneth Sent: Tuesday, October 24, 2023 2:33 PM To: Yuan, Perry ; Zhang, Yifan ; Limonciello, Mario Cc: Deucher, Alexander ; Wang, Yang(Kevin) ; amd-gfx@lists.freedesktop.org Sub

Re: [PATCH] Revert "drm/amdgpu: remove vm sanity check from amdgpu_vm_make_compute"

2023-10-24 Thread Christian König
Am 24.10.23 um 01:41 schrieb Felix Kuehling: [sorry, I hit send too early] On 2023-10-23 11:15, Christian König wrote: Am 23.10.23 um 15:06 schrieb Daniel Tang: That commit causes the screen to freeze a few moments after running clinfo on v6.6-rc7 and ROCm 5.6. Sometimes the rest of the comp