Re: [PATCH] Revert "drm/amdgpu: remove TOPDOWN flags when allocating VRAM in large bar system"

2023-05-29 Thread Arunpravin Paneer Selvam
On 5/29/2023 8:05 AM, Xiao, Shane wrote: [AMD Official Use Only - General] -Original Message- From: Paneer Selvam, Arunpravin Sent: Saturday, May 27, 2023 2:12 AM To: Xiao, Shane ; Kuehling, Felix ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Koenig, Christian Subject:

[PATCH] drm/amdgpu: Fix missing parameter desc for 'xcp_id' in amdgpu_amdkfd_reserve_mem_limit

2023-05-29 Thread Srinivasan Shanmugam
Fix these warnings by adding 'xcp_id' argument. gcc with W=1 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:160: warning: Function parameter or member 'xcp_id' not described in 'amdgpu_amdkfd_reserve_mem_limit' Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam ---

[PATCH] drm/amd: SVM flag error added at svm_range flags

2023-05-29 Thread Alex Sierra
If a return error is raised during validation and mapping of a prange, this flag is set. It is a rare occurrence, but it could happen when `amdgpu_hmm_range_get_pages_done` returns true. In such cases, the caller should retry. However, it is important to ensure that the prange is updated correctly

Re: [PATCH] drm/amdgpu: Fix create_dmamap_sg_bo kdoc warnings

2023-05-29 Thread Felix Kuehling
On 2023-05-27 12:59, Srinivasan Shanmugam wrote: Fix the following gcc with W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:292: warning: Cannot understand * @create_dmamap_sg_bo: Creates a amdgpu_bo object to reflect information Cc: Christian König Cc: Alex Deucher Signed-off-by:

Re: [PATCH] drm/amd/display: Fix up kdoc formats in dcn32_fpu.c

2023-05-29 Thread Aurabindo Pillai
Hi Srinivasan, Please see my inline comments: On 5/27/23 12:42, Srinivasan Shanmugam wrote: > Fixes the following gcc with W=1: > > drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/dcn32_fpu.c:2806: warning: > Cannot understand * >

[PATCH] drm/amdkfd: flag added to handle errors from svm validate and map

2023-05-29 Thread Alex Sierra
If a return error is raised during validation and mapping of a prange, this flag is set. It is a rare occurrence, but it could happen when `amdgpu_hmm_range_get_pages_done` returns true. In such cases, the caller should retry. However, it is important to ensure that the prange is updated correctly

Re: [PATCH v4 01/13] fbdev: Add Kconfig options to select different fb_ops helpers

2023-05-29 Thread Sam Ravnborg
Hi Thomas, On Wed, May 24, 2023 at 11:21:38AM +0200, Thomas Zimmermann wrote: > Many fbdev drivers use the same set of fb_ops helpers. Add Kconfig > options to select them at once. This will help with making DRM's > fbdev emulation code more modular, but can also be used to simplify > fbdev's

Re: [PATCH v4 03/13] drm/armada: Use regular fbdev I/O helpers

2023-05-29 Thread Sam Ravnborg
On Wed, May 24, 2023 at 11:21:40AM +0200, Thomas Zimmermann wrote: > Use the regular fbdev helpers for framebuffer I/O instead of DRM's > helpers. Armada does not use damage handling, so DRM's fbdev helpers > are mere wrappers around the fbdev code. > > By using fbdev helpers directly within each

Re: [PATCH v2] drm/amdgpu: Fix create_dmamap_sg_bo kdoc warnings

2023-05-29 Thread Felix Kuehling
On 2023-05-29 15:22, Srinivasan Shanmugam wrote: Fix the following gcc with W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:292: warning: Cannot understand * @create_dmamap_sg_bo: Creates a amdgpu_bo object to reflect information Cc: Felix Kuehling Cc: Christian König Cc: Alex

Re: [PATCH v4 11/13] drm/fb-helper: Export helpers for marking damage areas

2023-05-29 Thread Sam Ravnborg
On Wed, May 24, 2023 at 11:21:48AM +0200, Thomas Zimmermann wrote: > Export drm_fb_helper_damage() and drm_fb_helper_damage_range(), which > handle damage areas for fbdev emulation. This is a temporary export > that allows to move the DRM I/O helpers for fbdev into drivers. Only > fbdev-generic

Re: [PATCH v4 00/13] drm/fbdev: Remove DRM's helpers for fbdev I/O

2023-05-29 Thread Sam Ravnborg
Hi Thomas. > v4: > * use initializer and generator macros for struct fb_ops > * partially support damage handling in msm (Dmitri) I like the macros. They make it simpler and we do not spread the _cfb_ misname to more files. > v3: > * fix Kconfig options (Jingfeng) > *

