Re: [PATCH] drm/amdgpu: Fix kcalloc over kzalloc in 'gmc_v9_0_init_mem_ranges'

2023-08-18 Thread Lazar, Lijo
On 8/18/2023 12:15 PM, Srinivasan Shanmugam wrote: Replace kzalloc(n * sizeof(...), ...) with kcalloc(n, sizeof(...), ...) since kcalloc is the preferred API in case of allocating with multiply. Fixes the below: WARNING: Prefer kcalloc over kzalloc with multiply Cc: Guchun Chen Cc: Christi

Re: [PATCH 6/7] Revert "drm/amd/display: Implement zpos property"

2023-08-18 Thread Melissa Wen
On 07/26, Aurabindo Pillai wrote: > This reverts commit 6c8ff1683d30024c8cff137d30b740a405cc084e. > > This patch causes IGT test case 'kms_atomic@plane-immutable-zpos' to > fail on AMDGPU hardware. > > Cc: Joshua Ashton > Signed-off-by: Nicholas Choi > --- > drivers/gpu/drm/amd/display/amdgpu_

Re: [PATCH] drm/amd/amdgpu/amdgpu_ring: match type used for loop counting

2023-08-18 Thread Christian König
Am 17.08.23 um 21:42 schrieb Joshua Peisach: The argument passed to _insert_nop is a uint32_t, and the loop counts to a regular integer. In the event of the argument being larger than the maximum integer size, the regular integer would become negative, and never reach the count number. So, match

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

2023-08-18 Thread Lazar, Lijo
On 8/18/2023 8:56 AM, Evan Quan wrote: 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). S

RE: [PATCH] drm/amdgpu: Fix kcalloc over kzalloc in 'gmc_v9_0_init_mem_ranges'

2023-08-18 Thread Chen, Guchun
[Public] Reviewed-by: Guchun Chen Regards, Guchun > -Original Message- > From: SHANMUGAM, SRINIVASAN > Sent: Friday, August 18, 2023 2:46 PM > To: Koenig, Christian ; Deucher, Alexander > ; Chen, Guchun > Cc: amd-gfx@lists.freedesktop.org; SHANMUGAM, SRINIVASAN > ; Pan, Xinhui > > Su

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

2023-08-18 Thread Lazar, Lijo
On 8/18/2023 8:56 AM, Evan Quan wrote: To protect PMFW from being overloaded. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 31 +++ drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 7 + 2 files changed, 32

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

2023-08-18 Thread Lazar, Lijo
On 8/18/2023 8:56 AM, Evan Quan wrote: Fulfill the SMU13.0.0 support for Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 3 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 3 +- drivers/gpu/drm/

[PATCH] drm/amd/pm: Fix critical temp unit of SMU v13.0.6

2023-08-18 Thread Asad Kamal
Critical Temperature needs to be reported in millidegree Celsius. Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm

RE: [PATCH] drm/amd/pm: Fix critical temp unit of SMU v13.0.6

2023-08-18 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] -Original Message- From: amd-gfx On Behalf Of Asad Kamal Sent: Friday, August 18, 2023 6:30 PM To: amd-gfx@lists.freedesktop.org Cc: Lazar, Lijo ; Kamal, Asad ; Ma, Le ; Zhang, Morris ; Arif, Maisam ; Zhang, Hawking Subject: [PATCH] drm/amd/pm: Fix cri

[PATCH v2] drm/amd/pm: Fix critical temp unit of SMU v13.0.6

2023-08-18 Thread Asad Kamal
Critical Temperature needs to be reported in millidegree Celsius. Signed-off-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/dr

Re: [PATCH v2] drm/amd/pm: Fix critical temp unit of SMU v13.0.6

