Re: [PATCH 01/11] drm/amdgpu: Fix possible null pointer dereference

2023-10-17 Thread Christian König
Am 17.10.23 um 23:13 schrieb Felix Kuehling: abo->tbo.resource may be NULL in amdgpu_vm_bo_update. Fixes: 180253782038 ("drm/ttm: stop allocating dummy resources during BO creation") Signed-off-by: Felix Kuehling Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c |

RE: [PATCH Review 1/1] drm/amdgpu: Workaround to skip kiq ring test during ras gpu recovery

2023-10-17 Thread Yang, Stanley
[AMD Official Use Only - General] Thanks, will update. Regards, Stanley > -Original Message- > From: Zhou1, Tao > Sent: Wednesday, October 18, 2023 11:00 AM > To: Yang, Stanley ; amd-gfx@lists.freedesktop.org > Cc: Yang, Stanley > Subject: RE: [PATCH Review 1/1] drm/amdgpu: Workaround t

Re: [PATCH] drm/amdgpu remove restriction of sriov max_pfn on Vega10

2023-10-17 Thread Christian König
Am 18.10.23 um 04:39 schrieb Lin.Cao: Remove restriction of sriov max_pfn so that TBA and TMA can move to high 47 bits address. Regression test: change range alloc flag of libdrm as AMDGPU_VA_RANGE_HIGH and there is no flr occur when testing amdgpu_test of drm. Signed-off-by: Lin.Cao Acked-b

[PATCH v2] drm/amdgpu: fix missing stuff in NBIO v7.11

2023-10-17 Thread Li Ma
add get_clockgating_state, update_medium_grain_light_sleep and update_medium_grain_clock_gating in nbio_v7_11_funcs v1: add missing funcs in nbio_v7_11.c v2: modify the if condition and add spport for nbio v7.11 clockgating. Signed-off-by: Li Ma Reviewed-by: Yifan Zhang --- drivers/gpu/drm/amd/

RE: [PATCH Review 1/1] drm/amdgpu: Workaround to skip kiq ring test during ras gpu recovery

2023-10-17 Thread Zhou1, Tao
[AMD Official Use Only - General] > -Original Message- > From: amd-gfx On Behalf Of > Stanley.Yang > Sent: Tuesday, October 17, 2023 10:37 PM > To: amd-gfx@lists.freedesktop.org > Cc: Yang, Stanley > Subject: [PATCH Review 1/1] drm/amdgpu: Workaround to skip kiq ring test > during ras gp

[PATCH] drm/amdgpu remove restriction of sriov max_pfn on Vega10

2023-10-17 Thread Lin . Cao
Remove restriction of sriov max_pfn so that TBA and TMA can move to high 47 bits address. Regression test: change range alloc flag of libdrm as AMDGPU_VA_RANGE_HIGH and there is no flr occur when testing amdgpu_test of drm. Signed-off-by: Lin.Cao --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 ++

RE: [PATCH Review 1/1] drm/amdgpu: Workaround to skip kiq ring test during ras gpu recovery

2023-10-17 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Stanley.Yang Sent: Tuesday, October 17, 2023 22:37 To: amd-gfx@lists.freedesktop.org Cc: Yang, Stanley Subject: [PATCH Review 1/1] drm/amdgpu: Workaround to skip

Re: [PATCH v12 1/9] Documentation/driver-api: Add document about WBRF mechanism

2023-10-17 Thread Ma, Jun
Hi llpo, Thanks for these comments on format issues, I'll fix it in the next version. Regards, Ma Jun On 10/17/2023 5:20 PM, Ilpo Järvinen wrote: > On Tue, 17 Oct 2023, Ma Jun wrote: > >> Add documentation about AMD's Wifi band RFI mitigation (WBRF) mechanism >> explaining the theory and how it

[PATCH] drm/amdgpu: Remove redundant call to priority_is_valid()

2023-10-17 Thread Luben Tuikov
Remove a redundant call to amdgpu_ctx_priority_is_valid() from amdgpu_ctx_priority_permit(), which is called from amdgpu_ctx_init() which is called from amdgpu_ctx_alloc() which is called from amdgpu_ctx_ioctl(), where we've called amdgpu_ctx_priority_is_valid() already first thing in the function.

[linux-next:master] BUILD REGRESSION 4d5ab2376ec576af173e5eac3887ed0b51bd8566