Re: [PATCH] drm/amd/display: Add missing kdoc entries in update_planes_and_stream_adapter

2023-05-29 Thread Aurabindo Pillai
This patch is: Reviewed-by: Aurabindo Pillai On 5/27/23 10:25, Srinivasan Shanmugam wrote: > Fixes the following gcc with W=1: > > drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:374: warning: > Function parameter or member 'dc' not described in >

Re: [PATCH v4 02/13] fbdev: Add initializer macros for struct fb_ops

2023-05-29 Thread Sam Ravnborg
On Wed, May 24, 2023 at 11:21:39AM +0200, Thomas Zimmermann wrote: > For framebuffers in I/O and system memory, add macros that set > struct fb_ops to the respective callback functions. > > For deferred I/O, add macros that generate callback functions with > damage handling. Add initializer

[PATCH v2] drm/amdgpu: Fix create_dmamap_sg_bo kdoc warnings

2023-05-29 Thread Srinivasan Shanmugam
Fix the following gcc with W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:292: warning: Cannot understand * @create_dmamap_sg_bo: Creates a amdgpu_bo object to reflect information Cc: Felix Kuehling Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam --- v2:

Re: [PATCH v4 13/13] drm/i915: Implement dedicated fbdev I/O helpers

2023-05-29 Thread Sam Ravnborg
Hi Thomas, On Wed, May 24, 2023 at 11:21:50AM +0200, Thomas Zimmermann wrote: > Implement dedicated fbdev helpers for framebuffer I/O instead > of using DRM's helpers. Use an fbdev generator macro for > deferred I/O to create the fbdev callbacks. i915 was the only > caller of the DRM helpers, so

[PATCH] drm/amdgpu: fix Null pointer dereference error in amdgpu_device_recover_vram

2023-05-29 Thread Horatio Zhang
Use the function of amdgpu_bo_vm_destroy to handle the resource release of shadow bo. During the amdgpu_mes_self_test, shadow bo released, but vmbo->shadow_list was not, which caused a null pointer reference error in amdgpu_device_recover_vram when GPU reset. Fixes: cd7050908070 ("drm/amdgpu: Fix

Re: [PATCH v4 13/13] drm/i915: Implement dedicated fbdev I/O helpers

2023-05-29 Thread Sam Ravnborg
Hi Thomas, On Wed, May 24, 2023 at 11:21:50AM +0200, Thomas Zimmermann wrote: > Implement dedicated fbdev helpers for framebuffer I/O instead > of using DRM's helpers. Use an fbdev generator macro for > deferred I/O to create the fbdev callbacks. i915 was the only > caller of the DRM helpers, so

Re: [PATCH] drm/amdkfd: flag added to handle errors from svm validate and map

2023-05-29 Thread Felix Kuehling
On 2023-05-29 17:11, Alex Sierra wrote: If a return error is raised during validation and mapping of a prange, this flag is set. It is a rare occurrence, but it could happen when `amdgpu_hmm_range_get_pages_done` returns true. In such cases, the caller should retry. However, it is important to

[PATCH] drm/ttm: Remove redundant code in ttm_tt_init_fields

2023-05-29 Thread Ma Jun
Remove redundant assignment code for ttm->caching Signed-off-by: Ma Jun --- drivers/gpu/drm/ttm/ttm_tt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index 02b812dacc5d..45a44544b656 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++

[PATCH] drm/amdgpu: Fix missing parameter desc for 'xcc_id' in gfx_v7_0.c & amdgpu_rlc.c

2023-05-29 Thread Srinivasan Shanmugam
Fix these warnings by adding 'xcc_id' arguments. gcc with W=1 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:1557: warning: Function parameter or member 'xcc_id' not described in 'gfx_v7_0_select_se_sh' drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c:38: warning: Function parameter or member 'xcc_id' not

Re: [PATCH] drm/amdgpu/gfx9: switch to golden tsc registers for raven/raven2

2023-05-29 Thread Michel Dänzer
On 4/12/23 03:23, Zhang, Jesse(Jie) wrote: > > Due to raven/raven2 maybe enable sclk slow down, > they cannot get clock count by the RLC at the auto level of dpm > performance. > So switch to golden tsc register. At least on this ThinkPad E595 with Picasso, the issue with this change

[PATCH] drm/amdkfd: Fix MEC pipe interrupt enablement

2023-05-29 Thread Lijo Lazar
for_each_inst modifies xcc_mask and therefore the loop doesn't initialize properly interrupts on all pipes. Keep looping through xcc as the outer loop to fix this issue. Fixes: 7b04c90a48b1 ("drm/amdkfd: Use xcc mask for identifying xcc") Signed-off-by: Lijo Lazar ---

Re: [PATCH v4 13/13] drm/i915: Implement dedicated fbdev I/O helpers

2023-05-29 Thread Sui Jingfeng
Hi, On 2023/5/30 03:36, Sam Ravnborg wrote: Hi Thomas, On Wed, May 24, 2023 at 11:21:50AM +0200, Thomas Zimmermann wrote: Implement dedicated fbdev helpers for framebuffer I/O instead of using DRM's helpers. Use an fbdev generator macro for deferred I/O to create the fbdev callbacks. i915 was

[PATCH] drm/amdgpu: Fix missing parameter desc for 'xcc_id' in gfx_v7_0.c & amdgpu_rlc.c

2023-05-29 Thread Srinivasan Shanmugam
Fix these warnings by adding 'xcc_id' arguments. gcc with W=1 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:1557: warning: Function parameter or member 'xcc_id' not described in 'gfx_v7_0_select_se_sh' drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c:38: warning: Function parameter or member 'xcc_id' not

[PATCH] drm/amdgpu: Fix up missing parameters kdoc in svm_migrate_vma_to_ram

2023-05-29 Thread Srinivasan Shanmugam
Fix these warnings by adding & deleting the deviant arguments. gcc with W=1 drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c:671: warning: Function parameter or member 'node' not described in 'svm_migrate_vma_to_ram' drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c:671: warning: Function

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

2023-05-29 Thread Evan Quan
Fulfill the SMU13.0.0 support for Wifi RFI mitigation feature. Signed-off-by: Evan Quan -- v1->v2: - check the wbrf support using pmfw version(Lijo) v2->v3: - some minor fixes(Mario) --- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 4 ++ drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h |

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

2023-05-29 Thread Evan Quan
Fulfill the SMU13.0.7 support for Wifi RFI mitigation feature. Signed-off-by: Evan Quan -- v1->v2: - check wbrf support using pmfw version(Lijo) v2->v3: - some minor fixes(Mario) --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 61 +++ 1 file changed, 61 insertions(+)

RE: [PATCH] drm/amdkfd: Fix MEC pipe interrupt enablement

2023-05-29 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Lijo Lazar Sent: Monday, May 29, 2023 21:58 To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Joshi, Mukul ; Zhang, Hawking Subject: [PATCH]

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

2023-05-29 Thread 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 used by Wifi 6/6e/7). To make WBRF feature functional, the kernel