2023-08-18 Thread Wang, Yang(Kevin)
[AMD Official Use Only - General] Reviewed-by: Yang Wang Best Regards, Kevin 发件人: Kamal, Asad 发送时间: 星期五, 八月 18, 2023 19:01 收件人: amd-gfx@lists.freedesktop.org ; Wang, Yang(Kevin) 抄送: Lazar, Lijo ; Zhang, Morris ; Kamal, Asad ; Ma, Le ; Zhang, Hawking 主题: [PA

RE: [PATCH] drm/amdgpu: Use READ_ONCE() when reading the values in 'sdma_v4_4_2_ring_get_rptr'

2023-08-18 Thread Ma, Le
[AMD Official Use Only - General] Reviewed-by: Le Ma > -Original Message- > From: SHANMUGAM, SRINIVASAN > Sent: Friday, August 4, 2023 1:47 PM > To: Koenig, Christian ; Deucher, Alexander > ; Chen, Guchun ; > Pan, Xinhui > Cc: amd-gfx@lists.freedesktop.org; SHANMUGAM, SRINIVASAN > ; Ma

Re: [PATCH v2] drm/amd/pm: Fix critical temp unit of SMU v13.0.6

2023-08-18 Thread Lazar, Lijo
On 8/18/2023 4:30 PM, Asad Kamal wrote: Critical Temperature needs to be reported in millidegree Celsius. Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Thanks, Lijo --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 9 + 1 file changed, 5 insertions(+), 4 deletio

[PATCH] drm/amdgpu: Remove SRAM clock gater override by driver

2023-08-18 Thread Mangesh Gadre
rlc firmware does required setting ,driver need not do it. Signed-off-by: Mangesh Gadre --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 9 - 1 file changed, 9 deletions(-) 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 d8d6807e7b96..9

RE: [PATCH] drm/amdgpu: Remove SRAM clock gater override by driver

2023-08-18 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Gadre, Mangesh Sent: Friday, August 18, 2023 19:40 To: amd-gfx@lists.freedesktop.org; Lazar, Lijo ; Zhang, Hawking Cc: Gadre, Mangesh Subject: [PATCH] drm/amdgpu: Remove SRAM clock

Re: [PATCH] drm/amdgpu: Remove SRAM clock gater override by driver

2023-08-18 Thread Lazar, Lijo
On 8/18/2023 5:10 PM, Mangesh Gadre wrote: rlc firmware does required setting ,driver need not do it. Signed-off-by: Mangesh Gadre Reviewed-by: Lijo Lazar Thanks, Lijo --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/gpu

[PATCH] drm/amd/display: fix mode scaling (RMX_.*)

2023-08-18 Thread Hamza Mahfooz
As made mention of in commit 4a2df0d1f28e ("drm/amd/display: Fixed non-native modes not lighting up"), we shouldn't call drm_mode_set_crtcinfo() once the crtc timings have been decided. Since, it can cause settings to be unintentionally overwritten. So, since dm_state is never NULL now, we can use

Re: [PATCH] drm/amd/display: fix mode scaling (RMX_.*)

2023-08-18 Thread Alex Deucher
On Fri, Aug 18, 2023 at 9:25 AM Hamza Mahfooz wrote: > > As made mention of in commit 4a2df0d1f28e ("drm/amd/display: Fixed > non-native modes not lighting up"), we shouldn't call > drm_mode_set_crtcinfo() once the crtc timings have been decided. Since, > it can cause settings to be unintentionall

Re: [PATCH 3/4] drm/uapi: document the USB subconnector type

2023-08-18 Thread Dmitry Baryshkov
On 18/08/2023 09:24, Simon Ser wrote: On Thursday, August 17th, 2023 at 21:33, Dmitry Baryshkov wrote: We have been looking for a way to document that the corresponding DP port is represented by the USB connector on the device. Consequently, I believe the best way to document it, would be to

Re: [PATCH] drm/amd/display: fix mode scaling (RMX_.*)

2023-08-18 Thread Hamza Mahfooz
On 8/18/23 09:28, Alex Deucher wrote: On Fri, Aug 18, 2023 at 9:25 AM Hamza Mahfooz wrote: As made mention of in commit 4a2df0d1f28e ("drm/amd/display: Fixed non-native modes not lighting up"), we shouldn't call drm_mode_set_crtcinfo() once the crtc timings have been decided. Since, it can c

Re: [PATCH] drm/amd/display: fix mode scaling (RMX_.*)

2023-08-18 Thread Harry Wentland
On 2023-08-18 09:17, Hamza Mahfooz wrote: > As made mention of in commit 4a2df0d1f28e ("drm/amd/display: Fixed > non-native modes not lighting up"), we shouldn't call > drm_mode_set_crtcinfo() once the crtc timings have been decided. Since, > it can cause settings to be unintentionally overwritt

RE: [PATCH v5 06/11] drm/radeon: Use RMW accessors for changing LNKCTL

2023-08-18 Thread Deucher, Alexander
[Public] > -Original Message- > From: Ilpo Järvinen > Sent: Monday, July 17, 2023 8:05 AM > To: linux-...@vger.kernel.org; Bjorn Helgaas ; Lorenzo > Pieralisi ; Rob Herring ; > Krzysztof Wilczyński ; Emmanuel Grumbach > ; Rafael J . Wysocki ; > Heiner Kallweit ; Lukas Wunner ; > Andy Shev

Re: [PATCH] drivers: gpu: drm: radeon: possible buffer overflow

2023-08-18 Thread Alex Deucher
Applied. Thanks! On Thu, Aug 17, 2023 at 7:34 AM Konstantin Meskhidze wrote: > > Buffer 'afmt_status' of size 6 could overflow, since index 'afmt_idx' is > checked after access. > > Fixes: 5cc4e5fc293b ("drm/radeon: Cleanup HDMI audio interrupt handling for > evergreen") > Co-developed-by: Ivan

Re: [PATCH] drm/amd/pm: Fix unsigned expression compared with zero

2023-08-18 Thread Alex Deucher
On Thu, Aug 17, 2023 at 2:07 AM Jiapeng Chong wrote: > > The val is defined as unsigned int type, if(val<0) is invalid, modify > to int type. > > drivers/gpu/drm/amd/amdgpu/../pm/amdgpu_pm.c:2813 > amdgpu_hwmon_show_power_input() warn: unsigned 'val' is never less than zero. > drivers/gpu/drm/amd

[PATCH] drm/amd/pm: fix error flow in sensor fetching

2023-08-18 Thread Alex Deucher
Sensor fetching functions should return an signed int to handle errors properly. Reported-by: Jiapeng Chong Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b

Re: [V9 1/9] drivers core: Add support for Wifi band RF mitigations

2023-08-18 Thread Rafael J. Wysocki
On Fri, Aug 18, 2023 at 5:27 AM Evan Quan 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

Re: [PATCH 6/7] Revert "drm/amd/display: Implement zpos property"

2023-08-18 Thread Leo Li
On 2023-08-18 04:25, Melissa Wen wrote: On 07/26, Aurabindo Pillai wrote: This reverts commit 6c8ff1683d30024c8cff137d30b740a405cc084e. This patch causes IGT test case 'kms_atomic@plane-immutable-zpos' to fail on AMDGPU hardware. Cc: Joshua Ashton Signed-off-by: Nicholas Choi --- driver

Re: [V9 2/9] drivers core: add ACPI based WBRF mechanism introduced by AMD

2023-08-18 Thread Rafael J. Wysocki
On Fri, Aug 18, 2023 at 5:27 AM Evan Quan wrote: > > AMD has introduced an ACPI based mechanism to support WBRF for some > platforms with AMD dGPU + WLAN. This needs support from BIOS equipped > with necessary AML implementations and dGPU firmwares. This needs a problem statement in the first pla

Re: [PATCH 3/3] drm/mst: adjust the function drm_dp_remove_payload_part2()

2023-08-18 Thread Imre Deak
On Tue, Aug 08, 2023 at 03:47:47AM +, Lin, Wayne wrote: > [AMD Official Use Only - General] > > > -Original Message- > > From: Imre Deak > > Sent: Tuesday, August 8, 2023 12:00 AM > > To: Lin, Wayne > > Cc: dri-de...@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; > > ly...@red

[PATCH] drm/amd/pm: fix debugfs pm_info output

2023-08-18 Thread Alex Deucher
Print both input and avg power. Fixes: 47f1724db4fe ("drm/amd: Introduce `AMDGPU_PP_SENSOR_GPU_INPUT_POWER`") Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amd

[pull] amdgpu, amdkfd, radeon drm-next-6.6

2023-08-18 Thread Alex Deucher
Hi Dave, Daniel, Last few updates for 6.6. Mostly bug fixes. The following changes since commit a8b273a8fd9c88cee038ffdae05b7eca063b9622: Merge tag 'amd-drm-next-6.6-2023-08-11' of https://gitlab.freedesktop.org/agd5f/linux into drm-next (2023-08-15 13:37:49 +1000) are available in the Git

[PATCH v7] drm/doc: Document DRM device reset expectations

2023-08-18 Thread André Almeida
Create a section that specifies how to deal with DRM device resets for kernel and userspace drivers. Signed-off-by: André Almeida --- v7 changes: - s/application/graphical API contex/ in the robustness part (Michel) - Grammar fixes (Randy) v6: https://lore.kernel.org/lkml/20230815185710.1597

Re: [V9 1/9] drivers core: Add support for Wifi band RF mitigations

2023-08-18 Thread Limonciello, Mario
On 8/18/2023 4:24 PM, Greg KH wrote: On Fri, Aug 18, 2023 at 11:26:11AM +0800, Evan Quan wrote: drivers/base/Makefile | 1 + drivers/base/wbrf.c | 280 ++ Why is a wifi-specific thing going into drivers/base/? confused,

[PATCH] drm/amdgpu: Fix the return for gpu mode1_reset

2023-08-18 Thread Hawking Zhang
amdgpu_device_mode1_reset will return gpu mode1_reset succeed (ret = 0) as long as wait_for_bootloader call succeed, regardless of the status reported by smu or psp firmware. This results to driver continue executing recovery even smu or psp fail to perform mode1 reset. Signed-off-by: Hawking Zhan