2023-10-17 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 4d5ab2376ec576af173e5eac3887ed0b51bd8566 Add linux-next specific files for 20231017 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202309212121.cul1ptra-...@intel.com https

Re: [PATCH] drm/amd/pm: Handle non-terminated overdrive commands.

2023-10-17 Thread Alex Deucher
Applied. Thanks! On Tue, Oct 17, 2023 at 10:01 AM Bas Nieuwenhuizen wrote: > > The incoming strings might not be terminated by a newline > or a 0. > > (found while testing a program that just wrote the string > itself, causing a crash) > > Cc: sta...@vger.kernel.org > Fixes: e3933f26b657 ("drm/

Re: [PATCH 0/2] Reduce stack size for DML2

2023-10-17 Thread Nathan Chancellor
On Tue, Oct 17, 2023 at 11:45:42AM -0600, Rodrigo Siqueira Jordao wrote: > Hi Nathan, > (+Hamza) > > First of all, thanks a lot for your feedback. You can see my comments > inline. > > On 10/17/23 11:22, Nathan Chancellor wrote: > > Hi Rodrigo, > > > > On Mon, Oct 16, 2023 at 08:19:16AM -0600, R

Re: [PATCH][next] drm/amd/display: Fix a handful of spelling mistakes in dml_print output

2023-10-17 Thread Alex Deucher
Applied. Thanks! On Tue, Oct 17, 2023 at 4:22 AM Colin Ian King wrote: > > There are a few spelling mistakes and an minor grammatical issue in > some dml_print messages. Fix these. > > Signed-off-by: Colin Ian King > --- > drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c | 6 +++--- > 1

[PATCH 10/11] drm/amdkfd: Import DMABufs for interop through DRM

2023-10-17 Thread Felix Kuehling
Use drm_gem_prime_fd_to_handle to import DMABufs for interop. This ensures that a GEM handle is created on import and that obj->dma_buf will be set and remain set as long as the object is imported into KFD. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 9 ++-

[PATCH 07/11] drm/amdgpu: New VM state for evicted user BOs

2023-10-17 Thread Felix Kuehling
Create a new VM state to track user BOs that are in the system domain. In the next patch this will be used do conditionally re-validate them in amdgpu_vm_handle_moved. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 17 + drivers/gpu/drm/amd/amdgpu/amdg

[PATCH 09/11] drm/amdkfd: Export DMABufs from KFD using GEM handles

2023-10-17 Thread Felix Kuehling
Create GEM handles for exporting DMABufs using GEM-Prime APIs. The GEM handles are created in a drm_client_dev context to avoid exposing them in user mode contexts through a DMABuf import. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 11 +++ drivers/gpu/d

[PATCH 06/11] drm/amdkfd: Move TLB flushing logic into amdgpu

2023-10-17 Thread Felix Kuehling
This will make it possible for amdgpu GEM ioctls to flush TLBs on compute VMs. This removes VMID-based TLB flushing and always uses PASID-based flushing. This still works because it scans the VMID-PASID mapping registers to find the right VMID. It's only slightly less efficient. This is not a prod

[PATCH 11/11] drm/amdkfd: Bump KFD ioctl version

2023-10-17 Thread Felix Kuehling
This is not strictly a change in the IOCTL API. This version bump is meant to indicate to user mode the presence of a number of changes and fixes that enable the management of VA mappings in compute VMs using the GEM_VA ioctl for DMABufs exported from KFD. Signed-off-by: Felix Kuehling --- inclu

[PATCH 08/11] drm/amdgpu: Auto-validate DMABuf imports in compute VMs

2023-10-17 Thread Felix Kuehling
DMABuf imports in compute VMs are not wrapped in a kgd_mem object on the process_info->kfd_bo_list. There is no explicit KFD API call to validate them or add eviction fences to them. This patch automatically validates and fences dymanic DMABuf imports when they are added to a compute VM. Revalidat

[PATCH 05/11] drm/amdgpu: update mappings not managed by KFD

2023-10-17 Thread Felix Kuehling
When restoring after an eviction, use amdgpu_vm_handle_moved to update BO VA mappings in KFD VMs that are not managed through the KFD API. This should allow using the render node API to create more flexible memory mappings in KFD VMs. Signed-off-by: Felix Kuehling Acked-by: Christian König ---

[PATCH 04/11] drm/amdgpu: Attach eviction fence on alloc

2023-10-17 Thread Felix Kuehling
Instead of attaching the eviction fence when a KFD BO is first mapped, attach it when it is allocated or imported. This in preparation to allow KFD BOs to be mapped using the render node API. Signed-off-by: Felix Kuehling Acked-by: Christian König --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.

[PATCH 03/11] drm/amdkfd: Improve amdgpu_vm_handle_moved

2023-10-17 Thread Felix Kuehling
Let amdgpu_vm_handle_moved update all BO VA mappings of BOs reserved by the caller. This will be useful for handling extra BO VA mappings in KFD VMs that are managed through the render node API. Signed-off-by: Felix Kuehling Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.

[PATCH 02/11] drm/amdgpu: Reserve fences for VM update

2023-10-17 Thread Felix Kuehling
In amdgpu_dma_buf_move_notify reserve fences for the page table updates in amdgpu_vm_clear_freed and amdgpu_vm_handle_moved. This fixes a BUG_ON in dma_resv_add_fence when using SDMA for page table updates. Signed-off-by: Felix Kuehling Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgp

[PATCH 00/11] Enable integration of KFD with DRM GEM_VA ioctl

2023-10-17 Thread Felix Kuehling
This patch series enables better integration of KFD memory management with the DRM GEM ioctl API. It allow managing virtual address mappings in compute VMs with the GEM_VA ioctl after importing DMABufs exported from KFD into libdrm. This will enable more flexible virtual address management for ROC

[PATCH 01/11] drm/amdgpu: Fix possible null pointer dereference

2023-10-17 Thread Felix Kuehling
abo->tbo.resource may be NULL in amdgpu_vm_bo_update. Fixes: 180253782038 ("drm/ttm: stop allocating dummy resources during BO creation") Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/dr

Re: [PATCH] drm/amd: Add missing kernel doc for prepare_suspend()

2023-10-17 Thread Deucher, Alexander
[Public] Reviewed-by: Alex Deucher From: amd-gfx on behalf of Mario Limonciello Sent: Tuesday, October 17, 2023 3:37 PM To: amd-gfx@lists.freedesktop.org Cc: Stephen Rothwell ; Limonciello, Mario Subject: [PATCH] drm/amd: Add missing kernel doc for prepare_s

[PATCH] drm/amd: Add missing kernel doc for prepare_suspend()

2023-10-17 Thread Mario Limonciello
prepare_suspend() is intended to be used for any IP blocks that must allocate memory during the suspend sequence. Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/all/20231017143555.6a645...@canb.auug.org.au/ Fixes: cb11ca3233aa ("drm/amd: Add concept of running prepare_suspend() se

Re: [PATCH 1/2] drm/amdgpu: Unset context priority is now invalid

2023-10-17 Thread Alex Deucher
On Tue, Oct 17, 2023 at 10:27 AM Luben Tuikov wrote: > > On 2023-10-17 09:22, Alex Deucher wrote: > > On Tue, Oct 17, 2023 at 12:52 AM Luben Tuikov wrote: > >> > >> A context priority value of AMD_CTX_PRIORITY_UNSET is now invalid--instead > >> of > >> carrying it around and passing it to the Di

Re: [PATCH v2 3/7] amd/amdkfd: Add granularity bitmap mapped to gpu flag

2023-10-17 Thread Felix Kuehling
On 2023-10-10 10:40, Philip Yang wrote: Replace prange->mapped_to_gpu with prange->bitmap_mapped[], which is per GPU flag and based on prange granularity, updated when map to GPUS or unmap from GPUs, to optimize multiple GPU map, unmap and retry fault recover. svm_range_partial_mapped is false

Re: [PATCH 0/2] Reduce stack size for DML2

2023-10-17 Thread Alex Deucher
On Tue, Oct 17, 2023 at 1:22 PM Nathan Chancellor wrote: > > Hi Rodrigo, > > On Mon, Oct 16, 2023 at 08:19:16AM -0600, Rodrigo Siqueira wrote: > > Stephen discovers a stack size issue when compiling the latest amdgpu > > code with allmodconfig. This patchset addresses that issue by splitting > > a

Re: [PATCH v2 2/7] drm/amdkfd: Add helper function svm_range_need_access_gpus

2023-10-17 Thread Felix Kuehling
On 2023-10-10 10:40, Philip Yang wrote: Refactor svm_range_validate_and_map to add and use the helper function to get all GPUs bitmap that need access the svm range. No functional change. This helper will be used in the following patch. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling

Re: [PATCH v2 1/7] drm/amdkfd: Wait vm update fence after retry fault recovered

2023-10-17 Thread Felix Kuehling
On 2023-10-10 10:40, Philip Yang wrote: If using sdma update GPU page table, kfd flush tlb does nothing if vm update fence callback doesn't update vm->tlb_seq. This works now because retry fault keep coming and will be handled to update page table again after AMDGPU_SVM_RANGE_RETRY_FAULT_PENDING

Re: [PATCH] drm/amdkfd: clean up some inconsistent indenting

2023-10-17 Thread Felix Kuehling
On 2023-10-12 23:21, Jiapeng Chong wrote: No functional modification involved. drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_svm.c:305 svm_range_free() warn: inconsistent indenting. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6804 Signed-off-by: Jiapeng Chong

Re: [PATCH 0/2] Reduce stack size for DML2

2023-10-17 Thread Rodrigo Siqueira Jordao
Hi Nathan, (+Hamza) First of all, thanks a lot for your feedback. You can see my comments inline. On 10/17/23 11:22, Nathan Chancellor wrote: Hi Rodrigo, On Mon, Oct 16, 2023 at 08:19:16AM -0600, Rodrigo Siqueira wrote: Stephen discovers a stack size issue when compiling the latest amdgpu c

Re: [PATCH 0/2] Reduce stack size for DML2

2023-10-17 Thread Nathan Chancellor
Hi Rodrigo, On Mon, Oct 16, 2023 at 08:19:16AM -0600, Rodrigo Siqueira wrote: > Stephen discovers a stack size issue when compiling the latest amdgpu > code with allmodconfig. This patchset addresses that issue by splitting > a large function into two smaller parts. > > Thanks > Siqueira > > Rod

Re: [PATCH] drm/amdgpu: ignore duplicate BOs again

2023-10-17 Thread Christian König
Am 17.10.23 um 14:42 schrieb Hamza Mahfooz: On 10/17/23 08:10, Christian König wrote: Looks like RADV is actually hitting this. Signed-off-by: Christian König Fixes: ca6c1e210aa7 ("drm/amdgpu: use the new drm_exec object for CS v3") Do you think this will fix the following issue?: https://g

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

2023-10-17 Thread kernel test robot
Hi André, kernel test robot noticed the following build warnings: [auto build test WARNING on drm-misc/drm-misc-next] [also build test WARNING on drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm/drm-next linus/master v6.6-rc6 next-20231017] [If your patch is applied to the wrong git

[PATCH Review 1/1] drm/amdgpu: Workaround to skip kiq ring test during ras gpu recovery

2023-10-17 Thread Stanley . Yang
This is workaround, kiq ring test failed in suspend stage when do ras recovery for gfx v9_4_3. Change-Id: I8de9900aa76706f59bc029d4e9e8438c6e1db8e0 Signed-off-by: Stanley.Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 21 + 1 file changed, 21 insertions(+) diff --git a/d

Re: [PATCH 1/2] drm/amdgpu: Unset context priority is now invalid

2023-10-17 Thread Luben Tuikov
On 2023-10-17 09:22, Alex Deucher wrote: > On Tue, Oct 17, 2023 at 12:52 AM Luben Tuikov wrote: >> >> A context priority value of AMD_CTX_PRIORITY_UNSET is now invalid--instead of >> carrying it around and passing it to the Direct Rendering Manager--and it >> becomes AMD_CTX_PRIORITY_NORMAL in amd

[PATCH] drm/amd/pm: Handle non-terminated overdrive commands.

2023-10-17 Thread Bas Nieuwenhuizen
The incoming strings might not be terminated by a newline or a 0. (found while testing a program that just wrote the string itself, causing a crash) Cc: sta...@vger.kernel.org Fixes: e3933f26b657 ("drm/amd/pp: Add edit/commit/show OD clock/voltage support in sysfs") Signed-off-by: Bas Nieuwenhu

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

2023-10-17 Thread Helen Koike
On 17/10/2023 06:28, André Almeida wrote: 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 aft

Re: [PATCH 1/2] drm/amdgpu: Unset context priority is now invalid

2023-10-17 Thread Alex Deucher
On Tue, Oct 17, 2023 at 12:52 AM Luben Tuikov wrote: > > A context priority value of AMD_CTX_PRIORITY_UNSET is now invalid--instead of > carrying it around and passing it to the Direct Rendering Manager--and it > becomes AMD_CTX_PRIORITY_NORMAL in amdgpu_ctx_ioctl(), the gateway to context > creat

[PATCH] drm/radeon: Remove the useless variable 'disable_plloff_in_l1'

2023-10-17 Thread Kunwu.Chan
Because the disable_plloff_in_l1 variable is always false, the if judgment on line 9696 is always true. Remove this variable and this if statement. Fixes: 7235711a43b6 ("drm/radeon: add support for ASPM on CIK asics") Signed-off-by: Kunwu.Chan --- drivers/gpu/drm/radeon/cik.c | 134

Re: [PATCH v12 4/9] wifi: mac80211: Add support for WBRF features

2023-10-17 Thread Ilpo Järvinen
On Tue, 17 Oct 2023, Ma Jun wrote: > From: Evan Quan > > To support the WBRF mechanism, Wifi adapters utilized in the system must > register the frequencies in use(or unregister those frequencies no longer > used) via the dedicated calls. So that, other drivers responding to the > frequencies ca

[PATCH][next] drm/amd/display: Fix a handful of spelling mistakes in dml_print output

2023-10-17 Thread Colin Ian King
There are a few spelling mistakes and an minor grammatical issue in some dml_print messages. Fix these. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/

Re: [PATCH v12 1/9] Documentation/driver-api: Add document about WBRF mechanism

2023-10-17 Thread Ilpo Järvinen
On Tue, 17 Oct 2023, Ma Jun wrote: > Add documentation about AMD's Wifi band RFI mitigation (WBRF) mechanism > explaining the theory and how it is used. > > Signed-off-by: Ma Jun > --- > Documentation/driver-api/wbrf.rst | 73 +++ > 1 file changed, 73 insertions(+) >

Re: [PATCH v12 3/9] cfg80211: expose nl80211_chan_width_to_mhz for wide sharing

2023-10-17 Thread Ilpo Järvinen
On Tue, 17 Oct 2023, Ma Jun wrote: > From: Evan Quan > > The newly added WBRF feature needs this interface for channel > width calculation. > > Signed-off-by: Ma Jun > Signed-off-by: Evan Quan > > -- > v8->v9: > - correct typo(Mhz -> MHz) (Johnson) > --- > include/net/cfg80211.h | 8 +

Re: [PATCH v12 4/9] wifi: mac80211: Add support for WBRF features

2023-10-17 Thread Ilpo Järvinen
On Tue, 17 Oct 2023, Ma Jun wrote: > From: Evan Quan > > To support the WBRF mechanism, Wifi adapters utilized in the system must > register the frequencies in use(or unregister those frequencies no longer Space is missing. -- i.

Re: [PATCH v12 9/9] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.7

2023-10-17 Thread Ilpo Järvinen
On Tue, 17 Oct 2023, Ma Jun wrote: > From: Evan Quan > > Fulfill the SMU13.0.7 support for Wifi RFI mitigation feature. > > Signed-off-by: Evan Quan > Reviewed-by: Mario Limonciello > Signed-off-by: Ma Jun > -- > v10->v11: > - downgrade the prompt level on message failure(Lijo) > --- > ..

Re: [PATCH v12 2/9] platform/x86/amd: Add support for AMD ACPI based Wifi band RFI mitigation feature

2023-10-17 Thread Ilpo Järvinen
On Tue, 17 Oct 2023, Ma Jun wrote: > Due to electrical and mechanical constraints in certain platform designs > there may be likely interference of relatively high-powered harmonics of > the (G-)DDR memory clocks with local radio module frequency bands used > by Wifi 6/6e/7. > > To mitigate this,

Re: [PATCH v12 6/9] drm/amd/pm: setup the framework to support Wifi RFI mitigation feature

2023-10-17 Thread Ilpo Järvinen
On Tue, 17 Oct 2023, Ma Jun wrote: > From: Evan Quan > > With WBRF feature supported, as a driver responding to the frequencies, > amdgpu driver is able to do shadow pstate switching to mitigate possible > interference(between its (G-)DDR memory clocks and local radio module > frequency bands us

Re: [PATCH v12 8/9] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.0

2023-10-17 Thread Ilpo Järvinen
On Tue, 17 Oct 2023, Ma Jun wrote: > From: Evan Quan > > Fulfill the SMU13.0.0 support for Wifi RFI mitigation feature. > > Signed-off-by: Evan Quan > Reviewed-by: Mario Limonciello > Signed-off-by: Ma Jun > -- > v10->v11: > - downgrade the prompt level on message failure(Lijo) > --- > dr

Re: [PATCH] drm/amdgpu: ignore duplicate BOs again

2023-10-17 Thread Alex Deucher
On Tue, Oct 17, 2023 at 8:22 AM Christian König wrote: > > Looks like RADV is actually hitting this. > > Signed-off-by: Christian König > Fixes: ca6c1e210aa7 ("drm/amdgpu: use the new drm_exec object for CS v3") Acked-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++- >

Re: [PATCH] drm/amdgpu: ignore duplicate BOs again

2023-10-17 Thread Alex Deucher
On Tue, Oct 17, 2023 at 8:43 AM Hamza Mahfooz wrote: > > On 10/17/23 08:10, Christian König wrote: > > Looks like RADV is actually hitting this. > > > > Signed-off-by: Christian König > > Fixes: ca6c1e210aa7 ("drm/amdgpu: use the new drm_exec object for CS v3") > > Do you think this will fix the

[PATCH 6/6] drm/amdgpu: drop status reset for GCEA 9.4.3 and MMEA 1.8

2023-10-17 Thread Tao Zhou
PMFW will be responsible for it. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 22 --- drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 86 - 2 files changed, 108 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/am

[PATCH 4/6] drm/amdgpu: bypass RAS error reset in some conditions

2023-10-17 Thread Tao Zhou
PMFW is responsible for RAS error reset in some conditions, driver can skip the operation. v2: add check for ras->in_recovery, it's set earlier than amdgpu_in_reset. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 20 ++-- 1 file changed, 18 insertions(+),

[PATCH 5/6] drm/amdgpu: reuse amdgpu_ras_reset_error_count code

2023-10-17 Thread Tao Zhou
To simplify the code of amdgpu_ras_reset_error_status without logical change. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 30 +++-- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/

[PATCH 2/6] drm/amdgpu: add set/get mca debug mode operations

2023-10-17 Thread Tao Zhou
Record the debug mode status in RAS. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 21 + drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 5 + 2 files changed, 26 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/

[PATCH 3/6] drm/amd/pm: record mca debug mode in RAS

2023-10-17 Thread Tao Zhou
Call amdgpu_ras_set_mca_debug_mode when we set mca debug mode in smu v13_0_6. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/

[PATCH 1/6] drm/amdgpu: define ras_reset_error_count function

2023-10-17 Thread Tao Zhou
Make the code architecture more simple. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c| 17 + drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h| 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 4 ++-

Re: [PATCH] drm/amdgpu: ignore duplicate BOs again

2023-10-17 Thread Hamza Mahfooz
On 10/17/23 08:10, Christian König wrote: Looks like RADV is actually hitting this. Signed-off-by: Christian König Fixes: ca6c1e210aa7 ("drm/amdgpu: use the new drm_exec object for CS v3") Do you think this will fix the following issue?: https://gitlab.freedesktop.org/drm/amd/-/issues/2893

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

2023-10-17 Thread Simon Ser
After discussing with André it seems like we missed a plane type check here. We need to make sure FB_ID changes are only allowed on primary planes.

Re: [PATCH v6 6/6] drm/doc: Define KMS atomic state set

2023-10-17 Thread Ville Syrjälä
On Mon, Oct 16, 2023 at 10:00:51PM +, Simon Ser wrote: > On Monday, October 16th, 2023 at 17:10, Ville Syrjälä > wrote: > > > On Mon, Oct 16, 2023 at 05:52:22PM +0300, Pekka Paalanen wrote: > > > > > On Mon, 16 Oct 2023 15:42:16 +0200 > > > André Almeida andrealm...@igalia.com wrote: > > >

[PATCH] drm/amdgpu: ignore duplicate BOs again

2023-10-17 Thread Christian König
Looks like RADV is actually hitting this. Signed-off-by: Christian König Fixes: ca6c1e210aa7 ("drm/amdgpu: use the new drm_exec object for CS v3") --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs

RE: [PATCH] drm/amdgpu: add clockgating support for NBIO v7.7.1

2023-10-17 Thread Zhang, Yifan
[AMD Official Use Only - General] Please separate feature enabling and code cleaning to two patches. With that fixed this patch is : Reviewed-by: Yifan Zhang -Original Message- From: Ma, Li Sent: Tuesday, October 17, 2023 6:09 PM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Yifan ; Hu

RE: [PATCH] drm/amdgpu: add clockgating support for NBIO v7.7.1

2023-10-17 Thread Huang, Tim
[Public] Reviewed-by: Tim Huang Best Regards, Tim Huang -Original Message- From: Ma, Li Sent: Tuesday, October 17, 2023 6:09 PM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Yifan ; Huang, Tim ; Ma, Li Subject: [PATCH] drm/amdgpu: add clockgating support for NBIO v7.7.1 add clockgati

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

2023-10-17 Thread Simon Ser
Reviewed-by: Simon Ser

[PATCH] drm/amdgpu: add clockgating support for NBIO v7.7.1

2023-10-17 Thread Li Ma
add clockgating support for NBIO ip 7.7.1 and modify if condition. Signed-off-by: Li Ma --- drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c b/driv

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

2023-10-17 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

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

2023-10-17 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 v7 3/6] drm: introduce drm_mode_config.atomic_async_page_flip_not_supported

2023-10-17 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 v7 4/6] drm: Refuse to async flip with atomic prop changes

2023-10-17 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 exceptions are the framebuffer ID to flip to and the mode ID, that could be referring to an identical mode. Signed-off-by: Andr

[PATCH v7 2/6] drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP

2023-10-17 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 v7 5/6] drm/doc: Define KMS atomic state set

2023-10-17 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 --- v7: - add a note that drivers can make exceptions for ad-hoc prop changes - add a note about flipp

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

2023-10-17 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

Re: [PATCH] drm/amdgpu: move task_info to amdgpu_fpriv

2023-10-17 Thread Shashank Sharma
On 17/10/2023 09:34, Christian König wrote: Am 17.10.23 um 09:25 schrieb Shashank Sharma: Hello Christian, Felix, Thanks for your comments, mine inline. On 17/10/2023 07:55, Christian König wrote: Am 17.10.23 um 00:15 schrieb Felix Kuehling: On 2023-10-16 13:08, Shashank Sharma wrote: Thi

RE: [PATCH] drm/amdgpu: update to the latest GC 11.5 headers

2023-10-17 Thread Zhang, Yifan
[AMD Official Use Only - General] This patch is: Reviewed-by: Yifan Zhang -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Tuesday, October 17, 2023 2:11 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH] drm/amdgpu: update to the latest GC 11

RE: [PATCH] drm/amd/pm: Support for getting power1_cap_min value

2023-10-17 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] Hi Jun, int (*get_power_limit)(struct smu_context *smu, - uint32_t *current_power_limit, - uint32_t *default_power_limit, - uint32_t *max_power_limit); +