[PATCH 7/9] drm/amd/pm: add flood detection for wbrf events

2023-05-29 Thread Evan Quan
To protect PMFW from being overloaded. Signed-off-by: Evan Quan -- v1->v2: - utilize the delayed work(Lijo, Christian) - split the new module parameter changes out(Christian, Alex) v2->v3: - simplify the flood detection further per latest design v3->v4: - drop unneeded wbrf_mutex(Lijo,

[PATCH 1/9] drivers/acpi: Add support for Wifi band RF mitigations

2023-05-29 Thread Evan Quan
From: Mario Limonciello 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, AMD has introduced

[PATCH 2/9] mt76: Add support to the Mediatek MT7921 for ACPI WBRF

2023-05-29 Thread Evan Quan
From: Mario Limonciello Mediatek wifi adapters are utilized in systems that support AMD's WBRF interference mitigation mechanism. For this mechanism to work frequencies utilized use must be notified to an ACPI device. If the kernel is configured with CONFIG_ACPI_WBRF then notify this ACPI

[PATCH 3/9] wifi: ath11k: Add support to the Qualcomm ath11k for ACPI WBRF

2023-05-29 Thread Evan Quan
From: Anson Tsao Qualcomm wifi adapters are utilized in systems that support AMD's WBRF interference mitigation mechanism. For this mechanism to work frequencies utilized use must be notified to an ACPI device. If the kernel is configured with CONFIG_ACPI_WBRF then notify this ACPI device

[PATCH 4/9] wifi: ath12k: Add support to the Qualcomm ath12k for ACPI WBRF

2023-05-29 Thread Evan Quan
Qualcomm wifi adapters are utilized in systems that support AMD's WBRF interference mitigation mechanism. For this mechanism to work frequencies utilized use must be notified to an ACPI device. If the kernel is configured with CONFIG_ACPI_WBRF then notify this ACPI device accordingly. Change

[PATCH 0/9] Support Wifi RFI interference mitigation feature

2023-05-29 Thread Evan Quan
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 possible RFI interference producers can advertise

[PATCH 5/9] drm/amd/pm: update driver_if and ppsmc headers for coming wbrf feature

2023-05-29 Thread Evan Quan
Add those data structures to support Wifi RFI mitigation feature. Signed-off-by: Evan Quan -- v1->v2: - update smu_v13_0_7_ppsmc.h to fit latest messages definitions --- .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 14 +- .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h