RE: [PATCH] drm/amd/pm: Support for getting power1_cap_min value

2023-10-17 Thread Feng, Kenneth
[AMD Official Use Only - General] Reviewed-by: Kenneth Feng -Original Message- From: Ma, Jun Sent: Tuesday, October 17, 2023 3:22 PM To: amd-gfx@lists.freedesktop.org; Feng, Kenneth ; Deucher, Alexander Cc: Ma, Jun ; Ma, Jun Subject: [PATCH] drm/amd/pm: Support for getting power1_ca

Re: [PATCH] drm/amdgpu: move task_info to amdgpu_fpriv

2023-10-17 Thread Christian König
Am 17.10.23 um 09:25 schrieb Shashank Sharma: Hello Christian, Felix, Thanks for your comments, mine inline. On 17/10/2023 07:55, Christian König wrote: Am 17.10.23 um 00:15 schrieb Felix Kuehling: On 2023-10-16 13:08, Shashank Sharma wrote: This patch does the following: - moves vm->task_in

Re: [PATCH] drm/amdgpu: move task_info to amdgpu_fpriv

2023-10-17 Thread Shashank Sharma
Hello Christian, Felix, Thanks for your comments, mine inline. On 17/10/2023 07:55, Christian König wrote: Am 17.10.23 um 00:15 schrieb Felix Kuehling: On 2023-10-16 13:08, Shashank Sharma wrote: This patch does the following: - moves vm->task_info struct to fpriv->task_info. - makes task_inf

[PATCH] drm/amd/pm: Support for getting power1_cap_min value

2023-10-17 Thread Ma Jun
Support for getting power1_cap_min value on smu13 and smu11. For other Asics, we still use 0 as the default value. Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/pm/amdgpu_pm.c| 14 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 16 + drivers/gpu/drm/amd/pm/swsmu/inc